Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fa633941 authored by Leo Kim's avatar Leo Kim Committed by Greg Kroah-Hartman
Browse files

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: default avatarLeo Kim <leo.kim@atmel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e944ad75
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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;
	}