diff options
-rw-r--r-- | net/mac80211/cfg.c | 2 | ||||
-rw-r--r-- | net/mac80211/ibss.c | 12 | ||||
-rw-r--r-- | net/mac80211/ieee80211_i.h | 2 | ||||
-rw-r--r-- | net/mac80211/iface.c | 2 | ||||
-rw-r--r-- | net/mac80211/mesh.c | 4 | ||||
-rw-r--r-- | net/mac80211/mesh_hwmp.c | 14 | ||||
-rw-r--r-- | net/mac80211/mesh_pathtbl.c | 12 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 29 | ||||
-rw-r--r-- | net/mac80211/rx.c | 35 | ||||
-rw-r--r-- | net/mac80211/scan.c | 2 | ||||
-rw-r--r-- | net/mac80211/sta_info.c | 8 | ||||
-rw-r--r-- | net/mac80211/status.c | 2 | ||||
-rw-r--r-- | net/mac80211/tx.c | 11 |
13 files changed, 64 insertions, 71 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 70b2af2315a6..7e6781f8c57e 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -919,7 +919,7 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev, | |||
919 | } else | 919 | } else |
920 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 920 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
921 | 921 | ||
922 | if (compare_ether_addr(mac, sdata->vif.addr) == 0) | 922 | if (ether_addr_equal(mac, sdata->vif.addr)) |
923 | return -EINVAL; | 923 | return -EINVAL; |
924 | 924 | ||
925 | if (is_multicast_ether_addr(mac)) | 925 | if (is_multicast_ether_addr(mac)) |
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index 61cd391c32a3..d307d3b3e32a 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
@@ -66,7 +66,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, | |||
66 | skb_reset_tail_pointer(skb); | 66 | skb_reset_tail_pointer(skb); |
67 | skb_reserve(skb, sdata->local->hw.extra_tx_headroom); | 67 | skb_reserve(skb, sdata->local->hw.extra_tx_headroom); |
68 | 68 | ||
69 | if (compare_ether_addr(ifibss->bssid, bssid)) | 69 | if (!ether_addr_equal(ifibss->bssid, bssid)) |
70 | sta_info_flush(sdata->local, sdata); | 70 | sta_info_flush(sdata->local, sdata); |
71 | 71 | ||
72 | /* if merging, indicate to driver that we leave the old IBSS */ | 72 | /* if merging, indicate to driver that we leave the old IBSS */ |
@@ -315,7 +315,7 @@ ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata, | |||
315 | return NULL; | 315 | return NULL; |
316 | } | 316 | } |
317 | 317 | ||
318 | if (compare_ether_addr(bssid, sdata->u.ibss.bssid)) { | 318 | if (!ether_addr_equal(bssid, sdata->u.ibss.bssid)) { |
319 | rcu_read_lock(); | 319 | rcu_read_lock(); |
320 | return NULL; | 320 | return NULL; |
321 | } | 321 | } |
@@ -401,7 +401,7 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata, | |||
401 | return; | 401 | return; |
402 | 402 | ||
403 | if (sdata->vif.type == NL80211_IFTYPE_ADHOC && | 403 | if (sdata->vif.type == NL80211_IFTYPE_ADHOC && |
404 | compare_ether_addr(mgmt->bssid, sdata->u.ibss.bssid) == 0) { | 404 | ether_addr_equal(mgmt->bssid, sdata->u.ibss.bssid)) { |
405 | 405 | ||
406 | rcu_read_lock(); | 406 | rcu_read_lock(); |
407 | sta = sta_info_get(sdata, mgmt->sa); | 407 | sta = sta_info_get(sdata, mgmt->sa); |
@@ -506,7 +506,7 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata, | |||
506 | goto put_bss; | 506 | goto put_bss; |
507 | 507 | ||
508 | /* same BSSID */ | 508 | /* same BSSID */ |
509 | if (compare_ether_addr(cbss->bssid, sdata->u.ibss.bssid) == 0) | 509 | if (ether_addr_equal(cbss->bssid, sdata->u.ibss.bssid)) |
510 | goto put_bss; | 510 | goto put_bss; |
511 | 511 | ||
512 | if (rx_status->flag & RX_FLAG_MACTIME_MPDU) { | 512 | if (rx_status->flag & RX_FLAG_MACTIME_MPDU) { |
@@ -591,7 +591,7 @@ void ieee80211_ibss_rx_no_sta(struct ieee80211_sub_if_data *sdata, | |||
591 | if (ifibss->state == IEEE80211_IBSS_MLME_SEARCH) | 591 | if (ifibss->state == IEEE80211_IBSS_MLME_SEARCH) |
592 | return; | 592 | return; |
593 | 593 | ||
594 | if (compare_ether_addr(bssid, sdata->u.ibss.bssid)) | 594 | if (!ether_addr_equal(bssid, sdata->u.ibss.bssid)) |
595 | return; | 595 | return; |
596 | 596 | ||
597 | sta = sta_info_alloc(sdata, addr, GFP_ATOMIC); | 597 | sta = sta_info_alloc(sdata, addr, GFP_ATOMIC); |
@@ -829,7 +829,7 @@ static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata, | |||
829 | if (!tx_last_beacon && is_multicast_ether_addr(mgmt->da)) | 829 | if (!tx_last_beacon && is_multicast_ether_addr(mgmt->da)) |
830 | return; | 830 | return; |
831 | 831 | ||
832 | if (compare_ether_addr(mgmt->bssid, ifibss->bssid) != 0 && | 832 | if (!ether_addr_equal(mgmt->bssid, ifibss->bssid) && |
833 | !is_broadcast_ether_addr(mgmt->bssid)) | 833 | !is_broadcast_ether_addr(mgmt->bssid)) |
834 | return; | 834 | return; |
835 | 835 | ||
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 6cd89d414f22..fabee974bf6d 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -1195,7 +1195,7 @@ static inline struct ieee80211_local *hw_to_local( | |||
1195 | 1195 | ||
1196 | static inline int ieee80211_bssid_match(const u8 *raddr, const u8 *addr) | 1196 | static inline int ieee80211_bssid_match(const u8 *raddr, const u8 *addr) |
1197 | { | 1197 | { |
1198 | return compare_ether_addr(raddr, addr) == 0 || | 1198 | return ether_addr_equal(raddr, addr) || |
1199 | is_broadcast_ether_addr(raddr); | 1199 | is_broadcast_ether_addr(raddr); |
1200 | } | 1200 | } |
1201 | 1201 | ||
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 3e05a8bfddf0..856237c5c1f8 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -127,7 +127,7 @@ static int ieee80211_check_concurrent_iface(struct ieee80211_sub_if_data *sdata, | |||
127 | * The remaining checks are only performed for interfaces | 127 | * The remaining checks are only performed for interfaces |
128 | * with the same MAC address. | 128 | * with the same MAC address. |
129 | */ | 129 | */ |
130 | if (compare_ether_addr(dev->dev_addr, ndev->dev_addr)) | 130 | if (!ether_addr_equal(dev->dev_addr, ndev->dev_addr)) |
131 | continue; | 131 | continue; |
132 | 132 | ||
133 | /* | 133 | /* |
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index 598a96a3a051..775627166e48 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c | |||
@@ -209,7 +209,7 @@ int mesh_rmc_check(u8 *sa, struct ieee80211s_hdr *mesh_hdr, | |||
209 | kmem_cache_free(rm_cache, p); | 209 | kmem_cache_free(rm_cache, p); |
210 | --entries; | 210 | --entries; |
211 | } else if ((seqnum == p->seqnum) && | 211 | } else if ((seqnum == p->seqnum) && |
212 | (compare_ether_addr(sa, p->sa) == 0)) | 212 | (ether_addr_equal(sa, p->sa))) |
213 | return -1; | 213 | return -1; |
214 | } | 214 | } |
215 | 215 | ||
@@ -639,7 +639,7 @@ static void ieee80211_mesh_rx_bcn_presp(struct ieee80211_sub_if_data *sdata, | |||
639 | 639 | ||
640 | /* ignore ProbeResp to foreign address */ | 640 | /* ignore ProbeResp to foreign address */ |
641 | if (stype == IEEE80211_STYPE_PROBE_RESP && | 641 | if (stype == IEEE80211_STYPE_PROBE_RESP && |
642 | compare_ether_addr(mgmt->da, sdata->vif.addr)) | 642 | !ether_addr_equal(mgmt->da, sdata->vif.addr)) |
643 | return; | 643 | return; |
644 | 644 | ||
645 | baselen = (u8 *) mgmt->u.probe_resp.variable - (u8 *) mgmt; | 645 | baselen = (u8 *) mgmt->u.probe_resp.variable - (u8 *) mgmt; |
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c index 503016f58631..27e0c2f06795 100644 --- a/net/mac80211/mesh_hwmp.c +++ b/net/mac80211/mesh_hwmp.c | |||
@@ -422,7 +422,7 @@ static u32 hwmp_route_info_get(struct ieee80211_sub_if_data *sdata, | |||
422 | new_metric = MAX_METRIC; | 422 | new_metric = MAX_METRIC; |
423 | exp_time = TU_TO_EXP_TIME(orig_lifetime); | 423 | exp_time = TU_TO_EXP_TIME(orig_lifetime); |
424 | 424 | ||
425 | if (compare_ether_addr(orig_addr, sdata->vif.addr) == 0) { | 425 | if (ether_addr_equal(orig_addr, sdata->vif.addr)) { |
426 | /* This MP is the originator, we are not interested in this | 426 | /* This MP is the originator, we are not interested in this |
427 | * frame, except for updating transmitter's path info. | 427 | * frame, except for updating transmitter's path info. |
428 | */ | 428 | */ |
@@ -472,7 +472,7 @@ static u32 hwmp_route_info_get(struct ieee80211_sub_if_data *sdata, | |||
472 | 472 | ||
473 | /* Update and check transmitter routing info */ | 473 | /* Update and check transmitter routing info */ |
474 | ta = mgmt->sa; | 474 | ta = mgmt->sa; |
475 | if (compare_ether_addr(orig_addr, ta) == 0) | 475 | if (ether_addr_equal(orig_addr, ta)) |
476 | fresh_info = false; | 476 | fresh_info = false; |
477 | else { | 477 | else { |
478 | fresh_info = true; | 478 | fresh_info = true; |
@@ -533,7 +533,7 @@ static void hwmp_preq_frame_process(struct ieee80211_sub_if_data *sdata, | |||
533 | 533 | ||
534 | mhwmp_dbg("received PREQ from %pM", orig_addr); | 534 | mhwmp_dbg("received PREQ from %pM", orig_addr); |
535 | 535 | ||
536 | if (compare_ether_addr(target_addr, sdata->vif.addr) == 0) { | 536 | if (ether_addr_equal(target_addr, sdata->vif.addr)) { |
537 | mhwmp_dbg("PREQ is for us"); | 537 | mhwmp_dbg("PREQ is for us"); |
538 | forward = false; | 538 | forward = false; |
539 | reply = true; | 539 | reply = true; |
@@ -631,7 +631,7 @@ static void hwmp_prep_frame_process(struct ieee80211_sub_if_data *sdata, | |||
631 | mhwmp_dbg("received PREP from %pM", PREP_IE_ORIG_ADDR(prep_elem)); | 631 | mhwmp_dbg("received PREP from %pM", PREP_IE_ORIG_ADDR(prep_elem)); |
632 | 632 | ||
633 | orig_addr = PREP_IE_ORIG_ADDR(prep_elem); | 633 | orig_addr = PREP_IE_ORIG_ADDR(prep_elem); |
634 | if (compare_ether_addr(orig_addr, sdata->vif.addr) == 0) | 634 | if (ether_addr_equal(orig_addr, sdata->vif.addr)) |
635 | /* destination, no forwarding required */ | 635 | /* destination, no forwarding required */ |
636 | return; | 636 | return; |
637 | 637 | ||
@@ -709,7 +709,7 @@ static void hwmp_perr_frame_process(struct ieee80211_sub_if_data *sdata, | |||
709 | spin_lock_bh(&mpath->state_lock); | 709 | spin_lock_bh(&mpath->state_lock); |
710 | sta = next_hop_deref_protected(mpath); | 710 | sta = next_hop_deref_protected(mpath); |
711 | if (mpath->flags & MESH_PATH_ACTIVE && | 711 | if (mpath->flags & MESH_PATH_ACTIVE && |
712 | compare_ether_addr(ta, sta->sta.addr) == 0 && | 712 | ether_addr_equal(ta, sta->sta.addr) && |
713 | (!(mpath->flags & MESH_PATH_SN_VALID) || | 713 | (!(mpath->flags & MESH_PATH_SN_VALID) || |
714 | SN_GT(target_sn, mpath->sn))) { | 714 | SN_GT(target_sn, mpath->sn))) { |
715 | mpath->flags &= ~MESH_PATH_ACTIVE; | 715 | mpath->flags &= ~MESH_PATH_ACTIVE; |
@@ -756,7 +756,7 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata, | |||
756 | metric = le32_to_cpu(rann->rann_metric); | 756 | metric = le32_to_cpu(rann->rann_metric); |
757 | 757 | ||
758 | /* Ignore our own RANNs */ | 758 | /* Ignore our own RANNs */ |
759 | if (compare_ether_addr(orig_addr, sdata->vif.addr) == 0) | 759 | if (ether_addr_equal(orig_addr, sdata->vif.addr)) |
760 | return; | 760 | return; |
761 | 761 | ||
762 | mhwmp_dbg("received RANN from %pM via neighbour %pM (is_gate=%d)", | 762 | mhwmp_dbg("received RANN from %pM via neighbour %pM (is_gate=%d)", |
@@ -1099,7 +1099,7 @@ int mesh_nexthop_lookup(struct sk_buff *skb, | |||
1099 | if (time_after(jiffies, | 1099 | if (time_after(jiffies, |
1100 | mpath->exp_time - | 1100 | mpath->exp_time - |
1101 | msecs_to_jiffies(sdata->u.mesh.mshcfg.path_refresh_time)) && | 1101 | msecs_to_jiffies(sdata->u.mesh.mshcfg.path_refresh_time)) && |
1102 | !compare_ether_addr(sdata->vif.addr, hdr->addr4) && | 1102 | ether_addr_equal(sdata->vif.addr, hdr->addr4) && |
1103 | !(mpath->flags & MESH_PATH_RESOLVING) && | 1103 | !(mpath->flags & MESH_PATH_RESOLVING) && |
1104 | !(mpath->flags & MESH_PATH_FIXED)) | 1104 | !(mpath->flags & MESH_PATH_FIXED)) |
1105 | mesh_queue_preq(mpath, PREQ_Q_F_START | PREQ_Q_F_REFRESH); | 1105 | mesh_queue_preq(mpath, PREQ_Q_F_START | PREQ_Q_F_REFRESH); |
diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c index baa6096c66b4..b39224d8255c 100644 --- a/net/mac80211/mesh_pathtbl.c +++ b/net/mac80211/mesh_pathtbl.c | |||
@@ -348,7 +348,7 @@ static struct mesh_path *mpath_lookup(struct mesh_table *tbl, u8 *dst, | |||
348 | hlist_for_each_entry_rcu(node, n, bucket, list) { | 348 | hlist_for_each_entry_rcu(node, n, bucket, list) { |
349 | mpath = node->mpath; | 349 | mpath = node->mpath; |
350 | if (mpath->sdata == sdata && | 350 | if (mpath->sdata == sdata && |
351 | compare_ether_addr(dst, mpath->dst) == 0) { | 351 | ether_addr_equal(dst, mpath->dst)) { |
352 | if (MPATH_EXPIRED(mpath)) { | 352 | if (MPATH_EXPIRED(mpath)) { |
353 | spin_lock_bh(&mpath->state_lock); | 353 | spin_lock_bh(&mpath->state_lock); |
354 | mpath->flags &= ~MESH_PATH_ACTIVE; | 354 | mpath->flags &= ~MESH_PATH_ACTIVE; |
@@ -517,7 +517,7 @@ int mesh_path_add(u8 *dst, struct ieee80211_sub_if_data *sdata) | |||
517 | int err = 0; | 517 | int err = 0; |
518 | u32 hash_idx; | 518 | u32 hash_idx; |
519 | 519 | ||
520 | if (compare_ether_addr(dst, sdata->vif.addr) == 0) | 520 | if (ether_addr_equal(dst, sdata->vif.addr)) |
521 | /* never add ourselves as neighbours */ | 521 | /* never add ourselves as neighbours */ |
522 | return -ENOTSUPP; | 522 | return -ENOTSUPP; |
523 | 523 | ||
@@ -561,7 +561,7 @@ int mesh_path_add(u8 *dst, struct ieee80211_sub_if_data *sdata) | |||
561 | hlist_for_each_entry(node, n, bucket, list) { | 561 | hlist_for_each_entry(node, n, bucket, list) { |
562 | mpath = node->mpath; | 562 | mpath = node->mpath; |
563 | if (mpath->sdata == sdata && | 563 | if (mpath->sdata == sdata && |
564 | compare_ether_addr(dst, mpath->dst) == 0) | 564 | ether_addr_equal(dst, mpath->dst)) |
565 | goto err_exists; | 565 | goto err_exists; |
566 | } | 566 | } |
567 | 567 | ||
@@ -652,7 +652,7 @@ int mpp_path_add(u8 *dst, u8 *mpp, struct ieee80211_sub_if_data *sdata) | |||
652 | int err = 0; | 652 | int err = 0; |
653 | u32 hash_idx; | 653 | u32 hash_idx; |
654 | 654 | ||
655 | if (compare_ether_addr(dst, sdata->vif.addr) == 0) | 655 | if (ether_addr_equal(dst, sdata->vif.addr)) |
656 | /* never add ourselves as neighbours */ | 656 | /* never add ourselves as neighbours */ |
657 | return -ENOTSUPP; | 657 | return -ENOTSUPP; |
658 | 658 | ||
@@ -690,7 +690,7 @@ int mpp_path_add(u8 *dst, u8 *mpp, struct ieee80211_sub_if_data *sdata) | |||
690 | hlist_for_each_entry(node, n, bucket, list) { | 690 | hlist_for_each_entry(node, n, bucket, list) { |
691 | mpath = node->mpath; | 691 | mpath = node->mpath; |
692 | if (mpath->sdata == sdata && | 692 | if (mpath->sdata == sdata && |
693 | compare_ether_addr(dst, mpath->dst) == 0) | 693 | ether_addr_equal(dst, mpath->dst)) |
694 | goto err_exists; | 694 | goto err_exists; |
695 | } | 695 | } |
696 | 696 | ||
@@ -884,7 +884,7 @@ int mesh_path_del(u8 *addr, struct ieee80211_sub_if_data *sdata) | |||
884 | hlist_for_each_entry(node, n, bucket, list) { | 884 | hlist_for_each_entry(node, n, bucket, list) { |
885 | mpath = node->mpath; | 885 | mpath = node->mpath; |
886 | if (mpath->sdata == sdata && | 886 | if (mpath->sdata == sdata && |
887 | compare_ether_addr(addr, mpath->dst) == 0) { | 887 | ether_addr_equal(addr, mpath->dst)) { |
888 | __mesh_path_del(tbl, node); | 888 | __mesh_path_del(tbl, node); |
889 | goto enddel; | 889 | goto enddel; |
890 | } | 890 | } |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 03f93f958fa4..b1c617fdabd6 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -1776,7 +1776,7 @@ ieee80211_rx_mgmt_auth(struct ieee80211_sub_if_data *sdata, | |||
1776 | 1776 | ||
1777 | memcpy(bssid, ifmgd->auth_data->bss->bssid, ETH_ALEN); | 1777 | memcpy(bssid, ifmgd->auth_data->bss->bssid, ETH_ALEN); |
1778 | 1778 | ||
1779 | if (compare_ether_addr(bssid, mgmt->bssid)) | 1779 | if (!ether_addr_equal(bssid, mgmt->bssid)) |
1780 | return RX_MGMT_NONE; | 1780 | return RX_MGMT_NONE; |
1781 | 1781 | ||
1782 | auth_alg = le16_to_cpu(mgmt->u.auth.auth_alg); | 1782 | auth_alg = le16_to_cpu(mgmt->u.auth.auth_alg); |
@@ -1853,7 +1853,7 @@ ieee80211_rx_mgmt_deauth(struct ieee80211_sub_if_data *sdata, | |||
1853 | return RX_MGMT_NONE; | 1853 | return RX_MGMT_NONE; |
1854 | 1854 | ||
1855 | if (!ifmgd->associated || | 1855 | if (!ifmgd->associated || |
1856 | compare_ether_addr(mgmt->bssid, ifmgd->associated->bssid)) | 1856 | !ether_addr_equal(mgmt->bssid, ifmgd->associated->bssid)) |
1857 | return RX_MGMT_NONE; | 1857 | return RX_MGMT_NONE; |
1858 | 1858 | ||
1859 | bssid = ifmgd->associated->bssid; | 1859 | bssid = ifmgd->associated->bssid; |
@@ -1886,7 +1886,7 @@ ieee80211_rx_mgmt_disassoc(struct ieee80211_sub_if_data *sdata, | |||
1886 | return RX_MGMT_NONE; | 1886 | return RX_MGMT_NONE; |
1887 | 1887 | ||
1888 | if (!ifmgd->associated || | 1888 | if (!ifmgd->associated || |
1889 | compare_ether_addr(mgmt->bssid, ifmgd->associated->bssid)) | 1889 | !ether_addr_equal(mgmt->bssid, ifmgd->associated->bssid)) |
1890 | return RX_MGMT_NONE; | 1890 | return RX_MGMT_NONE; |
1891 | 1891 | ||
1892 | reason_code = le16_to_cpu(mgmt->u.disassoc.reason_code); | 1892 | reason_code = le16_to_cpu(mgmt->u.disassoc.reason_code); |
@@ -2113,7 +2113,7 @@ ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata, | |||
2113 | 2113 | ||
2114 | if (!assoc_data) | 2114 | if (!assoc_data) |
2115 | return RX_MGMT_NONE; | 2115 | return RX_MGMT_NONE; |
2116 | if (compare_ether_addr(assoc_data->bss->bssid, mgmt->bssid)) | 2116 | if (!ether_addr_equal(assoc_data->bss->bssid, mgmt->bssid)) |
2117 | return RX_MGMT_NONE; | 2117 | return RX_MGMT_NONE; |
2118 | 2118 | ||
2119 | /* | 2119 | /* |
@@ -2193,8 +2193,7 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata, | |||
2193 | bool need_ps = false; | 2193 | bool need_ps = false; |
2194 | 2194 | ||
2195 | if (sdata->u.mgd.associated && | 2195 | if (sdata->u.mgd.associated && |
2196 | compare_ether_addr(mgmt->bssid, sdata->u.mgd.associated->bssid) | 2196 | ether_addr_equal(mgmt->bssid, sdata->u.mgd.associated->bssid)) { |
2197 | == 0) { | ||
2198 | bss = (void *)sdata->u.mgd.associated->priv; | 2197 | bss = (void *)sdata->u.mgd.associated->priv; |
2199 | /* not previously set so we may need to recalc */ | 2198 | /* not previously set so we may need to recalc */ |
2200 | need_ps = !bss->dtim_period; | 2199 | need_ps = !bss->dtim_period; |
@@ -2249,7 +2248,7 @@ static void ieee80211_rx_mgmt_probe_resp(struct ieee80211_sub_if_data *sdata, | |||
2249 | 2248 | ||
2250 | ASSERT_MGD_MTX(ifmgd); | 2249 | ASSERT_MGD_MTX(ifmgd); |
2251 | 2250 | ||
2252 | if (compare_ether_addr(mgmt->da, sdata->vif.addr)) | 2251 | if (!ether_addr_equal(mgmt->da, sdata->vif.addr)) |
2253 | return; /* ignore ProbeResp to foreign address */ | 2252 | return; /* ignore ProbeResp to foreign address */ |
2254 | 2253 | ||
2255 | baselen = (u8 *) mgmt->u.probe_resp.variable - (u8 *) mgmt; | 2254 | baselen = (u8 *) mgmt->u.probe_resp.variable - (u8 *) mgmt; |
@@ -2262,12 +2261,11 @@ static void ieee80211_rx_mgmt_probe_resp(struct ieee80211_sub_if_data *sdata, | |||
2262 | ieee80211_rx_bss_info(sdata, mgmt, len, rx_status, &elems, false); | 2261 | ieee80211_rx_bss_info(sdata, mgmt, len, rx_status, &elems, false); |
2263 | 2262 | ||
2264 | if (ifmgd->associated && | 2263 | if (ifmgd->associated && |
2265 | compare_ether_addr(mgmt->bssid, ifmgd->associated->bssid) == 0) | 2264 | ether_addr_equal(mgmt->bssid, ifmgd->associated->bssid)) |
2266 | ieee80211_reset_ap_probe(sdata); | 2265 | ieee80211_reset_ap_probe(sdata); |
2267 | 2266 | ||
2268 | if (ifmgd->auth_data && !ifmgd->auth_data->bss->proberesp_ies && | 2267 | if (ifmgd->auth_data && !ifmgd->auth_data->bss->proberesp_ies && |
2269 | compare_ether_addr(mgmt->bssid, ifmgd->auth_data->bss->bssid) | 2268 | ether_addr_equal(mgmt->bssid, ifmgd->auth_data->bss->bssid)) { |
2270 | == 0) { | ||
2271 | /* got probe response, continue with auth */ | 2269 | /* got probe response, continue with auth */ |
2272 | printk(KERN_DEBUG "%s: direct probe responded\n", sdata->name); | 2270 | printk(KERN_DEBUG "%s: direct probe responded\n", sdata->name); |
2273 | ifmgd->auth_data->tries = 0; | 2271 | ifmgd->auth_data->tries = 0; |
@@ -2324,8 +2322,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata, | |||
2324 | return; | 2322 | return; |
2325 | 2323 | ||
2326 | if (ifmgd->assoc_data && !ifmgd->assoc_data->have_beacon && | 2324 | if (ifmgd->assoc_data && !ifmgd->assoc_data->have_beacon && |
2327 | compare_ether_addr(mgmt->bssid, ifmgd->assoc_data->bss->bssid) | 2325 | ether_addr_equal(mgmt->bssid, ifmgd->assoc_data->bss->bssid)) { |
2328 | == 0) { | ||
2329 | ieee802_11_parse_elems(mgmt->u.beacon.variable, | 2326 | ieee802_11_parse_elems(mgmt->u.beacon.variable, |
2330 | len - baselen, &elems); | 2327 | len - baselen, &elems); |
2331 | 2328 | ||
@@ -2340,7 +2337,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata, | |||
2340 | } | 2337 | } |
2341 | 2338 | ||
2342 | if (!ifmgd->associated || | 2339 | if (!ifmgd->associated || |
2343 | compare_ether_addr(mgmt->bssid, ifmgd->associated->bssid)) | 2340 | !ether_addr_equal(mgmt->bssid, ifmgd->associated->bssid)) |
2344 | return; | 2341 | return; |
2345 | bssid = ifmgd->associated->bssid; | 2342 | bssid = ifmgd->associated->bssid; |
2346 | 2343 | ||
@@ -3166,7 +3163,7 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata, | |||
3166 | return err; | 3163 | return err; |
3167 | } | 3164 | } |
3168 | } else | 3165 | } else |
3169 | WARN_ON_ONCE(compare_ether_addr(ifmgd->bssid, cbss->bssid)); | 3166 | WARN_ON_ONCE(!ether_addr_equal(ifmgd->bssid, cbss->bssid)); |
3170 | 3167 | ||
3171 | return 0; | 3168 | return 0; |
3172 | } | 3169 | } |
@@ -3306,7 +3303,7 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata, | |||
3306 | bool match; | 3303 | bool match; |
3307 | 3304 | ||
3308 | /* keep sta info, bssid if matching */ | 3305 | /* keep sta info, bssid if matching */ |
3309 | match = compare_ether_addr(ifmgd->bssid, req->bss->bssid) == 0; | 3306 | match = ether_addr_equal(ifmgd->bssid, req->bss->bssid); |
3310 | ieee80211_destroy_auth_data(sdata, match); | 3307 | ieee80211_destroy_auth_data(sdata, match); |
3311 | } | 3308 | } |
3312 | 3309 | ||
@@ -3466,7 +3463,7 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata, | |||
3466 | sdata->name, req->bssid, req->reason_code); | 3463 | sdata->name, req->bssid, req->reason_code); |
3467 | 3464 | ||
3468 | if (ifmgd->associated && | 3465 | if (ifmgd->associated && |
3469 | compare_ether_addr(ifmgd->associated->bssid, req->bssid) == 0) | 3466 | ether_addr_equal(ifmgd->associated->bssid, req->bssid)) |
3470 | ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH, | 3467 | ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH, |
3471 | req->reason_code, true, frame_buf); | 3468 | req->reason_code, true, frame_buf); |
3472 | else | 3469 | else |
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index d5ac02fe37ff..26bfd6fcaa48 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -492,12 +492,12 @@ ieee80211_rx_mesh_check(struct ieee80211_rx_data *rx) | |||
492 | if (ieee80211_has_tods(hdr->frame_control) || | 492 | if (ieee80211_has_tods(hdr->frame_control) || |
493 | !ieee80211_has_fromds(hdr->frame_control)) | 493 | !ieee80211_has_fromds(hdr->frame_control)) |
494 | return RX_DROP_MONITOR; | 494 | return RX_DROP_MONITOR; |
495 | if (compare_ether_addr(hdr->addr3, dev_addr) == 0) | 495 | if (ether_addr_equal(hdr->addr3, dev_addr)) |
496 | return RX_DROP_MONITOR; | 496 | return RX_DROP_MONITOR; |
497 | } else { | 497 | } else { |
498 | if (!ieee80211_has_a4(hdr->frame_control)) | 498 | if (!ieee80211_has_a4(hdr->frame_control)) |
499 | return RX_DROP_MONITOR; | 499 | return RX_DROP_MONITOR; |
500 | if (compare_ether_addr(hdr->addr4, dev_addr) == 0) | 500 | if (ether_addr_equal(hdr->addr4, dev_addr)) |
501 | return RX_DROP_MONITOR; | 501 | return RX_DROP_MONITOR; |
502 | } | 502 | } |
503 | } | 503 | } |
@@ -1275,7 +1275,7 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx) | |||
1275 | if (rx->sdata->vif.type == NL80211_IFTYPE_ADHOC) { | 1275 | if (rx->sdata->vif.type == NL80211_IFTYPE_ADHOC) { |
1276 | u8 *bssid = ieee80211_get_bssid(hdr, rx->skb->len, | 1276 | u8 *bssid = ieee80211_get_bssid(hdr, rx->skb->len, |
1277 | NL80211_IFTYPE_ADHOC); | 1277 | NL80211_IFTYPE_ADHOC); |
1278 | if (compare_ether_addr(bssid, rx->sdata->u.ibss.bssid) == 0) { | 1278 | if (ether_addr_equal(bssid, rx->sdata->u.ibss.bssid)) { |
1279 | sta->last_rx = jiffies; | 1279 | sta->last_rx = jiffies; |
1280 | if (ieee80211_is_data(hdr->frame_control)) { | 1280 | if (ieee80211_is_data(hdr->frame_control)) { |
1281 | sta->last_rx_rate_idx = status->rate_idx; | 1281 | sta->last_rx_rate_idx = status->rate_idx; |
@@ -1438,8 +1438,8 @@ ieee80211_reassemble_find(struct ieee80211_sub_if_data *sdata, | |||
1438 | */ | 1438 | */ |
1439 | if (((hdr->frame_control ^ f_hdr->frame_control) & | 1439 | if (((hdr->frame_control ^ f_hdr->frame_control) & |
1440 | cpu_to_le16(IEEE80211_FCTL_FTYPE)) || | 1440 | cpu_to_le16(IEEE80211_FCTL_FTYPE)) || |
1441 | compare_ether_addr(hdr->addr1, f_hdr->addr1) != 0 || | 1441 | !ether_addr_equal(hdr->addr1, f_hdr->addr1) || |
1442 | compare_ether_addr(hdr->addr2, f_hdr->addr2) != 0) | 1442 | !ether_addr_equal(hdr->addr2, f_hdr->addr2)) |
1443 | continue; | 1443 | continue; |
1444 | 1444 | ||
1445 | if (time_after(jiffies, entry->first_frag_time + 2 * HZ)) { | 1445 | if (time_after(jiffies, entry->first_frag_time + 2 * HZ)) { |
@@ -1925,7 +1925,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx) | |||
1925 | mpp_path_add(proxied_addr, mpp_addr, sdata); | 1925 | mpp_path_add(proxied_addr, mpp_addr, sdata); |
1926 | } else { | 1926 | } else { |
1927 | spin_lock_bh(&mppath->state_lock); | 1927 | spin_lock_bh(&mppath->state_lock); |
1928 | if (compare_ether_addr(mppath->mpp, mpp_addr) != 0) | 1928 | if (!ether_addr_equal(mppath->mpp, mpp_addr)) |
1929 | memcpy(mppath->mpp, mpp_addr, ETH_ALEN); | 1929 | memcpy(mppath->mpp, mpp_addr, ETH_ALEN); |
1930 | spin_unlock_bh(&mppath->state_lock); | 1930 | spin_unlock_bh(&mppath->state_lock); |
1931 | } | 1931 | } |
@@ -1934,7 +1934,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx) | |||
1934 | 1934 | ||
1935 | /* Frame has reached destination. Don't forward */ | 1935 | /* Frame has reached destination. Don't forward */ |
1936 | if (!is_multicast_ether_addr(hdr->addr1) && | 1936 | if (!is_multicast_ether_addr(hdr->addr1) && |
1937 | compare_ether_addr(sdata->vif.addr, hdr->addr3) == 0) | 1937 | ether_addr_equal(sdata->vif.addr, hdr->addr3)) |
1938 | return RX_CONTINUE; | 1938 | return RX_CONTINUE; |
1939 | 1939 | ||
1940 | q = ieee80211_select_queue_80211(local, skb, hdr); | 1940 | q = ieee80211_select_queue_80211(local, skb, hdr); |
@@ -2122,13 +2122,13 @@ static void ieee80211_process_sa_query_req(struct ieee80211_sub_if_data *sdata, | |||
2122 | struct sk_buff *skb; | 2122 | struct sk_buff *skb; |
2123 | struct ieee80211_mgmt *resp; | 2123 | struct ieee80211_mgmt *resp; |
2124 | 2124 | ||
2125 | if (compare_ether_addr(mgmt->da, sdata->vif.addr) != 0) { | 2125 | if (!ether_addr_equal(mgmt->da, sdata->vif.addr)) { |
2126 | /* Not to own unicast address */ | 2126 | /* Not to own unicast address */ |
2127 | return; | 2127 | return; |
2128 | } | 2128 | } |
2129 | 2129 | ||
2130 | if (compare_ether_addr(mgmt->sa, sdata->u.mgd.bssid) != 0 || | 2130 | if (!ether_addr_equal(mgmt->sa, sdata->u.mgd.bssid) || |
2131 | compare_ether_addr(mgmt->bssid, sdata->u.mgd.bssid) != 0) { | 2131 | !ether_addr_equal(mgmt->bssid, sdata->u.mgd.bssid)) { |
2132 | /* Not from the current AP or not associated yet. */ | 2132 | /* Not from the current AP or not associated yet. */ |
2133 | return; | 2133 | return; |
2134 | } | 2134 | } |
@@ -2338,7 +2338,7 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) | |||
2338 | if (sdata->vif.type != NL80211_IFTYPE_STATION) | 2338 | if (sdata->vif.type != NL80211_IFTYPE_STATION) |
2339 | break; | 2339 | break; |
2340 | 2340 | ||
2341 | if (compare_ether_addr(mgmt->bssid, sdata->u.mgd.bssid)) | 2341 | if (!ether_addr_equal(mgmt->bssid, sdata->u.mgd.bssid)) |
2342 | break; | 2342 | break; |
2343 | 2343 | ||
2344 | goto queue; | 2344 | goto queue; |
@@ -2772,7 +2772,7 @@ static int prepare_for_handlers(struct ieee80211_rx_data *rx, | |||
2772 | if (!bssid && !sdata->u.mgd.use_4addr) | 2772 | if (!bssid && !sdata->u.mgd.use_4addr) |
2773 | return 0; | 2773 | return 0; |
2774 | if (!multicast && | 2774 | if (!multicast && |
2775 | compare_ether_addr(sdata->vif.addr, hdr->addr1) != 0) { | 2775 | !ether_addr_equal(sdata->vif.addr, hdr->addr1)) { |
2776 | if (!(sdata->dev->flags & IFF_PROMISC) || | 2776 | if (!(sdata->dev->flags & IFF_PROMISC) || |
2777 | sdata->u.mgd.use_4addr) | 2777 | sdata->u.mgd.use_4addr) |
2778 | return 0; | 2778 | return 0; |
@@ -2790,8 +2790,7 @@ static int prepare_for_handlers(struct ieee80211_rx_data *rx, | |||
2790 | return 0; | 2790 | return 0; |
2791 | status->rx_flags &= ~IEEE80211_RX_RA_MATCH; | 2791 | status->rx_flags &= ~IEEE80211_RX_RA_MATCH; |
2792 | } else if (!multicast && | 2792 | } else if (!multicast && |
2793 | compare_ether_addr(sdata->vif.addr, | 2793 | !ether_addr_equal(sdata->vif.addr, hdr->addr1)) { |
2794 | hdr->addr1) != 0) { | ||
2795 | if (!(sdata->dev->flags & IFF_PROMISC)) | 2794 | if (!(sdata->dev->flags & IFF_PROMISC)) |
2796 | return 0; | 2795 | return 0; |
2797 | status->rx_flags &= ~IEEE80211_RX_RA_MATCH; | 2796 | status->rx_flags &= ~IEEE80211_RX_RA_MATCH; |
@@ -2807,8 +2806,7 @@ static int prepare_for_handlers(struct ieee80211_rx_data *rx, | |||
2807 | break; | 2806 | break; |
2808 | case NL80211_IFTYPE_MESH_POINT: | 2807 | case NL80211_IFTYPE_MESH_POINT: |
2809 | if (!multicast && | 2808 | if (!multicast && |
2810 | compare_ether_addr(sdata->vif.addr, | 2809 | !ether_addr_equal(sdata->vif.addr, hdr->addr1)) { |
2811 | hdr->addr1) != 0) { | ||
2812 | if (!(sdata->dev->flags & IFF_PROMISC)) | 2810 | if (!(sdata->dev->flags & IFF_PROMISC)) |
2813 | return 0; | 2811 | return 0; |
2814 | 2812 | ||
@@ -2818,8 +2816,7 @@ static int prepare_for_handlers(struct ieee80211_rx_data *rx, | |||
2818 | case NL80211_IFTYPE_AP_VLAN: | 2816 | case NL80211_IFTYPE_AP_VLAN: |
2819 | case NL80211_IFTYPE_AP: | 2817 | case NL80211_IFTYPE_AP: |
2820 | if (!bssid) { | 2818 | if (!bssid) { |
2821 | if (compare_ether_addr(sdata->vif.addr, | 2819 | if (!ether_addr_equal(sdata->vif.addr, hdr->addr1)) |
2822 | hdr->addr1)) | ||
2823 | return 0; | 2820 | return 0; |
2824 | } else if (!ieee80211_bssid_match(bssid, | 2821 | } else if (!ieee80211_bssid_match(bssid, |
2825 | sdata->vif.addr)) { | 2822 | sdata->vif.addr)) { |
@@ -2841,7 +2838,7 @@ static int prepare_for_handlers(struct ieee80211_rx_data *rx, | |||
2841 | case NL80211_IFTYPE_WDS: | 2838 | case NL80211_IFTYPE_WDS: |
2842 | if (bssid || !ieee80211_is_data(hdr->frame_control)) | 2839 | if (bssid || !ieee80211_is_data(hdr->frame_control)) |
2843 | return 0; | 2840 | return 0; |
2844 | if (compare_ether_addr(sdata->u.wds.remote_addr, hdr->addr2)) | 2841 | if (!ether_addr_equal(sdata->u.wds.remote_addr, hdr->addr2)) |
2845 | return 0; | 2842 | return 0; |
2846 | break; | 2843 | break; |
2847 | default: | 2844 | default: |
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 8282284f835c..169da0742c81 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
@@ -194,7 +194,7 @@ ieee80211_scan_rx(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb) | |||
194 | presp = ieee80211_is_probe_resp(fc); | 194 | presp = ieee80211_is_probe_resp(fc); |
195 | if (presp) { | 195 | if (presp) { |
196 | /* ignore ProbeResp to foreign address */ | 196 | /* ignore ProbeResp to foreign address */ |
197 | if (compare_ether_addr(mgmt->da, sdata->vif.addr)) | 197 | if (!ether_addr_equal(mgmt->da, sdata->vif.addr)) |
198 | return RX_DROP_MONITOR; | 198 | return RX_DROP_MONITOR; |
199 | 199 | ||
200 | presp = true; | 200 | presp = true; |
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 97a9d6639fb9..f5b1638fbf80 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
@@ -102,7 +102,7 @@ struct sta_info *sta_info_get(struct ieee80211_sub_if_data *sdata, | |||
102 | lockdep_is_held(&local->sta_mtx)); | 102 | lockdep_is_held(&local->sta_mtx)); |
103 | while (sta) { | 103 | while (sta) { |
104 | if (sta->sdata == sdata && | 104 | if (sta->sdata == sdata && |
105 | compare_ether_addr(sta->sta.addr, addr) == 0) | 105 | ether_addr_equal(sta->sta.addr, addr)) |
106 | break; | 106 | break; |
107 | sta = rcu_dereference_check(sta->hnext, | 107 | sta = rcu_dereference_check(sta->hnext, |
108 | lockdep_is_held(&local->sta_mtx)); | 108 | lockdep_is_held(&local->sta_mtx)); |
@@ -125,7 +125,7 @@ struct sta_info *sta_info_get_bss(struct ieee80211_sub_if_data *sdata, | |||
125 | while (sta) { | 125 | while (sta) { |
126 | if ((sta->sdata == sdata || | 126 | if ((sta->sdata == sdata || |
127 | (sta->sdata->bss && sta->sdata->bss == sdata->bss)) && | 127 | (sta->sdata->bss && sta->sdata->bss == sdata->bss)) && |
128 | compare_ether_addr(sta->sta.addr, addr) == 0) | 128 | ether_addr_equal(sta->sta.addr, addr)) |
129 | break; | 129 | break; |
130 | sta = rcu_dereference_check(sta->hnext, | 130 | sta = rcu_dereference_check(sta->hnext, |
131 | lockdep_is_held(&local->sta_mtx)); | 131 | lockdep_is_held(&local->sta_mtx)); |
@@ -302,7 +302,7 @@ static int sta_info_insert_check(struct sta_info *sta) | |||
302 | if (unlikely(!ieee80211_sdata_running(sdata))) | 302 | if (unlikely(!ieee80211_sdata_running(sdata))) |
303 | return -ENETDOWN; | 303 | return -ENETDOWN; |
304 | 304 | ||
305 | if (WARN_ON(compare_ether_addr(sta->sta.addr, sdata->vif.addr) == 0 || | 305 | if (WARN_ON(ether_addr_equal(sta->sta.addr, sdata->vif.addr) || |
306 | is_multicast_ether_addr(sta->sta.addr))) | 306 | is_multicast_ether_addr(sta->sta.addr))) |
307 | return -EINVAL; | 307 | return -EINVAL; |
308 | 308 | ||
@@ -912,7 +912,7 @@ struct ieee80211_sta *ieee80211_find_sta_by_ifaddr(struct ieee80211_hw *hw, | |||
912 | */ | 912 | */ |
913 | for_each_sta_info(hw_to_local(hw), addr, sta, nxt) { | 913 | for_each_sta_info(hw_to_local(hw), addr, sta, nxt) { |
914 | if (localaddr && | 914 | if (localaddr && |
915 | compare_ether_addr(sta->sdata->vif.addr, localaddr) != 0) | 915 | !ether_addr_equal(sta->sdata->vif.addr, localaddr)) |
916 | continue; | 916 | continue; |
917 | if (!sta->uploaded) | 917 | if (!sta->uploaded) |
918 | return NULL; | 918 | return NULL; |
diff --git a/net/mac80211/status.c b/net/mac80211/status.c index 05f257aa2e08..28cfa981cfb1 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c | |||
@@ -384,7 +384,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
384 | 384 | ||
385 | for_each_sta_info(local, hdr->addr1, sta, tmp) { | 385 | for_each_sta_info(local, hdr->addr1, sta, tmp) { |
386 | /* skip wrong virtual interface */ | 386 | /* skip wrong virtual interface */ |
387 | if (compare_ether_addr(hdr->addr2, sta->sdata->vif.addr)) | 387 | if (!ether_addr_equal(hdr->addr2, sta->sdata->vif.addr)) |
388 | continue; | 388 | continue; |
389 | 389 | ||
390 | if (info->flags & IEEE80211_TX_STATUS_EOSP) | 390 | if (info->flags & IEEE80211_TX_STATUS_EOSP) |
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index d67d36f57d78..e03abc78ee53 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -1665,7 +1665,7 @@ netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb, | |||
1665 | skb->len >= len_rthdr + hdrlen + sizeof(rfc1042_header) + 2) { | 1665 | skb->len >= len_rthdr + hdrlen + sizeof(rfc1042_header) + 2) { |
1666 | u8 *payload = (u8 *)hdr + hdrlen; | 1666 | u8 *payload = (u8 *)hdr + hdrlen; |
1667 | 1667 | ||
1668 | if (compare_ether_addr(payload, rfc1042_header) == 0) | 1668 | if (ether_addr_equal(payload, rfc1042_header)) |
1669 | skb->protocol = cpu_to_be16((payload[6] << 8) | | 1669 | skb->protocol = cpu_to_be16((payload[6] << 8) | |
1670 | payload[7]); | 1670 | payload[7]); |
1671 | } | 1671 | } |
@@ -1698,7 +1698,7 @@ netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb, | |||
1698 | tmp_sdata->vif.type == NL80211_IFTYPE_AP_VLAN || | 1698 | tmp_sdata->vif.type == NL80211_IFTYPE_AP_VLAN || |
1699 | tmp_sdata->vif.type == NL80211_IFTYPE_WDS) | 1699 | tmp_sdata->vif.type == NL80211_IFTYPE_WDS) |
1700 | continue; | 1700 | continue; |
1701 | if (compare_ether_addr(tmp_sdata->vif.addr, hdr->addr2) == 0) { | 1701 | if (ether_addr_equal(tmp_sdata->vif.addr, hdr->addr2)) { |
1702 | sdata = tmp_sdata; | 1702 | sdata = tmp_sdata; |
1703 | break; | 1703 | break; |
1704 | } | 1704 | } |
@@ -1815,9 +1815,8 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, | |||
1815 | * is being proxied by a portal (i.e. portal address | 1815 | * is being proxied by a portal (i.e. portal address |
1816 | * differs from proxied address) | 1816 | * differs from proxied address) |
1817 | */ | 1817 | */ |
1818 | if (compare_ether_addr(sdata->vif.addr, | 1818 | if (ether_addr_equal(sdata->vif.addr, skb->data + ETH_ALEN) && |
1819 | skb->data + ETH_ALEN) == 0 && | 1819 | !(mppath && !ether_addr_equal(mppath->mpp, skb->data))) { |
1820 | !(mppath && compare_ether_addr(mppath->mpp, skb->data))) { | ||
1821 | hdrlen = ieee80211_fill_mesh_addresses(&hdr, &fc, | 1820 | hdrlen = ieee80211_fill_mesh_addresses(&hdr, &fc, |
1822 | skb->data, skb->data + ETH_ALEN); | 1821 | skb->data, skb->data + ETH_ALEN); |
1823 | rcu_read_unlock(); | 1822 | rcu_read_unlock(); |
@@ -1964,7 +1963,7 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, | |||
1964 | if (unlikely(!ieee80211_vif_is_mesh(&sdata->vif) && | 1963 | if (unlikely(!ieee80211_vif_is_mesh(&sdata->vif) && |
1965 | !is_multicast_ether_addr(hdr.addr1) && !authorized && | 1964 | !is_multicast_ether_addr(hdr.addr1) && !authorized && |
1966 | (cpu_to_be16(ethertype) != sdata->control_port_protocol || | 1965 | (cpu_to_be16(ethertype) != sdata->control_port_protocol || |
1967 | compare_ether_addr(sdata->vif.addr, skb->data + ETH_ALEN)))) { | 1966 | !ether_addr_equal(sdata->vif.addr, skb->data + ETH_ALEN)))) { |
1968 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 1967 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG |
1969 | if (net_ratelimit()) | 1968 | if (net_ratelimit()) |
1970 | printk(KERN_DEBUG "%s: dropped frame to %pM" | 1969 | printk(KERN_DEBUG "%s: dropped frame to %pM" |