diff options
author | Ajay Singh <ajay.kathat@microchip.com> | 2018-12-02 18:02:43 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-12-05 09:48:46 +0100 |
commit | 4c00f7052fb86130a100d248da904ac940d501c2 (patch) | |
tree | a01042686f16ea437625d0bf84047d71e603d7a4 /drivers/staging/wilc1000 | |
parent | 9f1bdb71388efdc9963ad96ab1145c23c4b35f5b (diff) |
staging: wilc1000: use is_zero_ether_addr() API to check mac address
Use is_zero_ether_addr() API to check if mac address value is zero.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wilc1000')
-rw-r--r-- | drivers/staging/wilc1000/host_interface.c | 3 | ||||
-rw-r--r-- | drivers/staging/wilc1000/linux_wlan.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 8ce56a38649e..310138d82d5f 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -3400,13 +3400,12 @@ int wilc_del_allstation(struct wilc_vif *vif, u8 mac_addr[][ETH_ALEN]) struct wid wid; int result; int i; - u8 zero_addr[ETH_ALEN] = {0}; u8 assoc_sta = 0; struct del_all_sta del_sta; memset(&del_sta, 0x0, sizeof(del_sta)); for (i = 0; i < WILC_MAX_NUM_STA; i++) { - if (memcmp(mac_addr[i], zero_addr, ETH_ALEN)) { + if (!is_zero_ether_addr(mac_addr[i])) { assoc_sta++; ether_addr_copy(del_sta.mac[i], mac_addr[i]); } diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index e246d18896e4..142816a911f3 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -205,11 +205,10 @@ void wilc_wlan_set_bssid(struct net_device *wilc_netdev, u8 *bssid, u8 mode) int wilc_wlan_get_num_conn_ifcs(struct wilc *wilc) { u8 i = 0; - u8 null_bssid[6] = {0}; u8 ret_val = 0; for (i = 0; i < wilc->vif_num; i++) - if (memcmp(wilc->vif[i]->bssid, null_bssid, 6)) + if (!is_zero_ether_addr(wilc->vif[i]->bssid)) ret_val++; return ret_val; |