From patchwork Sat Sep 30 17:37:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: silexcommon@gmail.com X-Patchwork-Id: 9979567 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 5B0F36034B for ; Sat, 30 Sep 2017 17:39:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4475028EF7 for ; Sat, 30 Sep 2017 17:39:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 396AE28EFE; Sat, 30 Sep 2017 17:39:19 +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_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=unavailable 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 5081C28EF7 for ; Sat, 30 Sep 2017 17:39:18 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To: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:List-Owner; bh=Q8UhARMQ+Dcl6BLYz6IuNC24dsxnTpllRIzyHLNYXP4=; b=Ggw6Hc7qpHoL8XysMD1NYHoOK+ avsVCtgQ/uz2QtpLGVLAIb7m9ece97xgvQ0UK3qRa6lvM4Ius4qZFq6veV/N++jd4Cq91jAKT+YZ1 GdeZz8es/rN6p67wDDTxJQlzUlJGchuoDLHvVERJ/PvX+xuA16cWoEkx/lvFju1315xilgNP+5S5o akQ6AoXseHHlDIy1qeyBd8TVn1WprHAMaftwat5B1DYs0d4ydDQkIbz53tM0FpCK8CmzuHtXy3OW2 wKIpyaa5GvnXd629gJ2Q8HuP7zLHs2qnnZIU/lVOBBUK5elhOEsOyNaLxey7cgMct/y+TQy8+i5T3 dfk29mgg==; 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 1dyLjM-0001l4-ID; Sat, 30 Sep 2017 17:39:12 +0000 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dyLj5-0001PI-Gx for ath10k@lists.infradead.org; Sat, 30 Sep 2017 17:39:02 +0000 Received: by mail-pf0-x244.google.com with SMTP id m28so1628016pfi.0 for ; Sat, 30 Sep 2017 10:38:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5vNvl7lvAJeL7vBdKL6faUAGJZMtbt+nQ4R/MD+6rK4=; b=LBQFeuwrLS0cNmigpaxc85LWdjzbSS+6ciXZCjrRKj3UtHORfBOwyNcfPXfQ+2++Dv SykhwrUwtcoMIiTYzoa4/USS/+LNza6K8ProJ6ZOepwvOzMnoPde1BxKBlDz19Af0e1N /zaglBy47UzETsqE59eJZuwF+jNbuSKBxhi36wnAwtDbHzNa1JYCyglXVjp2F0GV55O0 HeV1g3ZOkuLT/8Tlvrn/rRaef2i9qEN4FD86NkMobWk1jtF5xE7Mcrjrz0cjDEjB7Cln 0LEoVUVthwRlafUEFTN9pfGI0drGvTQ6njIth4FYAeJj1C40Hs/rGdqak5NtZ49OXz+W IaDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=5vNvl7lvAJeL7vBdKL6faUAGJZMtbt+nQ4R/MD+6rK4=; b=GNgfbkUpzVcCN0i7UGRf/Dh8L8dd/Wonj5HxryOacJUBJ5hd/LRDxIHIPi6XfRj+33 1tT8Y1t+XTCdrUFQYnr5rMp5Nlo6In6nXxAxRc1D51tnZtqmbkx2xg/vS29QSPe9pZjy xuOE0wcLMRtWDirkVQsEneygyuZ8ufakblynhr0hoDs0nz/iiQ2Cmofa/M4qw+fX5hv3 OQQFxvKmFvS75MKyoDzWa1nxF51o1igbjTZ23NxXa1BphxcRgnP3ADkTewOmUdqccFFH SikP+UyKJoPWzP+rUvMcFFJRG5Ck7vZ0T2F1JUIVvoeGdUEkoxNj7prDJvJQImogTvRY 1fCw== X-Gm-Message-State: AHPjjUip0BBYQn9d6NwhBw6mI0QpUOrvkrw5U+aatDxQ+cTZFvM0YM29 aXGifU56czWsBIUqFYgg7kGXJt+Cs8A= X-Google-Smtp-Source: AOwi7QDEfQj5xXaRiGUk99M5oKr0FUoQZF3wuWHfOfxc3qEeq4NR3oN83efp7fOKS5UVcSWe4ual7A== X-Received: by 10.98.53.196 with SMTP id c187mr10954374pfa.38.1506793114846; Sat, 30 Sep 2017 10:38:34 -0700 (PDT) Received: from localhost.localdomain ([171.60.245.167]) by smtp.gmail.com with ESMTPSA id q15sm11197640pgc.64.2017.09.30.10.38.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 30 Sep 2017 10:38:34 -0700 (PDT) From: silexcommon@gmail.com X-Google-Original-From: alagusankar@silex-india.com To: ath10k@lists.infradead.org Subject: [PATCH 04/11] ath10k_sdio: reduce transmit msdu count Date: Sat, 30 Sep 2017 23:07:41 +0530 Message-Id: <1506793068-27445-5-git-send-email-alagusankar@silex-india.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1506793068-27445-1-git-send-email-alagusankar@silex-india.com> References: <1506793068-27445-1-git-send-email-alagusankar@silex-india.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170930_103856_140313_5BC78186 X-CRM114-Status: GOOD ( 11.59 ) 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: Alagu Sankar , linux-wireless@vger.kernel.org MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Alagu Sankar Reduce the transmit MSDU count for SDIO, to match with the descriptors as used by the firmware. This also acts as a high watermark level for transmit. Too many packets to the firmware results in transmit overflow interrupt. Signed-off-by: Alagu Sankar --- drivers/net/wireless/ath/ath10k/core.c | 6 +++++- drivers/net/wireless/ath/ath10k/hw.h | 1 + drivers/net/wireless/ath/ath10k/wmi-tlv.c | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index 86247c8..9de49f5 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -1968,7 +1968,11 @@ static int ath10k_core_init_firmware_features(struct ath10k *ar) ar->max_num_stations = TARGET_TLV_NUM_STATIONS; ar->max_num_vdevs = TARGET_TLV_NUM_VDEVS; ar->max_num_tdls_vdevs = TARGET_TLV_NUM_TDLS_VDEVS; - ar->htt.max_num_pending_tx = TARGET_TLV_NUM_MSDU_DESC; + if (ar->hif.bus == ATH10K_BUS_SDIO) + ar->htt.max_num_pending_tx = + TARGET_TLV_NUM_MSDU_DESC_HL; + else + ar->htt.max_num_pending_tx = TARGET_TLV_NUM_MSDU_DESC; ar->wow.max_num_patterns = TARGET_TLV_NUM_WOW_PATTERNS; ar->fw_stats_req_mask = WMI_STAT_PDEV | WMI_STAT_VDEV | WMI_STAT_PEER; diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h index 7c9f6f9..b870a92 100644 --- a/drivers/net/wireless/ath/ath10k/hw.h +++ b/drivers/net/wireless/ath/ath10k/hw.h @@ -688,6 +688,7 @@ struct ath10k_hw_ops { #define TARGET_TLV_NUM_TDLS_VDEVS 1 #define TARGET_TLV_NUM_TIDS ((TARGET_TLV_NUM_PEERS) * 2) #define TARGET_TLV_NUM_MSDU_DESC (1024 + 32) +#define TARGET_TLV_NUM_MSDU_DESC_HL 64 #define TARGET_TLV_NUM_WOW_PATTERNS 22 /* Target specific defines for QCA9377 high latency firmware */ diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.c b/drivers/net/wireless/ath/ath10k/wmi-tlv.c index 34e9770..3842caa 100644 --- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c +++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c @@ -1440,7 +1440,7 @@ static struct sk_buff *ath10k_wmi_tlv_op_gen_init(struct ath10k *ar) cfg->rx_skip_defrag_timeout_dup_detection_check = __cpu_to_le32(0); cfg->vow_config = __cpu_to_le32(0); cfg->gtk_offload_max_vdev = __cpu_to_le32(2); - cfg->num_msdu_desc = __cpu_to_le32(TARGET_TLV_NUM_MSDU_DESC); + cfg->num_msdu_desc = __cpu_to_le32(ar->htt.max_num_pending_tx); cfg->max_frag_entries = __cpu_to_le32(2); cfg->num_tdls_vdevs = __cpu_to_le32(TARGET_TLV_NUM_TDLS_VDEVS); cfg->num_tdls_conn_table_entries = __cpu_to_le32(0x20);