aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo Kim <[email protected]>2016-03-25 21:16:53 +0900
committerGreg Kroah-Hartman <[email protected]>2016-03-28 07:30:36 -0700
commitfa63394152e9675c6d9ce32e57fbe00094efb4b8 (patch)
tree652c99ca9b46ae90c2c3f3ada2f0020f45b54c92
parente944ad751ff4fbbd0278ba4dd8595bf7fa3c7e9e (diff)
staging: wilc1000: replaces memcmp with ether_addr_equal_unaligned
This patch replaces memcmp with ether_addr_equal_unaligned. Warning reported by checkpatch.pl - Prefer ether_addr_equal() or ether_addr_equal_unaligned() over memcmp() Signed-off-by: Leo Kim <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/staging/wilc1000/linux_wlan.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index db624ef31e69..8f0a74d3ff86 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -259,10 +259,12 @@ static struct net_device *get_if_handler(struct wilc *wilc, u8 *mac_header)
for (i = 0; i < wilc->vif_num; i++) {
if (wilc->vif[i]->mode == STATION_MODE)
- if (!memcmp(bssid, wilc->vif[i]->bssid, ETH_ALEN))
+ if (ether_addr_equal_unaligned(bssid,
+ wilc->vif[i]->bssid))
return wilc->vif[i]->ndev;
if (wilc->vif[i]->mode == AP_MODE)
- if (!memcmp(bssid1, wilc->vif[i]->bssid, ETH_ALEN))
+ if (ether_addr_equal_unaligned(bssid1,
+ wilc->vif[i]->bssid))
return wilc->vif[i]->ndev;
}