summaryrefslogtreecommitdiff
path: root/package/mac80211
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-01-21 23:38:49 +0000
committerFelix Fietkau <nbd@openwrt.org>2010-01-21 23:38:49 +0000
commit9237420b798a66d285a6728890101eceabdd4db2 (patch)
tree03b1e64078a17ac00ebe3c70b1e93bc765cb30dc /package/mac80211
parent2920081f4862684a97cb5af155c5845dba50a55f (diff)
downloadmtk-20170518-9237420b798a66d285a6728890101eceabdd4db2.zip
mtk-20170518-9237420b798a66d285a6728890101eceabdd4db2.tar.gz
mtk-20170518-9237420b798a66d285a6728890101eceabdd4db2.tar.bz2
mac80211: fix multi-bss related rx handling bug
SVN-Revision: 19260
Diffstat (limited to 'package/mac80211')
-rw-r--r--package/mac80211/patches/580-mac80211_rxdata_fix.patch72
1 files changed, 72 insertions, 0 deletions
diff --git a/package/mac80211/patches/580-mac80211_rxdata_fix.patch b/package/mac80211/patches/580-mac80211_rxdata_fix.patch
new file mode 100644
index 0000000..5d97562
--- /dev/null
+++ b/package/mac80211/patches/580-mac80211_rxdata_fix.patch
@@ -0,0 +1,72 @@
+--- a/net/mac80211/rx.c
++++ b/net/mac80211/rx.c
+@@ -2348,22 +2348,6 @@ static void __ieee80211_rx_handle_packet
+ sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
+ continue;
+
+- rx.sta = sta_info_get(sdata, hdr->addr2);
+-
+- rx.flags |= IEEE80211_RX_RA_MATCH;
+- prepares = prepare_for_handlers(sdata, &rx, hdr);
+-
+- if (!prepares)
+- continue;
+-
+- if (status->flag & RX_FLAG_MMIC_ERROR) {
+- rx.sdata = sdata;
+- if (rx.flags & IEEE80211_RX_RA_MATCH)
+- ieee80211_rx_michael_mic_report(hdr,
+- &rx);
+- continue;
+- }
+-
+ /*
+ * frame is destined for this interface, but if it's
+ * not also for the previous one we handle that after
+@@ -2375,6 +2359,22 @@ static void __ieee80211_rx_handle_packet
+ continue;
+ }
+
++ rx.sta = sta_info_get(prev, hdr->addr2);
++
++ rx.flags |= IEEE80211_RX_RA_MATCH;
++ prepares = prepare_for_handlers(prev, &rx, hdr);
++
++ if (!prepares)
++ goto next;
++
++ if (status->flag & RX_FLAG_MMIC_ERROR) {
++ rx.sdata = prev;
++ if (rx.flags & IEEE80211_RX_RA_MATCH)
++ ieee80211_rx_michael_mic_report(hdr,
++ &rx);
++ goto next;
++ }
++
+ /*
+ * frame was destined for the previous interface
+ * so invoke RX handlers for it
+@@ -2387,11 +2387,22 @@ static void __ieee80211_rx_handle_packet
+ "multicast frame for %s\n",
+ wiphy_name(local->hw.wiphy),
+ prev->name);
+- continue;
++ goto next;
+ }
+ ieee80211_invoke_rx_handlers(prev, &rx, skb_new, rate);
++next:
+ prev = sdata;
+ }
++
++ if (prev) {
++ rx.sta = sta_info_get(prev, hdr->addr2);
++
++ rx.flags |= IEEE80211_RX_RA_MATCH;
++ prepares = prepare_for_handlers(prev, &rx, hdr);
++
++ if (!prepares)
++ prev = NULL;
++ }
+ }
+ if (prev)
+ ieee80211_invoke_rx_handlers(prev, &rx, skb, rate);