From patchwork Thu Sep 20 13:22:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artem Bityutskiy X-Patchwork-Id: 1485031 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id E8E06DF2D2 for ; Thu, 20 Sep 2012 13:17:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753340Ab2ITNRg (ORCPT ); Thu, 20 Sep 2012 09:17:36 -0400 Received: from mga03.intel.com ([143.182.124.21]:47172 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751807Ab2ITNRf (ORCPT ); Thu, 20 Sep 2012 09:17:35 -0400 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 20 Sep 2012 06:17:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.80,453,1344236400"; d="asc'?scan'208";a="195006771" Received: from linux.jf.intel.com (HELO linux.intel.com) ([10.23.219.25]) by azsmga001.ch.intel.com with ESMTP; 20 Sep 2012 06:17:28 -0700 Received: from [10.237.72.162] (sauron.fi.intel.com [10.237.72.162]) by linux.intel.com (Postfix) with ESMTP id 138182C8001; Thu, 20 Sep 2012 06:17:27 -0700 (PDT) Message-ID: <1348147353.2388.19.camel@sauron.fi.intel.com> Subject: Re: regression: tethering fails in 3.5 with iwlwifi From: Artem Bityutskiy Reply-To: artem.bityutskiy@linux.intel.com To: Eric Dumazet Cc: Johannes Berg , linux-wireless@vger.kernel.org, netdev Date: Thu, 20 Sep 2012 16:22:33 +0300 In-Reply-To: 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> X-Mailer: Evolution 3.4.4 (3.4.4-1.fc17) Mime-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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); + } } }