Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 13ffd1bc authored by Maya Erez's avatar Maya Erez
Browse files

wil6210: support aggregation max window size 64



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.

Change-Id: I174c20a78cb2cb7987c782698fb6cee02d10a09b
Signed-off-by: default avatarMaya Erez <merez@codeaurora.org>
parent b28cd1aa
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -1145,6 +1145,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)
+4 −4
Original line number Diff line number Diff line
@@ -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 @@ __acquires(&sta->tid_rx_lock) __releases(&sta->tid_rx_lock)
	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);
		}
	}

+5 −0
Original line number Diff line number Diff line
@@ -91,6 +91,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:
@@ -1015,6 +1017,9 @@ struct wil6210_priv {
	u32 rx_buff_id_count;
	bool amsdu_en;
	bool use_rx_hw_reordering;

	u32 max_agg_wsize;
	u32 max_ampdu_size;
};

#define wil_to_wiphy(i) (i->wiphy)
+1 −0
Original line number Diff line number Diff line
@@ -88,6 +88,7 @@ enum wmi_fw_capability {
	WMI_FW_CAPABILITY_CHANNEL_BONDING		= 17,
	WMI_FW_CAPABILITY_REF_CLOCK_CONTROL		= 18,
	WMI_FW_CAPABILITY_AP_SME_OFFLOAD_NONE		= 19,
	WMI_FW_CAPABILITY_BACK_WIN_SIZE_64		= 22,
	WMI_FW_CAPABILITY_AMSDU				= 23,
	WMI_FW_CAPABILITY_MAX,
};