diff options
| author | Jes Sorensen <Jes.Sorensen@redhat.com> | 2014-06-26 10:20:48 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-06-26 20:34:16 -0400 |
| commit | a6f4e0c17cecf7ccdf3f61bc998c5ecbd5fdfd00 (patch) | |
| tree | 0fb8afd65ce71d3ff755929696e91ecb90b73f52 | |
| parent | 1c69be9facbbb7d6aaa87831444544736c884653 (diff) | |
staging: rtl8723au: rtw_sta_mgt.c: Use ether_addr_{copy, equal}()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/staging/rtl8723au/core/rtw_sta_mgt.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/staging/rtl8723au/core/rtw_sta_mgt.c b/drivers/staging/rtl8723au/core/rtw_sta_mgt.c index 14a82bea826f..62e35dd41bb5 100644 --- a/drivers/staging/rtl8723au/core/rtw_sta_mgt.c +++ b/drivers/staging/rtl8723au/core/rtw_sta_mgt.c @@ -126,7 +126,7 @@ rtw_alloc_stainfo23a(struct sta_priv *pstapriv, u8 *hwaddr, gfp_t gfp) psta->padapter = pstapriv->padapter; - memcpy(psta->hwaddr, hwaddr, ETH_ALEN); + ether_addr_copy(psta->hwaddr, hwaddr); index = wifi_mac_hash(hwaddr); @@ -363,10 +363,10 @@ struct sta_info *rtw_get_stainfo23a(struct sta_priv *pstapriv, const u8 *hwaddr) list_for_each(plist, phead) { psta = container_of(plist, struct sta_info, hash_list); - if (!memcmp(psta->hwaddr, addr, ETH_ALEN)) { - /* if found the matched address */ + /* if found the matched address */ + if (ether_addr_equal(psta->hwaddr, addr)) break; - } + psta = NULL; } spin_unlock_bh(&pstapriv->sta_hash_lock); @@ -422,7 +422,7 @@ bool rtw_access_ctrl23a(struct rtw_adapter *padapter, u8 *mac_addr) list_for_each(plist, phead) { paclnode = container_of(plist, struct rtw_wlan_acl_node, list); - if (!memcmp(paclnode->addr, mac_addr, ETH_ALEN)) { + if (ether_addr_equal(paclnode->addr, mac_addr)) { if (paclnode->valid) { match = true; break; |
