summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ti/wl1251/main.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-12-26 18:31:45 (GMT)
committerDavid S. Miller <davem@davemloft.net>2013-12-26 18:31:45 (GMT)
commit539c89cfdb0e4b58d22a8a89321f36572b299fbc (patch)
tree0c7c97774c2c5bcf092de4852da404c543d725d9 /drivers/net/wireless/ti/wl1251/main.c
parent306d7f79bb8169f73180dd1e5986eaca75ffb1d6 (diff)
parent692e5167b4487c96123c2de4c8d9577d50606112 (diff)
downloadlinux-539c89cfdb0e4b58d22a8a89321f36572b299fbc.tar.xz
Merge branch 'addr_compare'
Ding Tianhong says: ==================== slight optimization of addr compare for some modules Joe Perches add ether_addr_equal_unaligned to test if possibly unaligned to u16 Ethernet addresses are equal. If CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is set, this uses the slightly faster generic routine ether_addr_equal, otherwise this uses memcmp. So I use the recently added and possibly more efficient ether_addr_equal_unaligned to instead of memcmp for slight optimization. v2: Because a lot of places are already using 16b aligned MAC address for both operands, so use the ether_addr_equal to instead of ether_addr_equal_unaligned.Thanks for Joe, Alex and Antonio's opinions. Also remove the patch for bridge. v3: According Joe's suggestion, the patch (net: slight optimization of addr compare for some modules) should be broken into several patches, and it will be good to review for maintainers. So I will send rest of the patches for first step, and next step, I will seperate the netdev patch and send them by another patchset for net-next. also fix some changelog. v3.5 Change some style for patch 8 and patch 13. Thanks for Sergei's suggestion. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/ti/wl1251/main.c')
-rw-r--r--drivers/net/wireless/ti/wl1251/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ti/wl1251/main.c b/drivers/net/wireless/ti/wl1251/main.c
index 3291ffa..b8a360b 100644
--- a/drivers/net/wireless/ti/wl1251/main.c
+++ b/drivers/net/wireless/ti/wl1251/main.c
@@ -521,7 +521,7 @@ static int wl1251_op_add_interface(struct ieee80211_hw *hw,
goto out;
}
- if (memcmp(wl->mac_addr, vif->addr, ETH_ALEN)) {
+ if (!ether_addr_equal_unaligned(wl->mac_addr, vif->addr)) {
memcpy(wl->mac_addr, vif->addr, ETH_ALEN);
SET_IEEE80211_PERM_ADDR(wl->hw, wl->mac_addr);
ret = wl1251_acx_station_id(wl);