diff mbox

__ieee80211_rx_handle_packet problem with multiple vifs.

Message ID 4C97025D.9050006@candelatech.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Ben Greear Sept. 20, 2010, 6:42 a.m. UTC
None
diff mbox

Patch

diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index ac205a3..521b086 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -2657,8 +2657,19 @@  static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
                                 if (status->flag & RX_FLAG_MMIC_ERROR) {
                                         if (rx.flags & IEEE80211_RX_RA_MATCH)
                                                 ieee80211_rx_michael_mic_report(hdr, &rx);
-                               } else
-                                       prev = rx.sdata;
+                               } else {
+                                       if (prev) {
+                                               skb_new = skb_copy(skb, GFP_ATOMIC);
+                                               if (!skb_new) {
+                                                       if (net_ratelimit())
+                                                               wiphy_debug(local->hw.wiphy,
+                                                                           "failed to copy data frame for %s\n
+                                                                           prev->name);
+                                               } else
+                                                       ieee80211_invoke_rx_handlers(prev, &rx, skb_new);
+                                       }
+                                       prev = sta->sdata;
+                               }
                         }
                 }
         }