* __ieee80211_rx_handle_packet problem with multiple vifs.
@ 2010-09-20 6:42 Ben Greear
0 siblings, 0 replies; only message in thread
From: Ben Greear @ 2010-09-20 6:42 UTC (permalink / raw)
To: linux-wireless@vger.kernel.org
The __ieee80211_rx_handle_packet logic is broken when multiple
VIFS can receive the same data packet (ARP, for instance). It may have similar issues
for non-data packets, but it seems it at least mostly works in that
case.
The patch below makes it function better, but I suspect there are
still bugs with this approach because prepare_for_handlers() is
called with 'current' sta, but the packet may be processed for
'prev'.
I could make the logic more duplicated and take different code paths
if prev exists, or I could re-call the prepare_for_handlers right
before sending to invoke_rx_handlers.
Or maybe merge data and non-date loops into a single loop?
Any suggestions for preferred way to go about this?
Thanks,
Ben
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;
+ }
}
}
}
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-09-20 6:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-20 6:42 __ieee80211_rx_handle_packet problem with multiple vifs Ben Greear
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).