aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/rx.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r--net/mac80211/rx.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index c4453fdd6e11..edd46193af6f 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -850,8 +850,21 @@ ieee80211_rx_h_check(struct ieee80211_rx_data *rx)
850 ieee80211_is_pspoll(hdr->frame_control)) && 850 ieee80211_is_pspoll(hdr->frame_control)) &&
851 rx->sdata->vif.type != NL80211_IFTYPE_ADHOC && 851 rx->sdata->vif.type != NL80211_IFTYPE_ADHOC &&
852 rx->sdata->vif.type != NL80211_IFTYPE_WDS && 852 rx->sdata->vif.type != NL80211_IFTYPE_WDS &&
853 (!rx->sta || !test_sta_flags(rx->sta, WLAN_STA_ASSOC)))) 853 (!rx->sta || !test_sta_flags(rx->sta, WLAN_STA_ASSOC)))) {
854 if (rx->sta && rx->sta->dummy &&
855 ieee80211_is_data_present(hdr->frame_control)) {
856 u16 ethertype;
857 u8 *payload;
858
859 payload = rx->skb->data +
860 ieee80211_hdrlen(hdr->frame_control);
861 ethertype = (payload[6] << 8) | payload[7];
862 if (cpu_to_be16(ethertype) ==
863 rx->sdata->control_port_protocol)
864 return RX_CONTINUE;
865 }
854 return RX_DROP_MONITOR; 866 return RX_DROP_MONITOR;
867 }
855 868
856 return RX_CONTINUE; 869 return RX_CONTINUE;
857} 870}
@@ -2808,7 +2821,7 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
2808 if (ieee80211_is_data(fc)) { 2821 if (ieee80211_is_data(fc)) {
2809 prev_sta = NULL; 2822 prev_sta = NULL;
2810 2823
2811 for_each_sta_info(local, hdr->addr2, sta, tmp) { 2824 for_each_sta_info_rx(local, hdr->addr2, sta, tmp) {
2812 if (!prev_sta) { 2825 if (!prev_sta) {
2813 prev_sta = sta; 2826 prev_sta = sta;
2814 continue; 2827 continue;
@@ -2852,7 +2865,7 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
2852 continue; 2865 continue;
2853 } 2866 }
2854 2867
2855 rx.sta = sta_info_get_bss(prev, hdr->addr2); 2868 rx.sta = sta_info_get_bss_rx(prev, hdr->addr2);
2856 rx.sdata = prev; 2869 rx.sdata = prev;
2857 ieee80211_prepare_and_rx_handle(&rx, skb, false); 2870 ieee80211_prepare_and_rx_handle(&rx, skb, false);
2858 2871
@@ -2860,7 +2873,7 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
2860 } 2873 }
2861 2874
2862 if (prev) { 2875 if (prev) {
2863 rx.sta = sta_info_get_bss(prev, hdr->addr2); 2876 rx.sta = sta_info_get_bss_rx(prev, hdr->addr2);
2864 rx.sdata = prev; 2877 rx.sdata = prev;
2865 2878
2866 if (ieee80211_prepare_and_rx_handle(&rx, skb, true)) 2879 if (ieee80211_prepare_and_rx_handle(&rx, skb, true))