From patchwork Sun Oct 29 07:41:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 10031231 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5E76D602B5 for ; Sun, 29 Oct 2017 07:42:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A1E9286B5 for ; Sun, 29 Oct 2017 07:42:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2BC6C286E6; Sun, 29 Oct 2017 07:42:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 40BD4286B5 for ; Sun, 29 Oct 2017 07:42:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=UeMMW5IN3m5RBSW+a0RaizCNgZmO/U2ifB/aKuAlPYs=; b=DqXw+E6d2g95em r2j+WNPNR3ArKkAkOYE+zoa5q1dbNp6ETe3VcykeyEqQLdPBC1VUOLgcoF+dktDDaqXeQrUsxbGTF mqjIb/w3mINPyNOX2/nSFdd6b/fyKoe6Xo1Jk1eAY0mgA8ikXrY2vhaJyLVnHYUPlDknNUPeo+dpe VXpngLqTJUy+P8A252jCZqzunVxQ88M2649nYYRyQlzknumMcW2/SakbGGC8lyvD4obA0cicyI9Be KVVB/dBGhMTz7e8IK/Lenv32NvzCkepD/mE5AqhK7E/5j5Pb7d5GDD2mKSFv/Q7788/hEevunsr8/ K+xMOX4RbnvG7pv3ynxg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1e8iEZ-00074w-6q; Sun, 29 Oct 2017 07:42:15 +0000 Received: from sabertooth01.qualcomm.com ([65.197.215.72]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e8iEV-00073h-DR for ath10k@lists.infradead.org; Sun, 29 Oct 2017 07:42:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1509262931; x=1540798931; h=from:to:cc:subject:date:message-id:mime-version; bh=2i3YYaDrl0exIe+McCRNT7pfF6rIOMoJZ5uxLFi6Wss=; b=SLpc2RKMgLwSyJXw5rno2TA17fOm+ergzPW1Yj2l07gT2ZJRlYxuWoZW SqxE0NSaIxq6U/s1exQij5SCQtVLeacF//WZSJ3RXIVtMkrrk7EOW1NZH Ob096Qa1FpCxgr48Vj3WYDJGXuGjmAgEt3agbXC4f26ozszSKNq0bPgFA w=; X-IronPort-AV: E=Sophos;i="5.44,313,1505804400"; d="scan'208";a="116247208" Received: from unknown (HELO ironmsg02-L.qualcomm.com) ([10.53.140.109]) by sabertooth01.qualcomm.com with ESMTP; 29 Oct 2017 00:41:26 -0700 X-IronPort-AV: E=McAfee;i="5900,7806,8698"; a="1026294663" X-MGA-submission: =?us-ascii?q?MDE8gzXpPb6SOolJvem0TXvinuq30WAkGASff6?= =?us-ascii?q?EF7Wbdsijdr5ITvcsII6izMaORn68z/Iah63r5RpNHq+vOjFJyyM5pVJ?= =?us-ascii?q?+K5mSSCNcpLPLHU5GciesJyPcNknO/qsFT9/89Fh8biQOQ9FLbUjCmVf?= =?us-ascii?q?yW?= Received: from nasanexm01a.na.qualcomm.com ([10.85.0.81]) by ironmsg02-L.qualcomm.com with ESMTP/TLS/AES256-SHA; 29 Oct 2017 00:41:26 -0700 Received: from euamsexm01a.eu.qualcomm.com (10.251.127.40) by nasanexm01a.na.qualcomm.com (10.85.0.81) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Sun, 29 Oct 2017 00:41:25 -0700 Received: from potku.adurom.net.com (10.80.80.8) by euamsexm01a.eu.qualcomm.com (10.251.127.40) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Sun, 29 Oct 2017 08:41:21 +0100 From: Kalle Valo To: Subject: [PATCH] Revert "ath10k: fix napi_poll budget overflow" Date: Sun, 29 Oct 2017 09:41:16 +0200 Message-ID: <1509262876-10944-1-git-send-email-kvalo@qca.qualcomm.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01F.na.qualcomm.com (10.85.0.32) To euamsexm01a.eu.qualcomm.com (10.251.127.40) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171029_004211_499838_F9E57E54 X-CRM114-Status: GOOD ( 10.78 ) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-wireless@vger.kernel.org Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Thorsten reported on that commit c9353bf483d3 made ath10k unstable with QCA6174 on his Dell XPS13 (9360) with an error message: ath10k_pci 0000:3a:00.0: failed to extract amsdu: -11 It only seemed to happen with certain APs, not all, but when it happened the only way to get ath10k working was to switch the wifi off and on with a hotkey. As this commit made things even worse (a warning vs breaking the whole connection) let's revert the commit for now and while the issue is being fixed. Link: http://lists.infradead.org/pipermail/ath10k/2017-October/010227.html Reported-by: Thorsten Leemhuis Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath10k/htt_rx.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c index f068376ec565..7ae3926f4995 100644 --- a/drivers/net/wireless/ath/ath10k/htt_rx.c +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c @@ -1745,8 +1745,7 @@ static void ath10k_htt_rx_delba(struct ath10k *ar, struct htt_resp *resp) } static int ath10k_htt_rx_extract_amsdu(struct sk_buff_head *list, - struct sk_buff_head *amsdu, - int budget_left) + struct sk_buff_head *amsdu) { struct sk_buff *msdu; struct htt_rx_desc *rxd; @@ -1757,9 +1756,8 @@ static int ath10k_htt_rx_extract_amsdu(struct sk_buff_head *list, if (WARN_ON(!skb_queue_empty(amsdu))) return -EINVAL; - while ((msdu = __skb_dequeue(list)) && budget_left) { + while ((msdu = __skb_dequeue(list))) { __skb_queue_tail(amsdu, msdu); - budget_left--; rxd = (void *)msdu->data - sizeof(*rxd); if (rxd->msdu_end.common.info0 & @@ -1850,8 +1848,7 @@ static int ath10k_htt_rx_h_rx_offload(struct ath10k *ar, return num_msdu; } -static int ath10k_htt_rx_in_ord_ind(struct ath10k *ar, struct sk_buff *skb, - int budget_left) +static int ath10k_htt_rx_in_ord_ind(struct ath10k *ar, struct sk_buff *skb) { struct ath10k_htt *htt = &ar->htt; struct htt_resp *resp = (void *)skb->data; @@ -1908,9 +1905,9 @@ static int ath10k_htt_rx_in_ord_ind(struct ath10k *ar, struct sk_buff *skb, if (offload) num_msdus = ath10k_htt_rx_h_rx_offload(ar, &list); - while (!skb_queue_empty(&list) && budget_left) { + while (!skb_queue_empty(&list)) { __skb_queue_head_init(&amsdu); - ret = ath10k_htt_rx_extract_amsdu(&list, &amsdu, budget_left); + ret = ath10k_htt_rx_extract_amsdu(&list, &amsdu); switch (ret) { case 0: /* Note: The in-order indication may report interleaved @@ -1920,7 +1917,6 @@ static int ath10k_htt_rx_in_ord_ind(struct ath10k *ar, struct sk_buff *skb, * should still give an idea about rx rate to the user. */ num_msdus += skb_queue_len(&amsdu); - budget_left -= skb_queue_len(&amsdu); ath10k_htt_rx_h_ppdu(ar, &amsdu, status, vdev_id); ath10k_htt_rx_h_filter(ar, &amsdu, status); ath10k_htt_rx_h_mpdu(ar, &amsdu, status); @@ -2563,8 +2559,7 @@ int ath10k_htt_txrx_compl_task(struct ath10k *ar, int budget) } spin_lock_bh(&htt->rx_ring.lock); - num_rx_msdus = ath10k_htt_rx_in_ord_ind(ar, skb, - (budget - quota)); + num_rx_msdus = ath10k_htt_rx_in_ord_ind(ar, skb); spin_unlock_bh(&htt->rx_ring.lock); if (num_rx_msdus < 0) { resched_napi = true;