Commit 3b0a4a1b authored by Yang Yingliang's avatar Yang Yingliang Committed by Greg Kroah-Hartman

staging: rtl8723bs: core: use eth_broadcast_addr() to assign broadcast address

Using eth_broadcast_addr() to assign broadcast address instead
of copying from an array that contains the all-ones broadcast
address.
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210616081243.2511663-3-yangyingliang@huawei.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 44c26bec
...@@ -2218,7 +2218,6 @@ void issue_beacon(struct adapter *padapter, int timeout_ms) ...@@ -2218,7 +2218,6 @@ void issue_beacon(struct adapter *padapter, int timeout_ms)
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
struct wlan_bssid_ex *cur_network = &(pmlmeinfo->network); struct wlan_bssid_ex *cur_network = &(pmlmeinfo->network);
u8 bc_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
pmgntframe = alloc_mgtxmitframe(pxmitpriv); pmgntframe = alloc_mgtxmitframe(pxmitpriv);
if (!pmgntframe) if (!pmgntframe)
...@@ -2240,7 +2239,7 @@ void issue_beacon(struct adapter *padapter, int timeout_ms) ...@@ -2240,7 +2239,7 @@ void issue_beacon(struct adapter *padapter, int timeout_ms)
fctrl = &(pwlanhdr->frame_control); fctrl = &(pwlanhdr->frame_control);
*(fctrl) = 0; *(fctrl) = 0;
memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN); eth_broadcast_addr(pwlanhdr->addr1);
memcpy(pwlanhdr->addr2, myid(&(padapter->eeprompriv)), ETH_ALEN); memcpy(pwlanhdr->addr2, myid(&(padapter->eeprompriv)), ETH_ALEN);
memcpy(pwlanhdr->addr3, get_my_bssid(cur_network), ETH_ALEN); memcpy(pwlanhdr->addr3, get_my_bssid(cur_network), ETH_ALEN);
...@@ -2564,7 +2563,6 @@ static int _issue_probereq(struct adapter *padapter, ...@@ -2564,7 +2563,6 @@ static int _issue_probereq(struct adapter *padapter,
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
int bssrate_len = 0; int bssrate_len = 0;
u8 bc_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
pmgntframe = alloc_mgtxmitframe(pxmitpriv); pmgntframe = alloc_mgtxmitframe(pxmitpriv);
if (!pmgntframe) if (!pmgntframe)
...@@ -2591,8 +2589,8 @@ static int _issue_probereq(struct adapter *padapter, ...@@ -2591,8 +2589,8 @@ static int _issue_probereq(struct adapter *padapter,
memcpy(pwlanhdr->addr3, da, ETH_ALEN); memcpy(pwlanhdr->addr3, da, ETH_ALEN);
} else { } else {
/* broadcast probe request frame */ /* broadcast probe request frame */
memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN); eth_broadcast_addr(pwlanhdr->addr1);
memcpy(pwlanhdr->addr3, bc_addr, ETH_ALEN); eth_broadcast_addr(pwlanhdr->addr3);
} }
memcpy(pwlanhdr->addr2, mac, ETH_ALEN); memcpy(pwlanhdr->addr2, mac, ETH_ALEN);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment