diff options
-rw-r--r-- | net/mac80211/rx.c | 42 |
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) { |