summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/adm8211.c
diff options
context:
space:
mode:
authordingtianhong <dingtianhong@huawei.com>2013-12-26 19:41:34 +0800
committerDavid S. Miller <davem@davemloft.net>2013-12-26 13:31:35 -0500
commit692e5167b4487c96123c2de4c8d9577d50606112 (patch)
tree0c7c97774c2c5bcf092de4852da404c543d725d9 /drivers/net/wireless/adm8211.c
parent4f29739bb05cfbe5529460d0e8afeff2a528c2fa (diff)
downloadop-kernel-dev-692e5167b4487c96123c2de4c8d9577d50606112.zip
op-kernel-dev-692e5167b4487c96123c2de4c8d9577d50606112.tar.gz
wireless: slight optimization of addr compare
Use possibly more efficient ether_addr_equal or ether_addr_equal_unaligned instead of memcmp. Cc: John W. Linville <linville@tuxdriver.com> Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Weilong Chen <chenweilong@huawei.com> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/adm8211.c')
-rw-r--r--drivers/net/wireless/adm8211.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/adm8211.c b/drivers/net/wireless/adm8211.c
index cfce83e1f..1d40c69 100644
--- a/drivers/net/wireless/adm8211.c
+++ b/drivers/net/wireless/adm8211.c
@@ -1314,7 +1314,7 @@ static void adm8211_bss_info_changed(struct ieee80211_hw *dev,
if (!(changes & BSS_CHANGED_BSSID))
return;
- if (memcmp(conf->bssid, priv->bssid, ETH_ALEN)) {
+ if (!ether_addr_equal(conf->bssid, priv->bssid)) {
adm8211_set_bssid(dev, conf->bssid);
memcpy(priv->bssid, conf->bssid, ETH_ALEN);
}
OpenPOWER on IntegriCloud