From: Liu Shixin <liushixin2@huawei.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: <linux-staging@lists.linux.dev>, <linux-kernel@vger.kernel.org>,
"Liu Shixin" <liushixin2@huawei.com>
Subject: [PATCH -next 2/2] staging: r8188eu: use eth_broadcast_addr() to assign broadcast address
Date: Tue, 8 Jun 2021 22:16:20 +0800 [thread overview]
Message-ID: <20210608141620.525521-1-liushixin2@huawei.com> (raw)
Use eth_broadcast_addr() to assign broadcast address.
Signed-off-by: Liu Shixin <liushixin2@huawei.com>
---
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
next reply other threads:[~2021-06-08 14:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-08 14:16 Liu Shixin [this message]
2021-06-08 14:12 ` [PATCH -next 2/2] staging: r8188eu: use eth_broadcast_addr() to assign broadcast address Greg Kroah-Hartman
2021-06-08 16:45 ` Joe Perches
2021-06-08 17:01 ` Greg Kroah-Hartman
2021-06-08 17:34 ` Joe Perches
2021-06-09 3:01 ` Liu Shixin
2021-06-09 6:53 ` Fabio Aiuto
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210608141620.525521-1-liushixin2@huawei.com \
--to=liushixin2@huawei.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).