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>
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]);
}
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;