Return-path: Received: from mail-bk0-f46.google.com ([209.85.214.46]:62400 "EHLO mail-bk0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752533Ab2ITNWI (ORCPT ); Thu, 20 Sep 2012 09:22:08 -0400 Subject: Re: regression: tethering fails in 3.5 with iwlwifi From: Eric Dumazet To: artem.bityutskiy@linux.intel.com Cc: Eric Dumazet , Johannes Berg , linux-wireless@vger.kernel.org, netdev In-Reply-To: <1348147353.2388.19.camel@sauron.fi.intel.com> References: <1347361823.26457.3.camel@sauron.fi.intel.com> <1DC40B07CD6EC041A66726C271A73AE6195AE9C8@IRSMSX102.ger.corp.intel.com> <1347631355.5263.19.camel@sauron.fi.intel.com> <1347640763.5263.24.camel@sauron.fi.intel.com> <1347892887.7112.9.camel@sauron.fi.intel.com> <1348142775.2388.10.camel@sauron.fi.intel.com> <1348144524.4161.26.camel@jlt4.sipsolutions.net> <1348145936.2388.18.camel@sauron.fi.intel.com> <1348147353.2388.19.camel@sauron.fi.intel.com> Content-Type: text/plain; charset="UTF-8" Date: Thu, 20 Sep 2012 15:22:02 +0200 Message-ID: <1348147322.31352.69.camel@edumazet-glaptop> (sfid-20120920_152218_043454_F0863AEC) Mime-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org List-ID: 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