Thread (18 messages) flat view 18 messages, 5 authors, 2012-09-21

Re: regression: tethering fails in 3.5 with iwlwifi

From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Date: 2012-09-20 13:17:35
Also in: netdev
Subsystem: mac80211, the rest · Maintainers: Johannes Berg, Linus Torvalds

Possibly related (same subject, not in this thread)

On Thu, 2012-09-20 at 15:04 +0200, Eric Dumazet wrote:
Try to pull 40 bytes : Thats OK for tcp performance, because 40 bytes
is the minimum size of IP+TCP headers

pskb_may_pull(skb, 40);
OK, I've tried almost this (see below) and it solves my issue:
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 965e6ec..7f079d0 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1798,9 +1798,13 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
 
                if (skb) {
                        /* deliver to local stack */
-                       skb->protocol = eth_type_trans(skb, dev);
-                       memset(skb->cb, 0, sizeof(skb->cb));
-                       netif_receive_skb(skb);
+                       if (pskb_may_pull(skb, 40)) {
+                               skb->protocol = eth_type_trans(skb, dev);
+                               memset(skb->cb, 0, sizeof(skb->cb));
+                               netif_receive_skb(skb);
+                       } else {
+                               kfree_skb(skb);
+                       }
                }
        }
-- 
Best Regards,
Artem Bityutskiy

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help