Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4110997pxj; Tue, 8 Jun 2021 06:46:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0v7Z+8aLh6nU6sMLpr+awdv9stShmGM7TfhhrfPVOuS4OtX2fthFDYiph3FYscOOnONc+ X-Received: by 2002:a17:906:4e96:: with SMTP id v22mr23021842eju.23.1623159995466; Tue, 08 Jun 2021 06:46:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623159995; cv=none; d=google.com; s=arc-20160816; b=LPNMj2Re4cVqhXe+PW9vTweGowmUab+hLVjs8TRlTug6PLb/EWDdm1yByajiw5Eavp G9832LeseKtb0yn3dMG7D5xo0VrdaSfCOlb7BRhtygTMLTljMoZWEutN7Vg8pqgna6jF aROjw6tAe3LEYZXldfq+/R+GzySvpnmZSlsFjqQq60qsqsuD42c+hb+jKty/k9g6z7v7 I5LTp/8o0nSCp86jIw3hsc4TAkxqQvC0/l+An0HVJBy7ZPwy9M1aglDG08DHz5f+ww94 Wc3m0CdEb30VkU5g609FxuUagpOWIaCt2c7nnrtKDQzvA9JyNgZW9PLGdynp2tdwBWyD lvjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=r2WUGZ4z3hVhWgKs57HFq9+dxlM6UeOOd8UHUkwwi+I=; b=Xli7KvkfvsZ+Qb0ZhL7bdxdouqP70/Ejg/EhZ1nLylVzgGsBg4ic/gJAbroZlXKZmb 84DHHm3ulE1QXOg9nXXCRLBJc2CLMidNnjc6/i1lYDEgoyDL/HczYdprSpJd9JsEKz/m NTllMwSviZAsNZf0V3UnrcAzsRHcUSmTUzfmLTFnzkOEJft+4K+kOEXLaIfk7ejq5v+A 4zc6EyvPVNipVfrCIY90fO0Ep8yUkzSHZ+Tn/Bgw1+LlwFx2GJ13ad2b+q+byttbo+NQ QdFTNVc3yfxAiCsaOYiL112gag+W1rwYX/ab7qYezcJNv2OG+pwSLNy6mZlDTrAdJ5Tj HqqA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qo1si15043402ejb.590.2021.06.08.06.46.11; Tue, 08 Jun 2021 06:46:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232895AbhFHNp7 (ORCPT + 99 others); Tue, 8 Jun 2021 09:45:59 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:5338 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232768AbhFHNp6 (ORCPT ); Tue, 8 Jun 2021 09:45:58 -0400 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.55]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4Fzrvw1F7Wz6ttS; Tue, 8 Jun 2021 21:40:12 +0800 (CST) Received: from dggpemm500009.china.huawei.com (7.185.36.225) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 8 Jun 2021 21:44:02 +0800 Received: from huawei.com (10.175.113.32) by dggpemm500009.china.huawei.com (7.185.36.225) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 8 Jun 2021 21:44:02 +0800 From: Liu Shixin To: Greg Kroah-Hartman CC: , , "Liu Shixin" Subject: [PATCH -next 2/2] staging: r8188eu: use eth_broadcast_addr() to assign broadcast address Date: Tue, 8 Jun 2021 22:16:20 +0800 Message-ID: <20210608141620.525521-1-liushixin2@huawei.com> X-Mailer: git-send-email 2.18.0.huawei.25 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.113.32] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemm500009.china.huawei.com (7.185.36.225) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use eth_broadcast_addr() to assign broadcast address. Signed-off-by: Liu Shixin --- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c index 8c1bc04dd830..119110a150b2 100644 --- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c @@ -315,7 +315,6 @@ static void issue_beacon(struct adapter *padapter, int timeout_ms) struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; struct wlan_bssid_ex *cur_network = &pmlmeinfo->network; - u8 bc_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; pmgntframe = alloc_mgtxmitframe(pxmitpriv); if (!pmgntframe) { @@ -339,7 +338,7 @@ static void issue_beacon(struct adapter *padapter, int timeout_ms) fctrl = &pwlanhdr->frame_control; *(fctrl) = 0; - ether_addr_copy(pwlanhdr->addr1, bc_addr); + eth_broadcast_addr(pwlanhdr->addr1); ether_addr_copy(pwlanhdr->addr2, myid(&padapter->eeprompriv)); ether_addr_copy(pwlanhdr->addr3, cur_network->MacAddress); @@ -605,7 +604,6 @@ static int issue_probereq(struct adapter *padapter, struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; int bssrate_len = 0; - u8 bc_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; RT_TRACE(_module_rtl871x_mlme_c_, _drv_notice_, ("+%s\n", __func__)); @@ -633,8 +631,8 @@ static int issue_probereq(struct adapter *padapter, ether_addr_copy(pwlanhdr->addr3, da); } else { /* broadcast probe request frame */ - ether_addr_copy(pwlanhdr->addr1, bc_addr); - ether_addr_copy(pwlanhdr->addr3, bc_addr); + eth_broadcast_addr(pwlanhdr->addr1); + eth_broadcast_addr(pwlanhdr->addr3); } ether_addr_copy(pwlanhdr->addr2, mac); -- 2.18.0.huawei.25