mac80211: fix multi-bss related rx handling bug
[openwrt.git] / package / mac80211 / patches / 580-mac80211_rxdata_fix.patch
1 --- a/net/mac80211/rx.c
2 +++ b/net/mac80211/rx.c
3 @@ -2348,22 +2348,6 @@ static void __ieee80211_rx_handle_packet
4 sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
5 continue;
6
7 - rx.sta = sta_info_get(sdata, hdr->addr2);
8 -
9 - rx.flags |= IEEE80211_RX_RA_MATCH;
10 - prepares = prepare_for_handlers(sdata, &rx, hdr);
11 -
12 - if (!prepares)
13 - continue;
14 -
15 - if (status->flag & RX_FLAG_MMIC_ERROR) {
16 - rx.sdata = sdata;
17 - if (rx.flags & IEEE80211_RX_RA_MATCH)
18 - ieee80211_rx_michael_mic_report(hdr,
19 - &rx);
20 - continue;
21 - }
22 -
23 /*
24 * frame is destined for this interface, but if it's
25 * not also for the previous one we handle that after
26 @@ -2375,6 +2359,22 @@ static void __ieee80211_rx_handle_packet
27 continue;
28 }
29
30 + rx.sta = sta_info_get(prev, hdr->addr2);
31 +
32 + rx.flags |= IEEE80211_RX_RA_MATCH;
33 + prepares = prepare_for_handlers(prev, &rx, hdr);
34 +
35 + if (!prepares)
36 + goto next;
37 +
38 + if (status->flag & RX_FLAG_MMIC_ERROR) {
39 + rx.sdata = prev;
40 + if (rx.flags & IEEE80211_RX_RA_MATCH)
41 + ieee80211_rx_michael_mic_report(hdr,
42 + &rx);
43 + goto next;
44 + }
45 +
46 /*
47 * frame was destined for the previous interface
48 * so invoke RX handlers for it
49 @@ -2387,11 +2387,22 @@ static void __ieee80211_rx_handle_packet
50 "multicast frame for %s\n",
51 wiphy_name(local->hw.wiphy),
52 prev->name);
53 - continue;
54 + goto next;
55 }
56 ieee80211_invoke_rx_handlers(prev, &rx, skb_new, rate);
57 +next:
58 prev = sdata;
59 }
60 +
61 + if (prev) {
62 + rx.sta = sta_info_get(prev, hdr->addr2);
63 +
64 + rx.flags |= IEEE80211_RX_RA_MATCH;
65 + prepares = prepare_for_handlers(prev, &rx, hdr);
66 +
67 + if (!prepares)
68 + prev = NULL;
69 + }
70 }
71 if (prev)
72 ieee80211_invoke_rx_handlers(prev, &rx, skb, rate);
This page took 0.047391 seconds and 5 git commands to generate.