From patchwork Thu May 29 09:50:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Kazior X-Patchwork-Id: 4263741 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B84AA9F333 for ; Thu, 29 May 2014 09:57:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E0E5A20306 for ; Thu, 29 May 2014 09:57:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 56DB32010F for ; Thu, 29 May 2014 09:57:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756254AbaE2J5s (ORCPT ); Thu, 29 May 2014 05:57:48 -0400 Received: from mail-we0-f176.google.com ([74.125.82.176]:58062 "EHLO mail-we0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756101AbaE2J5b (ORCPT ); Thu, 29 May 2014 05:57:31 -0400 Received: by mail-we0-f176.google.com with SMTP id q59so119911wes.35 for ; Thu, 29 May 2014 02:57:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=from:to:cc:subject:date:message-id; bh=wzPosLjVN4MEscHBu193EO+1iOcofaziZqJVfKo0gBs=; b=yTrU31WzoNLD7X6kK0mJNf/RBBH6iT1MRxEL5JT0zN9k2S5FDVFuP9jUu1QNQl1nST 4vpf999u0z413cfQv3PjJ1KX/Pe7SurppP75LSjnnmeZMO++pKXre7H4k75U/Z5u5aMG D84juIfCDw8jVO2pDg7tuJ0iJifPs+tpaA1Bg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=wzPosLjVN4MEscHBu193EO+1iOcofaziZqJVfKo0gBs=; b=NM8ArW7TZcGo8OCQ2eA1DBtGDnBhIPRkHDDiT1j/47dDoTG3sjwLMy8WPGzAt/mEJ1 XFwhlJnLQwGQyt1O0hfdFcmZIwn6Mt6VmmwDK9SefI8/L3iWKw8N/aCwj/nO5Na6C2V0 wKZHnk5wQakGfNkUF7EPlptDXiRFjH803b3OvaSiVYq2TYdI7kKCxgO+P5QMAWxti0os l6qJ9KZfIdN42k3xjYBXp0xgo/jLK8FWlDXnRUR4TBtv2KGfBI+v3bW5LXGYqF+d6y3s i57Kp1PIgJYTc1oXSuzVAC8K6xFVFn4YUKsRBppktHHu4G4zgoS4FYXUydTCWGABOQFN nt2g== X-Gm-Message-State: ALoCoQkBxWBum6e+Tyvk8bjY/VDc8ZPuiMTN7ck5ZybLSHuNLKiOBIHW/NKo0V8WQcsXBxSxLsLRWBYRHwXF+y3V2vW1IyG0a40ZKR4KI2oR1djEoFkz6fo= X-Received: by 10.194.93.202 with SMTP id cw10mr2762303wjb.95.1401357450114; Thu, 29 May 2014 02:57:30 -0700 (PDT) Received: from localhost.localdomain ([91.198.246.8]) by mx.google.com with ESMTPSA id je7sm1491853wic.14.2014.05.29.02.57.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 May 2014 02:57:29 -0700 (PDT) From: Michal Kazior To: ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Michal Kazior Subject: [PATCH] ath10k: remove unnecessary htt rx corruption check Date: Thu, 29 May 2014 11:50:08 +0200 Message-Id: <1401357008-16259-1-git-send-email-michal.kazior@tieto.com> X-Mailer: git-send-email 1.8.5.3 X-DomainID: tieto.com Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP While fixing a bug reported by Avery I went ahead and added a warning suspecting there might be something more to the bug. This ended up with people reporting they see warnings during heavy traffic. This bought me some time and helped me understand the problem better - apparently fw/hw can report a chained msdus as follows: 1 msdu, 1 chained, 1 msdu (0 length). The patch removes the extra check but leaves the other change that fixed the original skb_push panic bug (msdu_chaining was overwritten in an unfortunate way which made the above example to be treated as non-chained case). Reported-by: Yeoh Chun-Yeow Reported-by: Tim Harvey Signed-off-by: Michal Kazior --- drivers/net/wireless/ath/ath10k/htt_rx.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c index 6c102b1..eebc860 100644 --- a/drivers/net/wireless/ath/ath10k/htt_rx.c +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c @@ -312,7 +312,6 @@ static int ath10k_htt_rx_amsdu_pop(struct ath10k_htt *htt, int msdu_len, msdu_chaining = 0; struct sk_buff *msdu; struct htt_rx_desc *rx_desc; - bool corrupted = false; lockdep_assert_held(&htt->rx_ring.lock); @@ -439,9 +438,6 @@ static int ath10k_htt_rx_amsdu_pop(struct ath10k_htt *htt, last_msdu = __le32_to_cpu(rx_desc->msdu_end.info0) & RX_MSDU_END_INFO0_LAST_MSDU; - if (msdu_chaining && !last_msdu) - corrupted = true; - if (last_msdu) { msdu->next = NULL; break; @@ -457,20 +453,6 @@ static int ath10k_htt_rx_amsdu_pop(struct ath10k_htt *htt, msdu_chaining = -1; /* - * Apparently FW sometimes reports weird chained MSDU sequences with - * more than one rx descriptor. This seems like a bug but needs more - * analyzing. For the time being fix it by dropping such sequences to - * avoid blowing up the host system. - */ - if (corrupted) { - ath10k_warn("failed to pop chained msdus, dropping\n"); - ath10k_htt_rx_free_msdu_chain(*head_msdu); - *head_msdu = NULL; - *tail_msdu = NULL; - msdu_chaining = -EINVAL; - } - - /* * Don't refill the ring yet. * * First, the elements popped here are still in use - it is not