All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maya Erez <merez@codeaurora.org>
To: Kalle Valo <kvalo@codeaurora.org>
Cc: Maya Erez <merez@codeaurora.org>,
	linux-wireless@vger.kernel.org, wil6210@qti.qualcomm.com
Subject: [PATCH 13/20] wil6210: support max aggregation window size 64
Date: Sun, 22 Jul 2018 10:47:38 +0300	[thread overview]
Message-ID: <1532245665-15249-14-git-send-email-merez@codeaurora.org> (raw)
In-Reply-To: <1532245665-15249-1-git-send-email-merez@codeaurora.org>

FW can support BACK window size 64 for performance improvements.
A new FW capability is added for notifying the host on the increased
max BACK win size support.
Defining WIL_MAX_AGG_WSIZE_64 and WIL_MAX_AMPDU_SIZE_128 to be used
in this case.

Signed-off-by: Maya Erez <merez@codeaurora.org>
---
 drivers/net/wireless/ath/wil6210/main.c       | 9 +++++++++
 drivers/net/wireless/ath/wil6210/rx_reorder.c | 8 ++++----
 drivers/net/wireless/ath/wil6210/wil6210.h    | 5 +++++
 drivers/net/wireless/ath/wil6210/wmi.h        | 1 +
 4 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/ath/wil6210/main.c b/drivers/net/wireless/ath/wil6210/main.c
index 9495c6c..a949e91 100644
--- a/drivers/net/wireless/ath/wil6210/main.c
+++ b/drivers/net/wireless/ath/wil6210/main.c
@@ -1141,6 +1141,15 @@ void wil_refresh_fw_capabilities(struct wil6210_priv *wil)
 
 		wil->platform_ops.set_features(wil->platform_handle, features);
 	}
+
+	if (test_bit(WMI_FW_CAPABILITY_BACK_WIN_SIZE_64,
+		     wil->fw_capabilities)) {
+		wil->max_agg_wsize = WIL_MAX_AGG_WSIZE_64;
+		wil->max_ampdu_size = WIL_MAX_AMPDU_SIZE_128;
+	} else {
+		wil->max_agg_wsize = WIL_MAX_AGG_WSIZE;
+		wil->max_ampdu_size = WIL_MAX_AMPDU_SIZE;
+	}
 }
 
 void wil_mbox_ring_le2cpus(struct wil6210_mbox_ring *r)
