Commit 340e11f3 authored by Johannes Berg's avatar Johannes Berg Committed by David S. Miller

[MAC80211]: rx cleanups (2)

Some more outdenting to make the code more readable.
Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJiri Benc <jbenc@suse.cz>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 52865dfd
...@@ -1387,21 +1387,35 @@ void __ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb, ...@@ -1387,21 +1387,35 @@ void __ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb,
if (!prepres) if (!prepres)
continue; continue;
if (prev) { /*
skb_new = skb_copy(skb, GFP_ATOMIC); * frame is destined for this interface, but if it's not
if (!skb_new) { * also for the previous one we handle that after the
if (net_ratelimit()) * loop to avoid copying the SKB once too much
printk(KERN_DEBUG "%s: failed to copy " */
"multicast frame for %s",
local->mdev->name, prev->dev->name); if (!prev) {
continue; prev = sdata;
} continue;
rx.skb = skb_new;
rx.dev = prev->dev;
rx.sdata = prev;
ieee80211_invoke_rx_handlers(local, local->rx_handlers,
&rx, sta);
} }
/*
* frame was destined for the previous interface
* so invoke RX handlers for it
*/
skb_new = skb_copy(skb, GFP_ATOMIC);
if (!skb_new) {
if (net_ratelimit())
printk(KERN_DEBUG "%s: failed to copy "
"multicast frame for %s",
local->mdev->name, prev->dev->name);
continue;
}
rx.skb = skb_new;
rx.dev = prev->dev;
rx.sdata = prev;
ieee80211_invoke_rx_handlers(local, local->rx_handlers,
&rx, sta);
prev = sdata; prev = sdata;
} }
if (prev) { if (prev) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment