aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/rx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2007-07-27 09:43:22 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:47:32 -0400
commit340e11f332c695c43f506e82b1d39d00716c5005 (patch)
tree694ba2b7f95a2463ee96462ab33dd0c30e707e06 /net/mac80211/rx.c
parent52865dfd520ddd3d1176947106759ff944f0f8af (diff)
[MAC80211]: rx cleanups (2)
Some more outdenting to make the code more readable. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Jiri Benc <jbenc@suse.cz> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r--net/mac80211/rx.c42
1 files changed, 28 insertions, 14 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index f255579dc564..95a00eb57249 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1387,21 +1387,35 @@ void __ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb,
1387 if (!prepres) 1387 if (!prepres)
1388 continue; 1388 continue;
1389 1389
1390 if (prev) { 1390 /*
1391 skb_new = skb_copy(skb, GFP_ATOMIC); 1391 * frame is destined for this interface, but if it's not
1392 if (!skb_new) { 1392 * also for the previous one we handle that after the
1393 if (net_ratelimit()) 1393 * loop to avoid copying the SKB once too much
1394 printk(KERN_DEBUG "%s: failed to copy " 1394 */
1395 "multicast frame for %s", 1395
1396 local->mdev->name, prev->dev->name); 1396 if (!prev) {
1397 continue; 1397 prev = sdata;
1398 } 1398 continue;
1399 rx.skb = skb_new;
1400 rx.dev = prev->dev;
1401 rx.sdata = prev;
1402 ieee80211_invoke_rx_handlers(local, local->rx_handlers,
1403 &rx, sta);
1404 } 1399 }
1400
1401 /*
1402 * frame was destined for the previous interface
1403 * so invoke RX handlers for it
1404 */
1405
1406 skb_new = skb_copy(skb, GFP_ATOMIC);
1407 if (!skb_new) {
1408 if (net_ratelimit())
1409 printk(KERN_DEBUG "%s: failed to copy "
1410 "multicast frame for %s",
1411 local->mdev->name, prev->dev->name);
1412 continue;
1413 }
1414 rx.skb = skb_new;
1415 rx.dev = prev->dev;
1416 rx.sdata = prev;
1417 ieee80211_invoke_rx_handlers(local, local->rx_handlers,
1418 &rx, sta);
1405 prev = sdata; 1419 prev = sdata;
1406 } 1420 }
1407 if (prev) { 1421 if (prev) {