Commit 43c34be1 authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman

staging: rtl8723au: ioctl_cfg80211.c: Use eth_{zero,broadcast},addr()

Use kernel provided macros instead of own hacks.
Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 29f79e05
...@@ -263,7 +263,6 @@ static int rtw_cfg80211_inform_bss(struct rtw_adapter *padapter, ...@@ -263,7 +263,6 @@ static int rtw_cfg80211_inform_bss(struct rtw_adapter *padapter,
size_t len, bssinf_len = 0; size_t len, bssinf_len = 0;
struct ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
unsigned short *fctrl; unsigned short *fctrl;
u8 bc_addr[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
struct wireless_dev *wdev = padapter->rtw_wdev; struct wireless_dev *wdev = padapter->rtw_wdev;
struct wiphy *wiphy = wdev->wiphy; struct wiphy *wiphy = wdev->wiphy;
...@@ -321,7 +320,7 @@ static int rtw_cfg80211_inform_bss(struct rtw_adapter *padapter, ...@@ -321,7 +320,7 @@ static int rtw_cfg80211_inform_bss(struct rtw_adapter *padapter,
SetSeqNum(pwlanhdr, 0); SetSeqNum(pwlanhdr, 0);
if (pnetwork->network.reserved == 1) { /* WIFI_BEACON */ if (pnetwork->network.reserved == 1) { /* WIFI_BEACON */
memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN); eth_broadcast_addr(pwlanhdr->addr1);
SetFrameSubType(pbuf, WIFI_BEACON); SetFrameSubType(pbuf, WIFI_BEACON);
} else { } else {
memcpy(pwlanhdr->addr1, myid(&padapter->eeprompriv), ETH_ALEN); memcpy(pwlanhdr->addr1, myid(&padapter->eeprompriv), ETH_ALEN);
...@@ -1101,7 +1100,7 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev, ...@@ -1101,7 +1100,7 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev,
return -1; return -1;
param->cmd = IEEE_CMD_SET_ENCRYPTION; param->cmd = IEEE_CMD_SET_ENCRYPTION;
memset(param->sta_addr, 0xff, ETH_ALEN); eth_broadcast_addr(param->sta_addr);
switch (params->cipher) { switch (params->cipher) {
case IW_AUTH_CIPHER_NONE: case IW_AUTH_CIPHER_NONE:
...@@ -2255,8 +2254,7 @@ static int cfg80211_rtw_del_pmksa(struct wiphy *wiphy, ...@@ -2255,8 +2254,7 @@ static int cfg80211_rtw_del_pmksa(struct wiphy *wiphy,
if (!memcmp(psecuritypriv->PMKIDList[index].Bssid, if (!memcmp(psecuritypriv->PMKIDList[index].Bssid,
pmksa->bssid, ETH_ALEN)) { pmksa->bssid, ETH_ALEN)) {
/* BSSID is matched, the same AP => Remove this PMKID information and reset it. */ /* BSSID is matched, the same AP => Remove this PMKID information and reset it. */
memset(psecuritypriv->PMKIDList[index].Bssid, 0x00, eth_zero_addr(psecuritypriv->PMKIDList[index].Bssid);
ETH_ALEN);
memset(psecuritypriv->PMKIDList[index].PMKID, 0x00, memset(psecuritypriv->PMKIDList[index].PMKID, 0x00,
WLAN_PMKID_LEN); WLAN_PMKID_LEN);
psecuritypriv->PMKIDList[index].bUsed = false; psecuritypriv->PMKIDList[index].bUsed = false;
......
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