Commit 7973bfef authored by Liu Shixin's avatar Liu Shixin Committed by Greg Kroah-Hartman

staging: rtl8188eu: Use eth_broadcast_addr() to assign broadcast address

Simplify the code by using eth_broadcast_addr() to assign broadcast
address and removing the unnecessary variable bc_addr.
Signed-off-by: default avatarLiu Shixin <liushixin2@huawei.com>
Link: https://lore.kernel.org/r/20210609085650.1269008-2-liushixin2@huawei.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fe5fcefc
...@@ -315,7 +315,6 @@ static void issue_beacon(struct adapter *padapter, int timeout_ms) ...@@ -315,7 +315,6 @@ static 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) {
...@@ -339,7 +338,7 @@ static void issue_beacon(struct adapter *padapter, int timeout_ms) ...@@ -339,7 +338,7 @@ static void issue_beacon(struct adapter *padapter, int timeout_ms)
fctrl = &pwlanhdr->frame_control; fctrl = &pwlanhdr->frame_control;
*(fctrl) = 0; *(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->addr2, myid(&padapter->eeprompriv));
ether_addr_copy(pwlanhdr->addr3, cur_network->MacAddress); ether_addr_copy(pwlanhdr->addr3, cur_network->MacAddress);
...@@ -605,7 +604,6 @@ static int issue_probereq(struct adapter *padapter, ...@@ -605,7 +604,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};
RT_TRACE(_module_rtl871x_mlme_c_, _drv_notice_, ("+%s\n", __func__)); RT_TRACE(_module_rtl871x_mlme_c_, _drv_notice_, ("+%s\n", __func__));
...@@ -633,8 +631,8 @@ static int issue_probereq(struct adapter *padapter, ...@@ -633,8 +631,8 @@ static int issue_probereq(struct adapter *padapter,
ether_addr_copy(pwlanhdr->addr3, da); ether_addr_copy(pwlanhdr->addr3, da);
} else { } else {
/* broadcast probe request frame */ /* broadcast probe request frame */
ether_addr_copy(pwlanhdr->addr1, bc_addr); eth_broadcast_addr(pwlanhdr->addr1);
ether_addr_copy(pwlanhdr->addr3, bc_addr); eth_broadcast_addr(pwlanhdr->addr3);
} }
ether_addr_copy(pwlanhdr->addr2, mac); ether_addr_copy(pwlanhdr->addr2, mac);
......
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