diff mbox

regression: tethering fails in 3.5 with iwlwifi

Message ID 1348147353.2388.19.camel@sauron.fi.intel.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Artem Bityutskiy Sept. 20, 2012, 1:22 p.m. UTC
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:

Comments

Eric Dumazet Sept. 20, 2012, 1:22 p.m. UTC | #1
On Thu, 2012-09-20 at 16:22 +0300, Artem Bityutskiy wrote:

> 
> 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);
> +                       }
>                 }
>         }
> 

OK but you cant do that, or small frames will be dropped.

Anyway its a hack, we should find the buggy layer.

You could use dropwatch (drop_monitor) to check where frame is dropped.

modprobe drop_monitor
dropwatch -l kas



--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Artem Bityutskiy Sept. 20, 2012, 1:39 p.m. UTC | #2
On Thu, 2012-09-20 at 15:22 +0200, Eric Dumazet wrote:
> On Thu, 2012-09-20 at 16:22 +0300, Artem Bityutskiy wrote:
> 
> > 
> > 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);
> > +                       }
> >                 }
> >         }
> > 
> 
> OK but you cant do that, or small frames will be dropped.
> 
> Anyway its a hack, we should find the buggy layer.
> 
> You could use dropwatch (drop_monitor) to check where frame is dropped.
> 
> modprobe drop_monitor
> dropwatch -l kas

I do not have dropwatch in Tizen, I need to find the sources and compile
the user-space part. Any hint where to download it?
Eric Dumazet Sept. 20, 2012, 1:41 p.m. UTC | #3
On Thu, 2012-09-20 at 16:39 +0300, Artem Bityutskiy wrote:
> On Thu, 2012-09-20 at 15:22 +0200, Eric Dumazet wrote:

> > OK but you cant do that, or small frames will be dropped.
> > 
> > Anyway its a hack, we should find the buggy layer.
> > 
> > You could use dropwatch (drop_monitor) to check where frame is dropped.
> > 
> > modprobe drop_monitor
> > dropwatch -l kas
> 
> I do not have dropwatch in Tizen, I need to find the sources and compile
> the user-space part. Any hint where to download it?
> 

https://fedorahosted.org/dropwatch/


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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);
+                       }
                }
        }