diff --git a/drivers/net/wireless/ath/wil6210/rx_reorder.c b/drivers/net/wireless/ath/wil6210/rx_reorder.c
index ba4e93f..b608aa1 100644
--- a/drivers/net/wireless/ath/wil6210/rx_reorder.c
+++ b/drivers/net/wireless/ath/wil6210/rx_reorder.c
@@ -297,7 +297,7 @@ void wil_tid_ampdu_rx_free(struct wil6210_priv *wil,
 /* ADDBA processing */
 static u16 wil_agg_size(struct wil6210_priv *wil, u16 req_agg_wsize)
 {
-	u16 max_agg_size = min_t(u16, WIL_MAX_AGG_WSIZE, WIL_MAX_AMPDU_SIZE /
+	u16 max_agg_size = min_t(u16, wil->max_agg_wsize, wil->max_ampdu_size /
 				 (mtu_max + WIL_MAX_MPDU_OVERHEAD));
 
 	if (!req_agg_wsize)
@@ -364,11 +364,11 @@ int wil_addba_rx_request(struct wil6210_priv *wil, u8 mid,
 	if (status == WLAN_STATUS_SUCCESS) {
 		if (req_agg_wsize == 0) {
 			wil_dbg_misc(wil, "Suggest BACK wsize %d\n",
-				     WIL_MAX_AGG_WSIZE);
-			agg_wsize = WIL_MAX_AGG_WSIZE;
+				     wil->max_agg_wsize);
+			agg_wsize = wil->max_agg_wsize;
 		} else {
 			agg_wsize = min_t(u16,
-					  WIL_MAX_AGG_WSIZE, req_agg_wsize);
+					  wil->max_agg_wsize, req_agg_wsize);
 		}
 	}
 
diff --git a/drivers/net/wireless/ath/wil6210/wil6210.h b/drivers/net/wireless/ath/wil6210/wil6210.h
index 1857fb2..8eca6a8 100644
--- a/drivers/net/wireless/ath/wil6210/wil6210.h
+++ b/drivers/net/wireless/ath/wil6210/wil6210.h
@@ -90,6 +90,8 @@ static inline u32 WIL_GET_BITS(u32 x, int b0, int b1)
 #define WIL6210_NAPI_BUDGET	(16) /* arbitrary */
 #define WIL_MAX_AMPDU_SIZE	(64 * 1024) /* FW/HW limit */
 #define WIL_MAX_AGG_WSIZE	(32) /* FW/HW limit */
+#define WIL_MAX_AMPDU_SIZE_128	(128 * 1024) /* FW/HW limit */
+#define WIL_MAX_AGG_WSIZE_64	(64) /* FW/HW limit */
 #define WIL6210_MAX_STATUS_RINGS	(8)
 
 /* Hardware offload block adds the following:
@@ -1013,6 +1015,9 @@ struct wil6210_priv {
 	u8 boot_config;
 
 	struct wil_fw_stats_global fw_stats_global;
+
+	u32 max_agg_wsize;
+	u32 max_ampdu_size;
 };
 
 #define wil_to_wiphy(i) (i->wiphy)
diff --git a/drivers/net/wireless/ath/wil6210/wmi.h b/drivers/net/wireless/ath/wil6210/wmi.h
index 00cf3c4..719f310 100644
--- a/drivers/net/wireless/ath/wil6210/wmi.h
+++ b/drivers/net/wireless/ath/wil6210/wmi.h
@@ -99,6 +99,7 @@ enum wmi_fw_capability {
 	WMI_FW_CAPABILITY_AP_SME_OFFLOAD_NONE		= 19,
 	WMI_FW_CAPABILITY_MULTI_VIFS			= 20,
 	WMI_FW_CAPABILITY_FT_ROAMING			= 21,
+	WMI_FW_CAPABILITY_BACK_WIN_SIZE_64		= 22,
 	WMI_FW_CAPABILITY_AMSDU				= 23,
 	WMI_FW_CAPABILITY_MAX,
 };
-- 
1.9.1

  parent reply	other threads:[~2018-07-22  8:46 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-22  7:47 [PATCH 00/20] wil6210 patches Maya Erez
2018-07-22  7:47 ` [PATCH 01/20] wil6210: Rx multicast packets duplicate detection Maya Erez
2018-07-22  7:47 ` [PATCH 02/20] wil6210: drop Rx packets with L2 error indication from HW Maya Erez
2018-07-22  7:47 ` [PATCH 03/20] wil6210: add TX latency statistics Maya Erez
2018-07-22  7:47 ` [PATCH 04/20] wil6210: fix temperature debugfs Maya Erez
2018-07-22  7:47 ` [PATCH 05/20] wil6210: fix RX checksum report to network stack Maya Erez
2018-07-22  7:47 ` [PATCH 06/20] wil6210: support Talyn specific FW file Maya Erez
2018-07-22  7:47 ` [PATCH 07/20] wil6210: align to latest auto generated wmi.h Maya Erez
2018-07-22  7:47 ` [PATCH 08/20] wil6210: add 3-MSI support Maya Erez
2018-07-22  7:47 ` [PATCH 09/20] wil6210: fix min() compilation errors Maya Erez
2018-07-22  7:47 ` [PATCH 10/20] wil6210: add support for link statistics Maya Erez
2018-07-22  7:47 ` [PATCH 11/20] wil6210: send L2UF on behalf of newly associated station Maya Erez
2018-07-22 20:01   ` Johannes Berg
2018-07-23 15:27     ` merez
2018-07-22  7:47 ` [PATCH 12/20] wil6210: allow scan on AP interface Maya Erez
2018-07-22  7:47 ` Maya Erez [this message]
2018-07-22  7:47 ` [PATCH 14/20] wil6210: increase firmware ready timeout Maya Erez
2018-07-22  7:47 ` [PATCH 15/20] wil6210: support Talyn specific board file Maya Erez
2018-07-22  7:47 ` [PATCH 16/20] wil6210: set default 3-MSI Maya Erez
2018-07-22  7:47 ` [PATCH 17/20] wil6210: align to latest auto generated wmi.h Maya Erez
2018-07-22  7:47 ` [PATCH 18/20] wil6210: off channel transmit management frames in AP mode Maya Erez
2018-07-22  7:47 ` [PATCH 19/20] wil6210: prevent FW download if HW is configured for secured boot Maya Erez
2018-07-22  7:47 ` [PATCH 20/20] wil6210: fix eDMA RX chaining Maya Erez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1532245665-15249-14-git-send-email-merez@codeaurora.org \
    --to=merez@codeaurora.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=wil6210@qti.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.