summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/hostap/hostap_ioctl.c
diff options
context:
space:
mode:
authordingtianhong <dingtianhong@huawei.com>2013-12-26 19:41:15 +0800
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)
downloadblackbird-obmc-linux-d22fbd70c2770b5e3ba0d7bc5b29f6ee686cdba4.tar.gz
blackbird-obmc-linux-d22fbd70c2770b5e3ba0d7bc5b29f6ee686cdba4.zip
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)
if (!local->last_scan_results)
break;
entry = &local->last_scan_results[i];
- if (memcmp(local->preferred_ap, entry->bssid, ETH_ALEN) == 0) {
+ if (ether_addr_equal(local->preferred_ap, entry->bssid)) {
req.channel = entry->chid;
break;
}
@@ -1978,7 +1978,7 @@ static inline int prism2_translate_scan(local_info_t *local,
list_for_each(ptr, &local->bss_list) {
struct hostap_bss_info *bss;
bss = list_entry(ptr, struct hostap_bss_info, list);
- if (memcmp(bss->bssid, scan->bssid, ETH_ALEN) == 0) {
+ if (ether_addr_equal(bss->bssid, scan->bssid)) {
bss->included = 1;
current_ev = __prism2_translate_scan(
local, info, scan, bss, current_ev,
OpenPOWER on IntegriCloud