diff options
author | John W. Linville <linville@tuxdriver.com> | 2012-07-12 15:21:05 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-07-12 15:21:05 -0400 |
commit | d07d152892aadd8dc3209ecef6788dfc83475676 (patch) | |
tree | 0f140aa244ddc2c52494155342298cef64fc8456 /net/mac80211/rx.c | |
parent | 2f8684ce7a47c91da7e0ccba2686277c103d02b6 (diff) | |
parent | 685fb72b63faf09a767cc28332545f5830b91be8 (diff) |
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Conflicts:
drivers/net/wireless/iwmc3200wifi/cfg80211.c
drivers/net/wireless/mwifiex/cfg80211.c
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r-- | net/mac80211/rx.c | 49 |
1 files changed, 9 insertions, 40 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 839cac8fab57..090d417919af 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -413,29 +413,6 @@ static void ieee80211_verify_alignment(struct ieee80211_rx_data *rx) | |||
413 | 413 | ||
414 | /* rx handlers */ | 414 | /* rx handlers */ |
415 | 415 | ||
416 | static ieee80211_rx_result debug_noinline | ||
417 | ieee80211_rx_h_passive_scan(struct ieee80211_rx_data *rx) | ||
418 | { | ||
419 | struct ieee80211_local *local = rx->local; | ||
420 | struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(rx->skb); | ||
421 | struct sk_buff *skb = rx->skb; | ||
422 | |||
423 | if (likely(!(status->rx_flags & IEEE80211_RX_IN_SCAN) && | ||
424 | !local->sched_scanning)) | ||
425 | return RX_CONTINUE; | ||
426 | |||
427 | if (test_bit(SCAN_HW_SCANNING, &local->scanning) || | ||
428 | test_bit(SCAN_SW_SCANNING, &local->scanning) || | ||
429 | test_bit(SCAN_ONCHANNEL_SCANNING, &local->scanning) || | ||
430 | local->sched_scanning) | ||
431 | return ieee80211_scan_rx(rx->sdata, skb); | ||
432 | |||
433 | /* scanning finished during invoking of handlers */ | ||
434 | I802_DEBUG_INC(local->rx_handlers_drop_passive_scan); | ||
435 | return RX_DROP_UNUSABLE; | ||
436 | } | ||
437 | |||
438 | |||
439 | static int ieee80211_is_unicast_robust_mgmt_frame(struct sk_buff *skb) | 416 | static int ieee80211_is_unicast_robust_mgmt_frame(struct sk_buff *skb) |
440 | { | 417 | { |
441 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; | 418 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; |
@@ -2404,7 +2381,7 @@ ieee80211_rx_h_userspace_mgmt(struct ieee80211_rx_data *rx) | |||
2404 | if (rx->local->hw.flags & IEEE80211_HW_SIGNAL_DBM) | 2381 | if (rx->local->hw.flags & IEEE80211_HW_SIGNAL_DBM) |
2405 | sig = status->signal; | 2382 | sig = status->signal; |
2406 | 2383 | ||
2407 | if (cfg80211_rx_mgmt(rx->sdata->dev, status->freq, sig, | 2384 | if (cfg80211_rx_mgmt(&rx->sdata->wdev, status->freq, sig, |
2408 | rx->skb->data, rx->skb->len, | 2385 | rx->skb->data, rx->skb->len, |
2409 | GFP_ATOMIC)) { | 2386 | GFP_ATOMIC)) { |
2410 | if (rx->sta) | 2387 | if (rx->sta) |
@@ -2695,7 +2672,6 @@ static void ieee80211_invoke_rx_handlers(struct ieee80211_rx_data *rx) | |||
2695 | goto rxh_next; \ | 2672 | goto rxh_next; \ |
2696 | } while (0); | 2673 | } while (0); |
2697 | 2674 | ||
2698 | CALL_RXH(ieee80211_rx_h_passive_scan) | ||
2699 | CALL_RXH(ieee80211_rx_h_check) | 2675 | CALL_RXH(ieee80211_rx_h_check) |
2700 | 2676 | ||
2701 | ieee80211_rx_reorder_ampdu(rx); | 2677 | ieee80211_rx_reorder_ampdu(rx); |
@@ -2765,11 +2741,8 @@ static int prepare_for_handlers(struct ieee80211_rx_data *rx, | |||
2765 | return 0; | 2741 | return 0; |
2766 | if (ieee80211_is_beacon(hdr->frame_control)) { | 2742 | if (ieee80211_is_beacon(hdr->frame_control)) { |
2767 | return 1; | 2743 | return 1; |
2768 | } | 2744 | } else if (!ieee80211_bssid_match(bssid, sdata->u.ibss.bssid)) { |
2769 | else if (!ieee80211_bssid_match(bssid, sdata->u.ibss.bssid)) { | 2745 | return 0; |
2770 | if (!(status->rx_flags & IEEE80211_RX_IN_SCAN)) | ||
2771 | return 0; | ||
2772 | status->rx_flags &= ~IEEE80211_RX_RA_MATCH; | ||
2773 | } else if (!multicast && | 2746 | } else if (!multicast && |
2774 | !ether_addr_equal(sdata->vif.addr, hdr->addr1)) { | 2747 | !ether_addr_equal(sdata->vif.addr, hdr->addr1)) { |
2775 | if (!(sdata->dev->flags & IFF_PROMISC)) | 2748 | if (!(sdata->dev->flags & IFF_PROMISC)) |
@@ -2807,11 +2780,9 @@ static int prepare_for_handlers(struct ieee80211_rx_data *rx, | |||
2807 | * and location updates. Note that mac80211 | 2780 | * and location updates. Note that mac80211 |
2808 | * itself never looks at these frames. | 2781 | * itself never looks at these frames. |
2809 | */ | 2782 | */ |
2810 | if (!(status->rx_flags & IEEE80211_RX_IN_SCAN) && | 2783 | if (ieee80211_is_public_action(hdr, skb->len)) |
2811 | ieee80211_is_public_action(hdr, skb->len)) | ||
2812 | return 1; | 2784 | return 1; |
2813 | if (!(status->rx_flags & IEEE80211_RX_IN_SCAN) && | 2785 | if (!ieee80211_is_beacon(hdr->frame_control)) |
2814 | !ieee80211_is_beacon(hdr->frame_control)) | ||
2815 | return 0; | 2786 | return 0; |
2816 | status->rx_flags &= ~IEEE80211_RX_RA_MATCH; | 2787 | status->rx_flags &= ~IEEE80211_RX_RA_MATCH; |
2817 | } | 2788 | } |
@@ -2877,7 +2848,6 @@ static bool ieee80211_prepare_and_rx_handle(struct ieee80211_rx_data *rx, | |||
2877 | static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw, | 2848 | static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw, |
2878 | struct sk_buff *skb) | 2849 | struct sk_buff *skb) |
2879 | { | 2850 | { |
2880 | struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); | ||
2881 | struct ieee80211_local *local = hw_to_local(hw); | 2851 | struct ieee80211_local *local = hw_to_local(hw); |
2882 | struct ieee80211_sub_if_data *sdata; | 2852 | struct ieee80211_sub_if_data *sdata; |
2883 | struct ieee80211_hdr *hdr; | 2853 | struct ieee80211_hdr *hdr; |
@@ -2895,11 +2865,6 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw, | |||
2895 | if (ieee80211_is_data(fc) || ieee80211_is_mgmt(fc)) | 2865 | if (ieee80211_is_data(fc) || ieee80211_is_mgmt(fc)) |
2896 | local->dot11ReceivedFragmentCount++; | 2866 | local->dot11ReceivedFragmentCount++; |
2897 | 2867 | ||
2898 | if (unlikely(test_bit(SCAN_HW_SCANNING, &local->scanning) || | ||
2899 | test_bit(SCAN_ONCHANNEL_SCANNING, &local->scanning) || | ||
2900 | test_bit(SCAN_SW_SCANNING, &local->scanning))) | ||
2901 | status->rx_flags |= IEEE80211_RX_IN_SCAN; | ||
2902 | |||
2903 | if (ieee80211_is_mgmt(fc)) | 2868 | if (ieee80211_is_mgmt(fc)) |
2904 | err = skb_linearize(skb); | 2869 | err = skb_linearize(skb); |
2905 | else | 2870 | else |
@@ -2914,6 +2879,10 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw, | |||
2914 | ieee80211_parse_qos(&rx); | 2879 | ieee80211_parse_qos(&rx); |
2915 | ieee80211_verify_alignment(&rx); | 2880 | ieee80211_verify_alignment(&rx); |
2916 | 2881 | ||
2882 | if (unlikely(ieee80211_is_probe_resp(hdr->frame_control) || | ||
2883 | ieee80211_is_beacon(hdr->frame_control))) | ||
2884 | ieee80211_scan_rx(local, skb); | ||
2885 | |||
2917 | if (ieee80211_is_data(fc)) { | 2886 | if (ieee80211_is_data(fc)) { |
2918 | prev_sta = NULL; | 2887 | prev_sta = NULL; |
2919 | 2888 | ||