aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/hostap/hostap_ioctl.c
diff options
context:
space:
mode:
authordingtianhong <dingtianhong@huawei.com>2013-12-26 06:41:15 -0500
committerDavid S. Miller <davem@davemloft.net>2013-12-26 13:31:35 -0500
commitd22fbd70c2770b5e3ba0d7bc5b29f6ee686cdba4 (patch)
tree5ae7fe8532ab5d1739b99f7046f6d4907294fd8c /drivers/net/wireless/hostap/hostap_ioctl.c
parent5e231c2c5aeda0763c0b6e1337ca7bb61a887af8 (diff)
hostap: slight optimization of addr compare
Use possibly more efficient ether_addr_equal instead of memcmp. Cc: Jouni Malinen <j@w1.fi> 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/hostap/hostap_ioctl.c')
-rw-r--r--drivers/net/wireless/hostap/hostap_ioctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c
index e5090309824e..2454a740ea50 100644
--- a/drivers/net/wireless/hostap/hostap_ioctl.c
+++ b/drivers/net/wireless/hostap/hostap_ioctl.c
@@ -655,7 +655,7 @@ static int hostap_join_ap(struct net_device *dev)
655 if (!local->last_scan_results) 655 if (!local->last_scan_results)
656 break; 656 break;
657 entry = &local->last_scan_results[i]; 657 entry = &local->last_scan_results[i];
658 if (memcmp(local->preferred_ap, entry->bssid, ETH_ALEN) == 0) { 658 if (ether_addr_equal(local->preferred_ap, entry->bssid)) {
659 req.channel = entry->chid; 659 req.channel = entry->chid;
660 break; 660 break;
661 } 661 }
@@ -1978,7 +1978,7 @@ static inline int prism2_translate_scan(local_info_t *local,
1978 list_for_each(ptr, &local->bss_list) { 1978 list_for_each(ptr, &local->bss_list) {
1979 struct hostap_bss_info *bss; 1979 struct hostap_bss_info *bss;
1980 bss = list_entry(ptr, struct hostap_bss_info, list); 1980 bss = list_entry(ptr, struct hostap_bss_info, list);
1981 if (memcmp(bss->bssid, scan->bssid, ETH_ALEN) == 0) { 1981 if (ether_addr_equal(bss->bssid, scan->bssid)) {
1982 bss->included = 1; 1982 bss->included = 1;
1983 current_ev = __prism2_translate_scan( 1983 current_ev = __prism2_translate_scan(
1984 local, info, scan, bss, current_ev, 1984 local, info, scan, bss, current_ev,