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

Commit c2cd870b authored by Maya Erez's avatar Maya Erez Committed by Gerrit - the friendly Code Review server
Browse files

wil6210: enable AMSDU by default



Enable AMSDU to allow MSDU aggregation for performance improvements.
As AMSDU requires FW support, add new FW capability
WMI_FW_CAPABILITY_AMSDU to notify the driver on its support.
Change the amsdu_en module parameter to debugfs parameter to
allow disabling of AMSDU for debug purposes (default true),
usage:
echo 0 > amsdu_en

Change-Id: Iceaa075276de1ae929d0a8defeacf0a39db577af
Signed-off-by: default avatarMaya Erez <merez@codeaurora.org>
parent fb5728db
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -2165,6 +2165,7 @@ static const struct dbg_off dbg_wil_off[] = {
	WIL_FIELD(wakeup_trigger, 0644,		doff_u8),
	WIL_FIELD(wakeup_trigger, 0644,		doff_u8),
	WIL_FIELD(ring_idle_trsh, 0644,	doff_u32),
	WIL_FIELD(ring_idle_trsh, 0644,	doff_u32),
	WIL_FIELD(num_rx_status_rings, 0644,	doff_u8),
	WIL_FIELD(num_rx_status_rings, 0644,	doff_u8),
	WIL_FIELD(amsdu_en, 0644,	doff_u8),
	{},
	{},
};
};


+2 −0
Original line number Original line Diff line number Diff line
@@ -653,6 +653,8 @@ int wil_priv_init(struct wil6210_priv *wil)
	/* num of rx srings can be updated via debugfs before allocation */
	/* num of rx srings can be updated via debugfs before allocation */
	wil->num_rx_status_rings = WIL_DEFAULT_NUM_RX_STATUS_RINGS;
	wil->num_rx_status_rings = WIL_DEFAULT_NUM_RX_STATUS_RINGS;


	wil->amsdu_en = 1;

	return 0;
	return 0;


out_wmi_wq:
out_wmi_wq:
+3 −0
Original line number Original line Diff line number Diff line
@@ -1004,6 +1004,9 @@ struct wil6210_priv {


	bool secured_boot;
	bool secured_boot;
	u8 boot_config;
	u8 boot_config;

	/* relevant only for eDMA */
	bool amsdu_en;
};
};


#define wil_to_wiphy(i) (i->wiphy)
#define wil_to_wiphy(i) (i->wiphy)
+2 −6
Original line number Original line Diff line number Diff line
@@ -39,10 +39,6 @@ module_param(led_id, byte, 0444);
MODULE_PARM_DESC(led_id,
MODULE_PARM_DESC(led_id,
		 " 60G device led enablement. Set the led ID (0-2) to enable");
		 " 60G device led enablement. Set the led ID (0-2) to enable");


static bool amsdu_en;
module_param(amsdu_en, bool, 0444);
MODULE_PARM_DESC(amsdu_en, " enable A-MSDU, default: false");

#define WIL_WAIT_FOR_SUSPEND_RESUME_COMP 200
#define WIL_WAIT_FOR_SUSPEND_RESUME_COMP 200
#define WIL_WMI_CALL_GENERAL_TO_MS 100
#define WIL_WMI_CALL_GENERAL_TO_MS 100


@@ -2153,8 +2149,8 @@ int wmi_addba(struct wil6210_priv *wil, u8 mid,
	      u8 ringid, u8 size, u16 timeout)
	      u8 ringid, u8 size, u16 timeout)
{
{
	u8 amsdu = wil->use_enhanced_dma_hw && use_rx_hw_reordering &&
	u8 amsdu = wil->use_enhanced_dma_hw && use_rx_hw_reordering &&
		amsdu_en ? 1 : 0;
		test_bit(WMI_FW_CAPABILITY_AMSDU, wil->fw_capabilities) &&

		wil->amsdu_en;
	struct wmi_ring_ba_en_cmd cmd = {
	struct wmi_ring_ba_en_cmd cmd = {
		.ring_id = ringid,
		.ring_id = ringid,
		.agg_max_wsize = size,
		.agg_max_wsize = size,
+1 −0
Original line number Original line Diff line number Diff line
@@ -74,6 +74,7 @@ enum wmi_fw_capability {
	WMI_FW_CAPABILITY_PNO				= 15,
	WMI_FW_CAPABILITY_PNO				= 15,
	WMI_FW_CAPABILITY_CONNECT_SNR_THR		= 16,
	WMI_FW_CAPABILITY_CONNECT_SNR_THR		= 16,
	WMI_FW_CAPABILITY_REF_CLOCK_CONTROL		= 18,
	WMI_FW_CAPABILITY_REF_CLOCK_CONTROL		= 18,
	WMI_FW_CAPABILITY_AMSDU				= 23,
	WMI_FW_CAPABILITY_MAX,
	WMI_FW_CAPABILITY_MAX,
};
};