diff options
Diffstat (limited to 'drivers/net/wireless')
23 files changed, 79 insertions, 76 deletions
diff --git a/drivers/net/wireless/adm8211.c b/drivers/net/wireless/adm8211.c index 84e57230b31a..f35f93c31b09 100644 --- a/drivers/net/wireless/adm8211.c +++ b/drivers/net/wireless/adm8211.c | |||
@@ -1313,7 +1313,7 @@ static void adm8211_bss_info_changed(struct ieee80211_hw *dev, | |||
1313 | if (!(changes & BSS_CHANGED_BSSID)) | 1313 | if (!(changes & BSS_CHANGED_BSSID)) |
1314 | return; | 1314 | return; |
1315 | 1315 | ||
1316 | if (memcmp(conf->bssid, priv->bssid, ETH_ALEN)) { | 1316 | if (!ether_addr_equal(conf->bssid, priv->bssid)) { |
1317 | adm8211_set_bssid(dev, conf->bssid); | 1317 | adm8211_set_bssid(dev, conf->bssid); |
1318 | memcpy(priv->bssid, conf->bssid, ETH_ALEN); | 1318 | memcpy(priv->bssid, conf->bssid, ETH_ALEN); |
1319 | } | 1319 | } |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c index e23c869bfe33..fc4f98b275d7 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c | |||
@@ -1243,7 +1243,7 @@ bool brcmf_p2p_scan_finding_common_channel(struct brcmf_cfg80211_info *cfg, | |||
1243 | IEEE80211_P2P_ATTR_DEVICE_ID, | 1243 | IEEE80211_P2P_ATTR_DEVICE_ID, |
1244 | p2p_dev_addr, sizeof(p2p_dev_addr)); | 1244 | p2p_dev_addr, sizeof(p2p_dev_addr)); |
1245 | if ((err >= 0) && | 1245 | if ((err >= 0) && |
1246 | (!memcmp(p2p_dev_addr, afx_hdl->tx_dst_addr, ETH_ALEN))) { | 1246 | (ether_addr_equal(p2p_dev_addr, afx_hdl->tx_dst_addr))) { |
1247 | if (!bi->ctl_ch) { | 1247 | if (!bi->ctl_ch) { |
1248 | ch.chspec = le16_to_cpu(bi->chanspec); | 1248 | ch.chspec = le16_to_cpu(bi->chanspec); |
1249 | cfg->d11inf.decchspec(&ch); | 1249 | cfg->d11inf.decchspec(&ch); |
@@ -1380,8 +1380,7 @@ int brcmf_p2p_notify_action_frame_rx(struct brcmf_if *ifp, | |||
1380 | (brcmf_p2p_gon_req_collision(p2p, (u8 *)e->addr))) { | 1380 | (brcmf_p2p_gon_req_collision(p2p, (u8 *)e->addr))) { |
1381 | if (test_bit(BRCMF_P2P_STATUS_FINDING_COMMON_CHANNEL, | 1381 | if (test_bit(BRCMF_P2P_STATUS_FINDING_COMMON_CHANNEL, |
1382 | &p2p->status) && | 1382 | &p2p->status) && |
1383 | (memcmp(afx_hdl->tx_dst_addr, e->addr, | 1383 | (ether_addr_equal(afx_hdl->tx_dst_addr, e->addr))) { |
1384 | ETH_ALEN) == 0)) { | ||
1385 | afx_hdl->peer_chan = ch.chnum; | 1384 | afx_hdl->peer_chan = ch.chnum; |
1386 | brcmf_dbg(INFO, "GON request: Peer found, channel=%d\n", | 1385 | brcmf_dbg(INFO, "GON request: Peer found, channel=%d\n", |
1387 | afx_hdl->peer_chan); | 1386 | afx_hdl->peer_chan); |
@@ -1865,7 +1864,7 @@ s32 brcmf_p2p_notify_rx_mgmt_p2p_probereq(struct brcmf_if *ifp, | |||
1865 | cfg->d11inf.decchspec(&ch); | 1864 | cfg->d11inf.decchspec(&ch); |
1866 | 1865 | ||
1867 | if (test_bit(BRCMF_P2P_STATUS_FINDING_COMMON_CHANNEL, &p2p->status) && | 1866 | if (test_bit(BRCMF_P2P_STATUS_FINDING_COMMON_CHANNEL, &p2p->status) && |
1868 | (memcmp(afx_hdl->tx_dst_addr, e->addr, ETH_ALEN) == 0)) { | 1867 | (ether_addr_equal(afx_hdl->tx_dst_addr, e->addr))) { |
1869 | afx_hdl->peer_chan = ch.chnum; | 1868 | afx_hdl->peer_chan = ch.chnum; |
1870 | brcmf_dbg(INFO, "PROBE REQUEST: Peer found, channel=%d\n", | 1869 | brcmf_dbg(INFO, "PROBE REQUEST: Peer found, channel=%d\n", |
1871 | afx_hdl->peer_chan); | 1870 | afx_hdl->peer_chan); |
diff --git a/drivers/net/wireless/cw1200/sta.c b/drivers/net/wireless/cw1200/sta.c index 010b252be584..103f7bce8932 100644 --- a/drivers/net/wireless/cw1200/sta.c +++ b/drivers/net/wireless/cw1200/sta.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/firmware.h> | 14 | #include <linux/firmware.h> |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/etherdevice.h> | ||
16 | 17 | ||
17 | #include "cw1200.h" | 18 | #include "cw1200.h" |
18 | #include "sta.h" | 19 | #include "sta.h" |
@@ -555,8 +556,8 @@ u64 cw1200_prepare_multicast(struct ieee80211_hw *hw, | |||
555 | pr_debug("[STA] multicast: %pM\n", ha->addr); | 556 | pr_debug("[STA] multicast: %pM\n", ha->addr); |
556 | memcpy(&priv->multicast_filter.macaddrs[count], | 557 | memcpy(&priv->multicast_filter.macaddrs[count], |
557 | ha->addr, ETH_ALEN); | 558 | ha->addr, ETH_ALEN); |
558 | if (memcmp(ha->addr, broadcast_ipv4, ETH_ALEN) && | 559 | if (!ether_addr_equal(ha->addr, broadcast_ipv4) && |
559 | memcmp(ha->addr, broadcast_ipv6, ETH_ALEN)) | 560 | !ether_addr_equal(ha->addr, broadcast_ipv6)) |
560 | priv->has_multicast_subscription = true; | 561 | priv->has_multicast_subscription = true; |
561 | count++; | 562 | count++; |
562 | } | 563 | } |
diff --git a/drivers/net/wireless/cw1200/txrx.c b/drivers/net/wireless/cw1200/txrx.c index e824d4d4a18d..0bd541175ecd 100644 --- a/drivers/net/wireless/cw1200/txrx.c +++ b/drivers/net/wireless/cw1200/txrx.c | |||
@@ -1166,8 +1166,7 @@ void cw1200_rx_cb(struct cw1200_common *priv, | |||
1166 | return; | 1166 | return; |
1167 | } else if (ieee80211_is_beacon(frame->frame_control) && | 1167 | } else if (ieee80211_is_beacon(frame->frame_control) && |
1168 | !arg->status && priv->vif && | 1168 | !arg->status && priv->vif && |
1169 | !memcmp(ieee80211_get_SA(frame), priv->vif->bss_conf.bssid, | 1169 | ether_addr_equal(ieee80211_get_SA(frame), priv->vif->bss_conf.bssid)) { |
1170 | ETH_ALEN)) { | ||
1171 | const u8 *tim_ie; | 1170 | const u8 *tim_ie; |
1172 | u8 *ies = ((struct ieee80211_mgmt *) | 1171 | u8 *ies = ((struct ieee80211_mgmt *) |
1173 | (skb->data))->u.beacon.variable; | 1172 | (skb->data))->u.beacon.variable; |
diff --git a/drivers/net/wireless/hostap/hostap_80211_rx.c b/drivers/net/wireless/hostap/hostap_80211_rx.c index d39e3e24077b..599f30f22841 100644 --- a/drivers/net/wireless/hostap/hostap_80211_rx.c +++ b/drivers/net/wireless/hostap/hostap_80211_rx.c | |||
@@ -563,7 +563,7 @@ hostap_rx_frame_wds(local_info_t *local, struct ieee80211_hdr *hdr, u16 fc, | |||
563 | 563 | ||
564 | /* Possible WDS frame: either IEEE 802.11 compliant (if FromDS) | 564 | /* Possible WDS frame: either IEEE 802.11 compliant (if FromDS) |
565 | * or own non-standard frame with 4th address after payload */ | 565 | * or own non-standard frame with 4th address after payload */ |
566 | if (memcmp(hdr->addr1, local->dev->dev_addr, ETH_ALEN) != 0 && | 566 | if (!ether_addr_equal(hdr->addr1, local->dev->dev_addr) && |
567 | (hdr->addr1[0] != 0xff || hdr->addr1[1] != 0xff || | 567 | (hdr->addr1[0] != 0xff || hdr->addr1[1] != 0xff || |
568 | hdr->addr1[2] != 0xff || hdr->addr1[3] != 0xff || | 568 | hdr->addr1[2] != 0xff || hdr->addr1[3] != 0xff || |
569 | hdr->addr1[4] != 0xff || hdr->addr1[5] != 0xff)) { | 569 | hdr->addr1[4] != 0xff || hdr->addr1[5] != 0xff)) { |
@@ -622,12 +622,12 @@ static int hostap_is_eapol_frame(local_info_t *local, struct sk_buff *skb) | |||
622 | /* check that the frame is unicast frame to us */ | 622 | /* check that the frame is unicast frame to us */ |
623 | if ((fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) == | 623 | if ((fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) == |
624 | IEEE80211_FCTL_TODS && | 624 | IEEE80211_FCTL_TODS && |
625 | memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN) == 0 && | 625 | ether_addr_equal(hdr->addr1, dev->dev_addr) && |
626 | memcmp(hdr->addr3, dev->dev_addr, ETH_ALEN) == 0) { | 626 | ether_addr_equal(hdr->addr3, dev->dev_addr)) { |
627 | /* ToDS frame with own addr BSSID and DA */ | 627 | /* ToDS frame with own addr BSSID and DA */ |
628 | } else if ((fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) == | 628 | } else if ((fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) == |
629 | IEEE80211_FCTL_FROMDS && | 629 | IEEE80211_FCTL_FROMDS && |
630 | memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN) == 0) { | 630 | ether_addr_equal(hdr->addr1, dev->dev_addr)) { |
631 | /* FromDS frame with own addr as DA */ | 631 | /* FromDS frame with own addr as DA */ |
632 | } else | 632 | } else |
633 | return 0; | 633 | return 0; |
diff --git a/drivers/net/wireless/hostap/hostap_80211_tx.c b/drivers/net/wireless/hostap/hostap_80211_tx.c index 344a981a052e..8bde77689469 100644 --- a/drivers/net/wireless/hostap/hostap_80211_tx.c +++ b/drivers/net/wireless/hostap/hostap_80211_tx.c | |||
@@ -1,5 +1,6 @@ | |||
1 | #include <linux/slab.h> | 1 | #include <linux/slab.h> |
2 | #include <linux/export.h> | 2 | #include <linux/export.h> |
3 | #include <linux/etherdevice.h> | ||
3 | 4 | ||
4 | #include "hostap_80211.h" | 5 | #include "hostap_80211.h" |
5 | #include "hostap_common.h" | 6 | #include "hostap_common.h" |
@@ -103,8 +104,7 @@ netdev_tx_t hostap_data_start_xmit(struct sk_buff *skb, | |||
103 | return NETDEV_TX_OK; | 104 | return NETDEV_TX_OK; |
104 | } else if (local->iw_mode == IW_MODE_INFRA && | 105 | } else if (local->iw_mode == IW_MODE_INFRA && |
105 | (local->wds_type & HOSTAP_WDS_AP_CLIENT) && | 106 | (local->wds_type & HOSTAP_WDS_AP_CLIENT) && |
106 | memcmp(skb->data + ETH_ALEN, dev->dev_addr, | 107 | !ether_addr_equal(skb->data + ETH_ALEN, dev->dev_addr)) { |
107 | ETH_ALEN) != 0) { | ||
108 | /* AP client mode: send frames with foreign src addr | 108 | /* AP client mode: send frames with foreign src addr |
109 | * using 4-addr WDS frames */ | 109 | * using 4-addr WDS frames */ |
110 | use_wds = WDS_COMPLIANT_FRAME; | 110 | use_wds = WDS_COMPLIANT_FRAME; |
diff --git a/drivers/net/wireless/hostap/hostap_ap.c b/drivers/net/wireless/hostap/hostap_ap.c index d6033a8e5dea..d36e252d2ccb 100644 --- a/drivers/net/wireless/hostap/hostap_ap.c +++ b/drivers/net/wireless/hostap/hostap_ap.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
25 | #include <linux/export.h> | 25 | #include <linux/export.h> |
26 | #include <linux/moduleparam.h> | 26 | #include <linux/moduleparam.h> |
27 | #include <linux/etherdevice.h> | ||
27 | 28 | ||
28 | #include "hostap_wlan.h" | 29 | #include "hostap_wlan.h" |
29 | #include "hostap.h" | 30 | #include "hostap.h" |
@@ -106,13 +107,12 @@ static void ap_sta_hash_del(struct ap_data *ap, struct sta_info *sta) | |||
106 | 107 | ||
107 | s = ap->sta_hash[STA_HASH(sta->addr)]; | 108 | s = ap->sta_hash[STA_HASH(sta->addr)]; |
108 | if (s == NULL) return; | 109 | if (s == NULL) return; |
109 | if (memcmp(s->addr, sta->addr, ETH_ALEN) == 0) { | 110 | if (ether_addr_equal(s->addr, sta->addr)) { |
110 | ap->sta_hash[STA_HASH(sta->addr)] = s->hnext; | 111 | ap->sta_hash[STA_HASH(sta->addr)] = s->hnext; |
111 | return; | 112 | return; |
112 | } | 113 | } |
113 | 114 | ||
114 | while (s->hnext != NULL && memcmp(s->hnext->addr, sta->addr, ETH_ALEN) | 115 | while (s->hnext != NULL && !ether_addr_equal(s->hnext->addr, sta->addr)) |
115 | != 0) | ||
116 | s = s->hnext; | 116 | s = s->hnext; |
117 | if (s->hnext != NULL) | 117 | if (s->hnext != NULL) |
118 | s->hnext = s->hnext->hnext; | 118 | s->hnext = s->hnext->hnext; |
@@ -435,7 +435,7 @@ int ap_control_del_mac(struct mac_restrictions *mac_restrictions, u8 *mac) | |||
435 | ptr != &mac_restrictions->mac_list; ptr = ptr->next) { | 435 | ptr != &mac_restrictions->mac_list; ptr = ptr->next) { |
436 | entry = list_entry(ptr, struct mac_entry, list); | 436 | entry = list_entry(ptr, struct mac_entry, list); |
437 | 437 | ||
438 | if (memcmp(entry->addr, mac, ETH_ALEN) == 0) { | 438 | if (ether_addr_equal(entry->addr, mac)) { |
439 | list_del(ptr); | 439 | list_del(ptr); |
440 | kfree(entry); | 440 | kfree(entry); |
441 | mac_restrictions->entries--; | 441 | mac_restrictions->entries--; |
@@ -459,7 +459,7 @@ static int ap_control_mac_deny(struct mac_restrictions *mac_restrictions, | |||
459 | 459 | ||
460 | spin_lock_bh(&mac_restrictions->lock); | 460 | spin_lock_bh(&mac_restrictions->lock); |
461 | list_for_each_entry(entry, &mac_restrictions->mac_list, list) { | 461 | list_for_each_entry(entry, &mac_restrictions->mac_list, list) { |
462 | if (memcmp(entry->addr, mac, ETH_ALEN) == 0) { | 462 | if (ether_addr_equal(entry->addr, mac)) { |
463 | found = 1; | 463 | found = 1; |
464 | break; | 464 | break; |
465 | } | 465 | } |
@@ -957,7 +957,7 @@ static struct sta_info* ap_get_sta(struct ap_data *ap, u8 *sta) | |||
957 | struct sta_info *s; | 957 | struct sta_info *s; |
958 | 958 | ||
959 | s = ap->sta_hash[STA_HASH(sta)]; | 959 | s = ap->sta_hash[STA_HASH(sta)]; |
960 | while (s != NULL && memcmp(s->addr, sta, ETH_ALEN) != 0) | 960 | while (s != NULL && !ether_addr_equal(s->addr, sta)) |
961 | s = s->hnext; | 961 | s = s->hnext; |
962 | return s; | 962 | return s; |
963 | } | 963 | } |
@@ -1391,7 +1391,7 @@ static void handle_authen(local_info_t *local, struct sk_buff *skb, | |||
1391 | status_code = __le16_to_cpu(*pos); | 1391 | status_code = __le16_to_cpu(*pos); |
1392 | pos++; | 1392 | pos++; |
1393 | 1393 | ||
1394 | if (memcmp(dev->dev_addr, hdr->addr2, ETH_ALEN) == 0 || | 1394 | if (ether_addr_equal(dev->dev_addr, hdr->addr2) || |
1395 | ap_control_mac_deny(&ap->mac_restrictions, hdr->addr2)) { | 1395 | ap_control_mac_deny(&ap->mac_restrictions, hdr->addr2)) { |
1396 | txt = "authentication denied"; | 1396 | txt = "authentication denied"; |
1397 | resp = WLAN_STATUS_UNSPECIFIED_FAILURE; | 1397 | resp = WLAN_STATUS_UNSPECIFIED_FAILURE; |
@@ -1935,7 +1935,7 @@ static void handle_pspoll(local_info_t *local, | |||
1935 | PDEBUG(DEBUG_PS2, "handle_pspoll: BSSID=%pM, TA=%pM PWRMGT=%d\n", | 1935 | PDEBUG(DEBUG_PS2, "handle_pspoll: BSSID=%pM, TA=%pM PWRMGT=%d\n", |
1936 | hdr->addr1, hdr->addr2, !!ieee80211_has_pm(hdr->frame_control)); | 1936 | hdr->addr1, hdr->addr2, !!ieee80211_has_pm(hdr->frame_control)); |
1937 | 1937 | ||
1938 | if (memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN)) { | 1938 | if (!ether_addr_equal(hdr->addr1, dev->dev_addr)) { |
1939 | PDEBUG(DEBUG_AP, | 1939 | PDEBUG(DEBUG_AP, |
1940 | "handle_pspoll - addr1(BSSID)=%pM not own MAC\n", | 1940 | "handle_pspoll - addr1(BSSID)=%pM not own MAC\n", |
1941 | hdr->addr1); | 1941 | hdr->addr1); |
@@ -2230,7 +2230,7 @@ static void handle_ap_item(local_info_t *local, struct sk_buff *skb, | |||
2230 | goto done; | 2230 | goto done; |
2231 | } | 2231 | } |
2232 | 2232 | ||
2233 | if (memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN)) { | 2233 | if (!ether_addr_equal(hdr->addr1, dev->dev_addr)) { |
2234 | PDEBUG(DEBUG_AP, "handle_ap_item - addr1(BSSID)=%pM" | 2234 | PDEBUG(DEBUG_AP, "handle_ap_item - addr1(BSSID)=%pM" |
2235 | " not own MAC\n", hdr->addr1); | 2235 | " not own MAC\n", hdr->addr1); |
2236 | goto done; | 2236 | goto done; |
@@ -2267,13 +2267,13 @@ static void handle_ap_item(local_info_t *local, struct sk_buff *skb, | |||
2267 | goto done; | 2267 | goto done; |
2268 | } | 2268 | } |
2269 | 2269 | ||
2270 | if (memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN)) { | 2270 | if (!ether_addr_equal(hdr->addr1, dev->dev_addr)) { |
2271 | PDEBUG(DEBUG_AP, "handle_ap_item - addr1(DA)=%pM" | 2271 | PDEBUG(DEBUG_AP, "handle_ap_item - addr1(DA)=%pM" |
2272 | " not own MAC\n", hdr->addr1); | 2272 | " not own MAC\n", hdr->addr1); |
2273 | goto done; | 2273 | goto done; |
2274 | } | 2274 | } |
2275 | 2275 | ||
2276 | if (memcmp(hdr->addr3, dev->dev_addr, ETH_ALEN)) { | 2276 | if (!ether_addr_equal(hdr->addr3, dev->dev_addr)) { |
2277 | PDEBUG(DEBUG_AP, "handle_ap_item - addr3(BSSID)=%pM" | 2277 | PDEBUG(DEBUG_AP, "handle_ap_item - addr3(BSSID)=%pM" |
2278 | " not own MAC\n", hdr->addr3); | 2278 | " not own MAC\n", hdr->addr3); |
2279 | goto done; | 2279 | goto done; |
@@ -3035,7 +3035,7 @@ ap_rx_ret hostap_handle_sta_rx(local_info_t *local, struct net_device *dev, | |||
3035 | if (!wds) { | 3035 | if (!wds) { |
3036 | /* FromDS frame - not for us; probably | 3036 | /* FromDS frame - not for us; probably |
3037 | * broadcast/multicast in another BSS - drop */ | 3037 | * broadcast/multicast in another BSS - drop */ |
3038 | if (memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN) == 0) { | 3038 | if (ether_addr_equal(hdr->addr1, dev->dev_addr)) { |
3039 | printk(KERN_DEBUG "Odd.. FromDS packet " | 3039 | printk(KERN_DEBUG "Odd.. FromDS packet " |
3040 | "received with own BSSID\n"); | 3040 | "received with own BSSID\n"); |
3041 | hostap_dump_rx_80211(dev->name, skb, rx_stats); | 3041 | hostap_dump_rx_80211(dev->name, skb, rx_stats); |
@@ -3044,7 +3044,7 @@ ap_rx_ret hostap_handle_sta_rx(local_info_t *local, struct net_device *dev, | |||
3044 | goto out; | 3044 | goto out; |
3045 | } | 3045 | } |
3046 | } else if (stype == IEEE80211_STYPE_NULLFUNC && sta == NULL && | 3046 | } else if (stype == IEEE80211_STYPE_NULLFUNC && sta == NULL && |
3047 | memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN) == 0) { | 3047 | ether_addr_equal(hdr->addr1, dev->dev_addr)) { |
3048 | 3048 | ||
3049 | if (local->hostapd) { | 3049 | if (local->hostapd) { |
3050 | prism2_rx_80211(local->apdev, skb, rx_stats, | 3050 | prism2_rx_80211(local->apdev, skb, rx_stats, |
@@ -3073,7 +3073,7 @@ ap_rx_ret hostap_handle_sta_rx(local_info_t *local, struct net_device *dev, | |||
3073 | /* If BSSID (Addr3) is foreign, this frame is a normal | 3073 | /* If BSSID (Addr3) is foreign, this frame is a normal |
3074 | * broadcast frame from an IBSS network. Drop it silently. | 3074 | * broadcast frame from an IBSS network. Drop it silently. |
3075 | * If BSSID is own, report the dropping of this frame. */ | 3075 | * If BSSID is own, report the dropping of this frame. */ |
3076 | if (memcmp(hdr->addr3, dev->dev_addr, ETH_ALEN) == 0) { | 3076 | if (ether_addr_equal(hdr->addr3, dev->dev_addr)) { |
3077 | printk(KERN_DEBUG "%s: dropped received packet from %pM" | 3077 | printk(KERN_DEBUG "%s: dropped received packet from %pM" |
3078 | " with no ToDS flag " | 3078 | " with no ToDS flag " |
3079 | "(type=0x%02x, subtype=0x%02x)\n", dev->name, | 3079 | "(type=0x%02x, subtype=0x%02x)\n", dev->name, |
diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c index c275dc1623fe..6df3ee561d52 100644 --- a/drivers/net/wireless/hostap/hostap_hw.c +++ b/drivers/net/wireless/hostap/hostap_hw.c | |||
@@ -2175,7 +2175,7 @@ static void hostap_tx_callback(local_info_t *local, | |||
2175 | struct hostap_tx_callback_info *cb; | 2175 | struct hostap_tx_callback_info *cb; |
2176 | 2176 | ||
2177 | /* Make sure that frame was from us. */ | 2177 | /* Make sure that frame was from us. */ |
2178 | if (memcmp(txdesc->addr2, local->dev->dev_addr, ETH_ALEN)) { | 2178 | if (!ether_addr_equal(txdesc->addr2, local->dev->dev_addr)) { |
2179 | printk(KERN_DEBUG "%s: TX callback - foreign frame\n", | 2179 | printk(KERN_DEBUG "%s: TX callback - foreign frame\n", |
2180 | local->dev->name); | 2180 | local->dev->name); |
2181 | return; | 2181 | return; |
diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c index 63e350affc7e..3e5fa7872b64 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, |
diff --git a/drivers/net/wireless/hostap/hostap_main.c b/drivers/net/wireless/hostap/hostap_main.c index a1257c92afc4..67db34e56d7e 100644 --- a/drivers/net/wireless/hostap/hostap_main.c +++ b/drivers/net/wireless/hostap/hostap_main.c | |||
@@ -155,8 +155,7 @@ int prism2_wds_add(local_info_t *local, u8 *remote_addr, | |||
155 | 155 | ||
156 | if (prism2_wds_special_addr(iface->u.wds.remote_addr)) | 156 | if (prism2_wds_special_addr(iface->u.wds.remote_addr)) |
157 | empty = iface; | 157 | empty = iface; |
158 | else if (memcmp(iface->u.wds.remote_addr, remote_addr, | 158 | else if (ether_addr_equal(iface->u.wds.remote_addr, remote_addr)) { |
159 | ETH_ALEN) == 0) { | ||
160 | match = iface; | 159 | match = iface; |
161 | break; | 160 | break; |
162 | } | 161 | } |
@@ -214,8 +213,7 @@ int prism2_wds_del(local_info_t *local, u8 *remote_addr, | |||
214 | if (iface->type != HOSTAP_INTERFACE_WDS) | 213 | if (iface->type != HOSTAP_INTERFACE_WDS) |
215 | continue; | 214 | continue; |
216 | 215 | ||
217 | if (memcmp(iface->u.wds.remote_addr, remote_addr, | 216 | if (ether_addr_equal(iface->u.wds.remote_addr, remote_addr)) { |
218 | ETH_ALEN) == 0) { | ||
219 | selected = iface; | 217 | selected = iface; |
220 | break; | 218 | break; |
221 | } | 219 | } |
@@ -1085,7 +1083,7 @@ int prism2_sta_deauth(local_info_t *local, u16 reason) | |||
1085 | 1083 | ||
1086 | if (local->iw_mode != IW_MODE_INFRA || | 1084 | if (local->iw_mode != IW_MODE_INFRA || |
1087 | is_zero_ether_addr(local->bssid) || | 1085 | is_zero_ether_addr(local->bssid) || |
1088 | memcmp(local->bssid, "\x44\x44\x44\x44\x44\x44", ETH_ALEN) == 0) | 1086 | ether_addr_equal(local->bssid, "\x44\x44\x44\x44\x44\x44")) |
1089 | return 0; | 1087 | return 0; |
1090 | 1088 | ||
1091 | ret = prism2_sta_send_mgmt(local, local->bssid, IEEE80211_STYPE_DEAUTH, | 1089 | ret = prism2_sta_send_mgmt(local, local->bssid, IEEE80211_STYPE_DEAUTH, |
diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c index 9244b3661d34..139326065bd9 100644 --- a/drivers/net/wireless/ipw2x00/ipw2200.c +++ b/drivers/net/wireless/ipw2x00/ipw2200.c | |||
@@ -3012,7 +3012,7 @@ static void ipw_remove_current_network(struct ipw_priv *priv) | |||
3012 | spin_lock_irqsave(&priv->ieee->lock, flags); | 3012 | spin_lock_irqsave(&priv->ieee->lock, flags); |
3013 | list_for_each_safe(element, safe, &priv->ieee->network_list) { | 3013 | list_for_each_safe(element, safe, &priv->ieee->network_list) { |
3014 | network = list_entry(element, struct libipw_network, list); | 3014 | network = list_entry(element, struct libipw_network, list); |
3015 | if (!memcmp(network->bssid, priv->bssid, ETH_ALEN)) { | 3015 | if (ether_addr_equal(network->bssid, priv->bssid)) { |
3016 | list_del(element); | 3016 | list_del(element); |
3017 | list_add_tail(&network->list, | 3017 | list_add_tail(&network->list, |
3018 | &priv->ieee->network_free_list); | 3018 | &priv->ieee->network_free_list); |
@@ -3921,7 +3921,7 @@ static u8 ipw_add_station(struct ipw_priv *priv, u8 * bssid) | |||
3921 | int i; | 3921 | int i; |
3922 | 3922 | ||
3923 | for (i = 0; i < priv->num_stations; i++) { | 3923 | for (i = 0; i < priv->num_stations; i++) { |
3924 | if (!memcmp(priv->stations[i], bssid, ETH_ALEN)) { | 3924 | if (ether_addr_equal(priv->stations[i], bssid)) { |
3925 | /* Another node is active in network */ | 3925 | /* Another node is active in network */ |
3926 | priv->missed_adhoc_beacons = 0; | 3926 | priv->missed_adhoc_beacons = 0; |
3927 | if (!(priv->config & CFG_STATIC_CHANNEL)) | 3927 | if (!(priv->config & CFG_STATIC_CHANNEL)) |
@@ -3953,7 +3953,7 @@ static u8 ipw_find_station(struct ipw_priv *priv, u8 * bssid) | |||
3953 | int i; | 3953 | int i; |
3954 | 3954 | ||
3955 | for (i = 0; i < priv->num_stations; i++) | 3955 | for (i = 0; i < priv->num_stations; i++) |
3956 | if (!memcmp(priv->stations[i], bssid, ETH_ALEN)) | 3956 | if (ether_addr_equal(priv->stations[i], bssid)) |
3957 | return i; | 3957 | return i; |
3958 | 3958 | ||
3959 | return IPW_INVALID_STATION; | 3959 | return IPW_INVALID_STATION; |
@@ -5622,7 +5622,7 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv, | |||
5622 | return 0; | 5622 | return 0; |
5623 | } | 5623 | } |
5624 | 5624 | ||
5625 | if (!memcmp(network->bssid, priv->bssid, ETH_ALEN)) { | 5625 | if (ether_addr_equal(network->bssid, priv->bssid)) { |
5626 | IPW_DEBUG_MERGE("Network '%s (%pM)' excluded " | 5626 | IPW_DEBUG_MERGE("Network '%s (%pM)' excluded " |
5627 | "because of the same BSSID match: %pM" | 5627 | "because of the same BSSID match: %pM" |
5628 | ".\n", print_ssid(ssid, network->ssid, | 5628 | ".\n", print_ssid(ssid, network->ssid, |
@@ -5849,7 +5849,7 @@ static int ipw_best_network(struct ipw_priv *priv, | |||
5849 | } | 5849 | } |
5850 | 5850 | ||
5851 | if ((priv->config & CFG_STATIC_BSSID) && | 5851 | if ((priv->config & CFG_STATIC_BSSID) && |
5852 | memcmp(network->bssid, priv->bssid, ETH_ALEN)) { | 5852 | !ether_addr_equal(network->bssid, priv->bssid)) { |
5853 | IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded " | 5853 | IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded " |
5854 | "because of BSSID mismatch: %pM.\n", | 5854 | "because of BSSID mismatch: %pM.\n", |
5855 | print_ssid(ssid, network->ssid, | 5855 | print_ssid(ssid, network->ssid, |
@@ -6988,7 +6988,7 @@ static int ipw_qos_handle_probe_response(struct ipw_priv *priv, | |||
6988 | } | 6988 | } |
6989 | if ((priv->status & STATUS_ASSOCIATED) && | 6989 | if ((priv->status & STATUS_ASSOCIATED) && |
6990 | (priv->ieee->iw_mode == IW_MODE_ADHOC) && (active_network == 0)) { | 6990 | (priv->ieee->iw_mode == IW_MODE_ADHOC) && (active_network == 0)) { |
6991 | if (memcmp(network->bssid, priv->bssid, ETH_ALEN)) | 6991 | if (!ether_addr_equal(network->bssid, priv->bssid)) |
6992 | if (network->capability & WLAN_CAPABILITY_IBSS) | 6992 | if (network->capability & WLAN_CAPABILITY_IBSS) |
6993 | if ((network->ssid_len == | 6993 | if ((network->ssid_len == |
6994 | priv->assoc_network->ssid_len) && | 6994 | priv->assoc_network->ssid_len) && |
@@ -8210,29 +8210,29 @@ static int is_network_packet(struct ipw_priv *priv, | |||
8210 | switch (priv->ieee->iw_mode) { | 8210 | switch (priv->ieee->iw_mode) { |
8211 | case IW_MODE_ADHOC: /* Header: Dest. | Source | BSSID */ | 8211 | case IW_MODE_ADHOC: /* Header: Dest. | Source | BSSID */ |
8212 | /* packets from our adapter are dropped (echo) */ | 8212 | /* packets from our adapter are dropped (echo) */ |
8213 | if (!memcmp(header->addr2, priv->net_dev->dev_addr, ETH_ALEN)) | 8213 | if (ether_addr_equal(header->addr2, priv->net_dev->dev_addr)) |
8214 | return 0; | 8214 | return 0; |
8215 | 8215 | ||
8216 | /* {broad,multi}cast packets to our BSSID go through */ | 8216 | /* {broad,multi}cast packets to our BSSID go through */ |
8217 | if (is_multicast_ether_addr(header->addr1)) | 8217 | if (is_multicast_ether_addr(header->addr1)) |
8218 | return !memcmp(header->addr3, priv->bssid, ETH_ALEN); | 8218 | return ether_addr_equal(header->addr3, priv->bssid); |
8219 | 8219 | ||
8220 | /* packets to our adapter go through */ | 8220 | /* packets to our adapter go through */ |
8221 | return !memcmp(header->addr1, priv->net_dev->dev_addr, | 8221 | return ether_addr_equal(header->addr1, |
8222 | ETH_ALEN); | 8222 | priv->net_dev->dev_addr); |
8223 | 8223 | ||
8224 | case IW_MODE_INFRA: /* Header: Dest. | BSSID | Source */ | 8224 | case IW_MODE_INFRA: /* Header: Dest. | BSSID | Source */ |
8225 | /* packets from our adapter are dropped (echo) */ | 8225 | /* packets from our adapter are dropped (echo) */ |
8226 | if (!memcmp(header->addr3, priv->net_dev->dev_addr, ETH_ALEN)) | 8226 | if (ether_addr_equal(header->addr3, priv->net_dev->dev_addr)) |
8227 | return 0; | 8227 | return 0; |
8228 | 8228 | ||
8229 | /* {broad,multi}cast packets to our BSS go through */ | 8229 | /* {broad,multi}cast packets to our BSS go through */ |
8230 | if (is_multicast_ether_addr(header->addr1)) | 8230 | if (is_multicast_ether_addr(header->addr1)) |
8231 | return !memcmp(header->addr2, priv->bssid, ETH_ALEN); | 8231 | return ether_addr_equal(header->addr2, priv->bssid); |
8232 | 8232 | ||
8233 | /* packets to our adapter go through */ | 8233 | /* packets to our adapter go through */ |
8234 | return !memcmp(header->addr1, priv->net_dev->dev_addr, | 8234 | return ether_addr_equal(header->addr1, |
8235 | ETH_ALEN); | 8235 | priv->net_dev->dev_addr); |
8236 | } | 8236 | } |
8237 | 8237 | ||
8238 | return 1; | 8238 | return 1; |
@@ -8260,7 +8260,7 @@ static int is_duplicate_packet(struct ipw_priv *priv, | |||
8260 | list_for_each(p, &priv->ibss_mac_hash[index]) { | 8260 | list_for_each(p, &priv->ibss_mac_hash[index]) { |
8261 | entry = | 8261 | entry = |
8262 | list_entry(p, struct ipw_ibss_seq, list); | 8262 | list_entry(p, struct ipw_ibss_seq, list); |
8263 | if (!memcmp(entry->mac, mac, ETH_ALEN)) | 8263 | if (ether_addr_equal(entry->mac, mac)) |
8264 | break; | 8264 | break; |
8265 | } | 8265 | } |
8266 | if (p == &priv->ibss_mac_hash[index]) { | 8266 | if (p == &priv->ibss_mac_hash[index]) { |
@@ -8329,7 +8329,7 @@ static void ipw_handle_mgmt_packet(struct ipw_priv *priv, | |||
8329 | IEEE80211_STYPE_PROBE_RESP) || | 8329 | IEEE80211_STYPE_PROBE_RESP) || |
8330 | (WLAN_FC_GET_STYPE(le16_to_cpu(header->frame_ctl)) == | 8330 | (WLAN_FC_GET_STYPE(le16_to_cpu(header->frame_ctl)) == |
8331 | IEEE80211_STYPE_BEACON))) { | 8331 | IEEE80211_STYPE_BEACON))) { |
8332 | if (!memcmp(header->addr3, priv->bssid, ETH_ALEN)) | 8332 | if (ether_addr_equal(header->addr3, priv->bssid)) |
8333 | ipw_add_station(priv, header->addr2); | 8333 | ipw_add_station(priv, header->addr2); |
8334 | } | 8334 | } |
8335 | 8335 | ||
@@ -9045,7 +9045,7 @@ static int ipw_wx_set_wap(struct net_device *dev, | |||
9045 | } | 9045 | } |
9046 | 9046 | ||
9047 | priv->config |= CFG_STATIC_BSSID; | 9047 | priv->config |= CFG_STATIC_BSSID; |
9048 | if (!memcmp(priv->bssid, wrqu->ap_addr.sa_data, ETH_ALEN)) { | 9048 | if (ether_addr_equal(priv->bssid, wrqu->ap_addr.sa_data)) { |
9049 | IPW_DEBUG_WX("BSSID set to current BSSID.\n"); | 9049 | IPW_DEBUG_WX("BSSID set to current BSSID.\n"); |
9050 | mutex_unlock(&priv->mutex); | 9050 | mutex_unlock(&priv->mutex); |
9051 | return 0; | 9051 | return 0; |
diff --git a/drivers/net/wireless/ipw2x00/libipw_rx.c b/drivers/net/wireless/ipw2x00/libipw_rx.c index ce2785948be1..a586a85bfcfe 100644 --- a/drivers/net/wireless/ipw2x00/libipw_rx.c +++ b/drivers/net/wireless/ipw2x00/libipw_rx.c | |||
@@ -874,13 +874,13 @@ void libipw_rx_any(struct libipw_device *ieee, | |||
874 | switch (ieee->iw_mode) { | 874 | switch (ieee->iw_mode) { |
875 | case IW_MODE_ADHOC: | 875 | case IW_MODE_ADHOC: |
876 | /* our BSS and not from/to DS */ | 876 | /* our BSS and not from/to DS */ |
877 | if (memcmp(hdr->addr3, ieee->bssid, ETH_ALEN) == 0) | 877 | if (ether_addr_equal(hdr->addr3, ieee->bssid)) |
878 | if ((fc & (IEEE80211_FCTL_TODS+IEEE80211_FCTL_FROMDS)) == 0) { | 878 | if ((fc & (IEEE80211_FCTL_TODS+IEEE80211_FCTL_FROMDS)) == 0) { |
879 | /* promisc: get all */ | 879 | /* promisc: get all */ |
880 | if (ieee->dev->flags & IFF_PROMISC) | 880 | if (ieee->dev->flags & IFF_PROMISC) |
881 | is_packet_for_us = 1; | 881 | is_packet_for_us = 1; |
882 | /* to us */ | 882 | /* to us */ |
883 | else if (memcmp(hdr->addr1, ieee->dev->dev_addr, ETH_ALEN) == 0) | 883 | else if (ether_addr_equal(hdr->addr1, ieee->dev->dev_addr)) |
884 | is_packet_for_us = 1; | 884 | is_packet_for_us = 1; |
885 | /* mcast */ | 885 | /* mcast */ |
886 | else if (is_multicast_ether_addr(hdr->addr1)) | 886 | else if (is_multicast_ether_addr(hdr->addr1)) |
@@ -889,18 +889,18 @@ void libipw_rx_any(struct libipw_device *ieee, | |||
889 | break; | 889 | break; |
890 | case IW_MODE_INFRA: | 890 | case IW_MODE_INFRA: |
891 | /* our BSS (== from our AP) and from DS */ | 891 | /* our BSS (== from our AP) and from DS */ |
892 | if (memcmp(hdr->addr2, ieee->bssid, ETH_ALEN) == 0) | 892 | if (ether_addr_equal(hdr->addr2, ieee->bssid)) |
893 | if ((fc & (IEEE80211_FCTL_TODS+IEEE80211_FCTL_FROMDS)) == IEEE80211_FCTL_FROMDS) { | 893 | if ((fc & (IEEE80211_FCTL_TODS+IEEE80211_FCTL_FROMDS)) == IEEE80211_FCTL_FROMDS) { |
894 | /* promisc: get all */ | 894 | /* promisc: get all */ |
895 | if (ieee->dev->flags & IFF_PROMISC) | 895 | if (ieee->dev->flags & IFF_PROMISC) |
896 | is_packet_for_us = 1; | 896 | is_packet_for_us = 1; |
897 | /* to us */ | 897 | /* to us */ |
898 | else if (memcmp(hdr->addr1, ieee->dev->dev_addr, ETH_ALEN) == 0) | 898 | else if (ether_addr_equal(hdr->addr1, ieee->dev->dev_addr)) |
899 | is_packet_for_us = 1; | 899 | is_packet_for_us = 1; |
900 | /* mcast */ | 900 | /* mcast */ |
901 | else if (is_multicast_ether_addr(hdr->addr1)) { | 901 | else if (is_multicast_ether_addr(hdr->addr1)) { |
902 | /* not our own packet bcasted from AP */ | 902 | /* not our own packet bcasted from AP */ |
903 | if (memcmp(hdr->addr3, ieee->dev->dev_addr, ETH_ALEN)) | 903 | if (!ether_addr_equal(hdr->addr3, ieee->dev->dev_addr)) |
904 | is_packet_for_us = 1; | 904 | is_packet_for_us = 1; |
905 | } | 905 | } |
906 | } | 906 | } |
diff --git a/drivers/net/wireless/iwlwifi/pcie/drv.c b/drivers/net/wireless/iwlwifi/pcie/drv.c index e58b8af56c04..3040924f5f3c 100644 --- a/drivers/net/wireless/iwlwifi/pcie/drv.c +++ b/drivers/net/wireless/iwlwifi/pcie/drv.c | |||
@@ -362,21 +362,27 @@ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = { | |||
362 | {IWL_PCI_DEVICE(0x095B, 0x5310, iwl7265_2ac_cfg)}, | 362 | {IWL_PCI_DEVICE(0x095B, 0x5310, iwl7265_2ac_cfg)}, |
363 | {IWL_PCI_DEVICE(0x095B, 0x5302, iwl7265_2ac_cfg)}, | 363 | {IWL_PCI_DEVICE(0x095B, 0x5302, iwl7265_2ac_cfg)}, |
364 | {IWL_PCI_DEVICE(0x095B, 0x5210, iwl7265_2ac_cfg)}, | 364 | {IWL_PCI_DEVICE(0x095B, 0x5210, iwl7265_2ac_cfg)}, |
365 | {IWL_PCI_DEVICE(0x095B, 0x5012, iwl7265_2ac_cfg)}, | 365 | {IWL_PCI_DEVICE(0x095A, 0x5012, iwl7265_2ac_cfg)}, |
366 | {IWL_PCI_DEVICE(0x095B, 0x500A, iwl7265_2ac_cfg)}, | 366 | {IWL_PCI_DEVICE(0x095A, 0x500A, iwl7265_2ac_cfg)}, |
367 | {IWL_PCI_DEVICE(0x095A, 0x5410, iwl7265_2ac_cfg)}, | 367 | {IWL_PCI_DEVICE(0x095A, 0x5410, iwl7265_2ac_cfg)}, |
368 | {IWL_PCI_DEVICE(0x095A, 0x5400, iwl7265_2ac_cfg)}, | ||
368 | {IWL_PCI_DEVICE(0x095A, 0x1010, iwl7265_2ac_cfg)}, | 369 | {IWL_PCI_DEVICE(0x095A, 0x1010, iwl7265_2ac_cfg)}, |
369 | {IWL_PCI_DEVICE(0x095A, 0x5000, iwl7265_2n_cfg)}, | 370 | {IWL_PCI_DEVICE(0x095A, 0x5000, iwl7265_2n_cfg)}, |
370 | {IWL_PCI_DEVICE(0x095B, 0x5200, iwl7265_2n_cfg)}, | 371 | {IWL_PCI_DEVICE(0x095B, 0x5200, iwl7265_2n_cfg)}, |
371 | {IWL_PCI_DEVICE(0x095A, 0x5002, iwl7265_n_cfg)}, | 372 | {IWL_PCI_DEVICE(0x095A, 0x5002, iwl7265_n_cfg)}, |
372 | {IWL_PCI_DEVICE(0x095B, 0x5202, iwl7265_n_cfg)}, | 373 | {IWL_PCI_DEVICE(0x095B, 0x5202, iwl7265_n_cfg)}, |
373 | {IWL_PCI_DEVICE(0x095A, 0x9010, iwl7265_2ac_cfg)}, | 374 | {IWL_PCI_DEVICE(0x095A, 0x9010, iwl7265_2ac_cfg)}, |
375 | {IWL_PCI_DEVICE(0x095A, 0x9110, iwl7265_2ac_cfg)}, | ||
374 | {IWL_PCI_DEVICE(0x095A, 0x9210, iwl7265_2ac_cfg)}, | 376 | {IWL_PCI_DEVICE(0x095A, 0x9210, iwl7265_2ac_cfg)}, |
377 | {IWL_PCI_DEVICE(0x095A, 0x9510, iwl7265_2ac_cfg)}, | ||
378 | {IWL_PCI_DEVICE(0x095A, 0x9310, iwl7265_2ac_cfg)}, | ||
375 | {IWL_PCI_DEVICE(0x095A, 0x9410, iwl7265_2ac_cfg)}, | 379 | {IWL_PCI_DEVICE(0x095A, 0x9410, iwl7265_2ac_cfg)}, |
376 | {IWL_PCI_DEVICE(0x095A, 0x5020, iwl7265_2n_cfg)}, | 380 | {IWL_PCI_DEVICE(0x095A, 0x5020, iwl7265_2n_cfg)}, |
377 | {IWL_PCI_DEVICE(0x095A, 0x502A, iwl7265_2n_cfg)}, | 381 | {IWL_PCI_DEVICE(0x095A, 0x502A, iwl7265_2n_cfg)}, |
378 | {IWL_PCI_DEVICE(0x095A, 0x5420, iwl7265_2n_cfg)}, | 382 | {IWL_PCI_DEVICE(0x095A, 0x5420, iwl7265_2n_cfg)}, |
379 | {IWL_PCI_DEVICE(0x095A, 0x5090, iwl7265_2ac_cfg)}, | 383 | {IWL_PCI_DEVICE(0x095A, 0x5090, iwl7265_2ac_cfg)}, |
384 | {IWL_PCI_DEVICE(0x095A, 0x5190, iwl7265_2ac_cfg)}, | ||
385 | {IWL_PCI_DEVICE(0x095A, 0x5590, iwl7265_2ac_cfg)}, | ||
380 | {IWL_PCI_DEVICE(0x095B, 0x5290, iwl7265_2ac_cfg)}, | 386 | {IWL_PCI_DEVICE(0x095B, 0x5290, iwl7265_2ac_cfg)}, |
381 | {IWL_PCI_DEVICE(0x095A, 0x5490, iwl7265_2ac_cfg)}, | 387 | {IWL_PCI_DEVICE(0x095A, 0x5490, iwl7265_2ac_cfg)}, |
382 | #endif /* CONFIG_IWLMVM */ | 388 | #endif /* CONFIG_IWLMVM */ |
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index dc7f72e3a4e7..69d4c3179d04 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c | |||
@@ -2296,7 +2296,7 @@ static int hwsim_tx_info_frame_received_nl(struct sk_buff *skb_2, | |||
2296 | (hwsim_flags & HWSIM_TX_STAT_ACK)) { | 2296 | (hwsim_flags & HWSIM_TX_STAT_ACK)) { |
2297 | if (skb->len >= 16) { | 2297 | if (skb->len >= 16) { |
2298 | hdr = (struct ieee80211_hdr *) skb->data; | 2298 | hdr = (struct ieee80211_hdr *) skb->data; |
2299 | mac80211_hwsim_monitor_ack(txi->rate_driver_data[0], | 2299 | mac80211_hwsim_monitor_ack(data2->channel, |
2300 | hdr->addr2); | 2300 | hdr->addr2); |
2301 | } | 2301 | } |
2302 | txi->flags |= IEEE80211_TX_STAT_ACK; | 2302 | txi->flags |= IEEE80211_TX_STAT_ACK; |
diff --git a/drivers/net/wireless/mwifiex/11n.c b/drivers/net/wireless/mwifiex/11n.c index 0b803c05cab3..6261f8c53d44 100644 --- a/drivers/net/wireless/mwifiex/11n.c +++ b/drivers/net/wireless/mwifiex/11n.c | |||
@@ -483,7 +483,7 @@ mwifiex_get_ba_tbl(struct mwifiex_private *priv, int tid, u8 *ra) | |||
483 | 483 | ||
484 | spin_lock_irqsave(&priv->tx_ba_stream_tbl_lock, flags); | 484 | spin_lock_irqsave(&priv->tx_ba_stream_tbl_lock, flags); |
485 | list_for_each_entry(tx_ba_tsr_tbl, &priv->tx_ba_stream_tbl_ptr, list) { | 485 | list_for_each_entry(tx_ba_tsr_tbl, &priv->tx_ba_stream_tbl_ptr, list) { |
486 | if (!memcmp(tx_ba_tsr_tbl->ra, ra, ETH_ALEN) && | 486 | if (ether_addr_equal_unaligned(tx_ba_tsr_tbl->ra, ra) && |
487 | tx_ba_tsr_tbl->tid == tid) { | 487 | tx_ba_tsr_tbl->tid == tid) { |
488 | spin_unlock_irqrestore(&priv->tx_ba_stream_tbl_lock, | 488 | spin_unlock_irqrestore(&priv->tx_ba_stream_tbl_lock, |
489 | flags); | 489 | flags); |
diff --git a/drivers/net/wireless/mwifiex/main.c b/drivers/net/wireless/mwifiex/main.c index 2d6f5e1721cf..4d79761b9c87 100644 --- a/drivers/net/wireless/mwifiex/main.c +++ b/drivers/net/wireless/mwifiex/main.c | |||
@@ -747,7 +747,8 @@ static struct net_device_stats *mwifiex_get_stats(struct net_device *dev) | |||
747 | } | 747 | } |
748 | 748 | ||
749 | static u16 | 749 | static u16 |
750 | mwifiex_netdev_select_wmm_queue(struct net_device *dev, struct sk_buff *skb) | 750 | mwifiex_netdev_select_wmm_queue(struct net_device *dev, struct sk_buff *skb, |
751 | void *accel_priv) | ||
751 | { | 752 | { |
752 | skb->priority = cfg80211_classify8021d(skb, NULL); | 753 | skb->priority = cfg80211_classify8021d(skb, NULL); |
753 | return mwifiex_1d_to_wmm_queue[skb->priority]; | 754 | return mwifiex_1d_to_wmm_queue[skb->priority]; |
diff --git a/drivers/net/wireless/mwifiex/sta_cmdresp.c b/drivers/net/wireless/mwifiex/sta_cmdresp.c index 551194605aa7..24523e4015cb 100644 --- a/drivers/net/wireless/mwifiex/sta_cmdresp.c +++ b/drivers/net/wireless/mwifiex/sta_cmdresp.c | |||
@@ -782,8 +782,7 @@ static int mwifiex_ret_ibss_coalescing_status(struct mwifiex_private *priv, | |||
782 | } | 782 | } |
783 | 783 | ||
784 | /* If BSSID is diff, modify current BSS parameters */ | 784 | /* If BSSID is diff, modify current BSS parameters */ |
785 | if (memcmp(priv->curr_bss_params.bss_descriptor.mac_address, | 785 | if (!ether_addr_equal(priv->curr_bss_params.bss_descriptor.mac_address, ibss_coal_resp->bssid)) { |
786 | ibss_coal_resp->bssid, ETH_ALEN)) { | ||
787 | /* BSSID */ | 786 | /* BSSID */ |
788 | memcpy(priv->curr_bss_params.bss_descriptor.mac_address, | 787 | memcpy(priv->curr_bss_params.bss_descriptor.mac_address, |
789 | ibss_coal_resp->bssid, ETH_ALEN); | 788 | ibss_coal_resp->bssid, ETH_ALEN); |
diff --git a/drivers/net/wireless/mwifiex/sta_rx.c b/drivers/net/wireless/mwifiex/sta_rx.c index 0bb510de8071..4651d676df38 100644 --- a/drivers/net/wireless/mwifiex/sta_rx.c +++ b/drivers/net/wireless/mwifiex/sta_rx.c | |||
@@ -224,7 +224,7 @@ int mwifiex_process_sta_rx_packet(struct mwifiex_private *priv, | |||
224 | * directly to os. Don't pass thru rx reordering | 224 | * directly to os. Don't pass thru rx reordering |
225 | */ | 225 | */ |
226 | if (!IS_11N_ENABLED(priv) || | 226 | if (!IS_11N_ENABLED(priv) || |
227 | memcmp(priv->curr_addr, rx_pkt_hdr->eth803_hdr.h_dest, ETH_ALEN)) { | 227 | !ether_addr_equal_unaligned(priv->curr_addr, rx_pkt_hdr->eth803_hdr.h_dest)) { |
228 | mwifiex_process_rx_packet(priv, skb); | 228 | mwifiex_process_rx_packet(priv, skb); |
229 | return ret; | 229 | return ret; |
230 | } | 230 | } |
diff --git a/drivers/net/wireless/prism54/isl_ioctl.c b/drivers/net/wireless/prism54/isl_ioctl.c index df784fefb8e3..78fa64d3f223 100644 --- a/drivers/net/wireless/prism54/isl_ioctl.c +++ b/drivers/net/wireless/prism54/isl_ioctl.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/if_arp.h> | 24 | #include <linux/if_arp.h> |
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/pci.h> | 26 | #include <linux/pci.h> |
27 | #include <linux/etherdevice.h> | ||
27 | 28 | ||
28 | #include <asm/uaccess.h> | 29 | #include <asm/uaccess.h> |
29 | 30 | ||
@@ -1860,7 +1861,7 @@ prism54_del_mac(struct net_device *ndev, struct iw_request_info *info, | |||
1860 | if (mutex_lock_interruptible(&acl->lock)) | 1861 | if (mutex_lock_interruptible(&acl->lock)) |
1861 | return -ERESTARTSYS; | 1862 | return -ERESTARTSYS; |
1862 | list_for_each_entry(entry, &acl->mac_list, _list) { | 1863 | list_for_each_entry(entry, &acl->mac_list, _list) { |
1863 | if (memcmp(entry->addr, addr->sa_data, ETH_ALEN) == 0) { | 1864 | if (ether_addr_equal(entry->addr, addr->sa_data)) { |
1864 | list_del(&entry->_list); | 1865 | list_del(&entry->_list); |
1865 | acl->size--; | 1866 | acl->size--; |
1866 | kfree(entry); | 1867 | kfree(entry); |
diff --git a/drivers/net/wireless/rtlwifi/cam.c b/drivers/net/wireless/rtlwifi/cam.c index 0e510f73041a..0276153c72cc 100644 --- a/drivers/net/wireless/rtlwifi/cam.c +++ b/drivers/net/wireless/rtlwifi/cam.c | |||
@@ -295,7 +295,7 @@ u8 rtl_cam_get_free_entry(struct ieee80211_hw *hw, u8 *sta_addr) | |||
295 | /* Does STA already exist? */ | 295 | /* Does STA already exist? */ |
296 | for (i = 4; i < TOTAL_CAM_ENTRY; i++) { | 296 | for (i = 4; i < TOTAL_CAM_ENTRY; i++) { |
297 | addr = rtlpriv->sec.hwsec_cam_sta_addr[i]; | 297 | addr = rtlpriv->sec.hwsec_cam_sta_addr[i]; |
298 | if (memcmp(addr, sta_addr, ETH_ALEN) == 0) | 298 | if (ether_addr_equal_unaligned(addr, sta_addr)) |
299 | return i; | 299 | return i; |
300 | } | 300 | } |
301 | /* Get a free CAM entry. */ | 301 | /* Get a free CAM entry. */ |
@@ -335,7 +335,7 @@ void rtl_cam_del_entry(struct ieee80211_hw *hw, u8 *sta_addr) | |||
335 | addr = rtlpriv->sec.hwsec_cam_sta_addr[i]; | 335 | addr = rtlpriv->sec.hwsec_cam_sta_addr[i]; |
336 | bitmap = (rtlpriv->sec.hwsec_cam_bitmap) >> i; | 336 | bitmap = (rtlpriv->sec.hwsec_cam_bitmap) >> i; |
337 | if (((bitmap & BIT(0)) == BIT(0)) && | 337 | if (((bitmap & BIT(0)) == BIT(0)) && |
338 | (memcmp(addr, sta_addr, ETH_ALEN) == 0)) { | 338 | (ether_addr_equal_unaligned(addr, sta_addr))) { |
339 | /* Remove from HW Security CAM */ | 339 | /* Remove from HW Security CAM */ |
340 | eth_zero_addr(rtlpriv->sec.hwsec_cam_sta_addr[i]); | 340 | eth_zero_addr(rtlpriv->sec.hwsec_cam_sta_addr[i]); |
341 | rtlpriv->sec.hwsec_cam_bitmap &= ~(BIT(0) << i); | 341 | rtlpriv->sec.hwsec_cam_bitmap &= ~(BIT(0) << i); |
diff --git a/drivers/net/wireless/ti/wl1251/main.c b/drivers/net/wireless/ti/wl1251/main.c index fa3909a72ad6..757e25784a8a 100644 --- a/drivers/net/wireless/ti/wl1251/main.c +++ b/drivers/net/wireless/ti/wl1251/main.c | |||
@@ -525,7 +525,7 @@ static int wl1251_op_add_interface(struct ieee80211_hw *hw, | |||
525 | goto out; | 525 | goto out; |
526 | } | 526 | } |
527 | 527 | ||
528 | if (memcmp(wl->mac_addr, vif->addr, ETH_ALEN)) { | 528 | if (!ether_addr_equal_unaligned(wl->mac_addr, vif->addr)) { |
529 | memcpy(wl->mac_addr, vif->addr, ETH_ALEN); | 529 | memcpy(wl->mac_addr, vif->addr, ETH_ALEN); |
530 | SET_IEEE80211_PERM_ADDR(wl->hw, wl->mac_addr); | 530 | SET_IEEE80211_PERM_ADDR(wl->hw, wl->mac_addr); |
531 | ret = wl1251_acx_station_id(wl); | 531 | ret = wl1251_acx_station_id(wl); |
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c index 1f5987d142c1..d24d4a958c67 100644 --- a/drivers/net/wireless/wl3501_cs.c +++ b/drivers/net/wireless/wl3501_cs.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <linux/string.h> | 43 | #include <linux/string.h> |
44 | #include <linux/wireless.h> | 44 | #include <linux/wireless.h> |
45 | #include <linux/ieee80211.h> | 45 | #include <linux/ieee80211.h> |
46 | #include <linux/etherdevice.h> | ||
46 | 47 | ||
47 | #include <net/iw_handler.h> | 48 | #include <net/iw_handler.h> |
48 | 49 | ||
@@ -672,8 +673,7 @@ static void wl3501_mgmt_scan_confirm(struct wl3501_card *this, u16 addr) | |||
672 | matchflag = 1; | 673 | matchflag = 1; |
673 | if (matchflag) { | 674 | if (matchflag) { |
674 | for (i = 0; i < this->bss_cnt; i++) { | 675 | for (i = 0; i < this->bss_cnt; i++) { |
675 | if (!memcmp(this->bss_set[i].bssid, | 676 | if (ether_addr_equal_unaligned(this->bss_set[i].bssid, sig.bssid)) { |
676 | sig.bssid, ETH_ALEN)) { | ||
677 | matchflag = 0; | 677 | matchflag = 0; |
678 | break; | 678 | break; |
679 | } | 679 | } |
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c index eff79a37bc2a..e7af261e9198 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.c +++ b/drivers/net/wireless/zd1211rw/zd_mac.c | |||
@@ -532,9 +532,8 @@ void zd_mac_tx_failed(struct urb *urb) | |||
532 | tx_hdr = (struct ieee80211_hdr *)skb->data; | 532 | tx_hdr = (struct ieee80211_hdr *)skb->data; |
533 | 533 | ||
534 | /* we skip all frames not matching the reported destination */ | 534 | /* we skip all frames not matching the reported destination */ |
535 | if (unlikely(memcmp(tx_hdr->addr1, tx_status->mac, ETH_ALEN))) { | 535 | if (unlikely(!ether_addr_equal(tx_hdr->addr1, tx_status->mac))) |
536 | continue; | 536 | continue; |
537 | } | ||
538 | 537 | ||
539 | /* we skip all frames not matching the reported final rate */ | 538 | /* we skip all frames not matching the reported final rate */ |
540 | 539 | ||
@@ -997,7 +996,7 @@ static int filter_ack(struct ieee80211_hw *hw, struct ieee80211_hdr *rx_hdr, | |||
997 | continue; | 996 | continue; |
998 | 997 | ||
999 | tx_hdr = (struct ieee80211_hdr *)skb->data; | 998 | tx_hdr = (struct ieee80211_hdr *)skb->data; |
1000 | if (likely(!memcmp(tx_hdr->addr2, rx_hdr->addr1, ETH_ALEN))) | 999 | if (likely(ether_addr_equal(tx_hdr->addr2, rx_hdr->addr1))) |
1001 | { | 1000 | { |
1002 | found = 1; | 1001 | found = 1; |
1003 | break; | 1002 | break; |