wil6210: allow disabling EDMG through force_edmg_channel debugfs

EDMG feature can be controlled through force_edmg_channel
debugfs but cannot be disabled.
Add support for disabling EDMG feature by setting
force_edmg_channel = 255.

Change-Id: I2cfc242e82ad8eb28f895cf537352de1265c65ec
Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
This commit is contained in:
Alexei Avshalom Lazar 2019-12-01 10:10:01 +02:00
commit 9c6eb35345
2 changed files with 6 additions and 0 deletions

View file

@ -34,6 +34,8 @@
*/
#define WIL_EDMG_CHANNELS (BIT(0) | BIT(1) | BIT(2) | BIT(3))
#define WIL_DISABLE_EDMG 255
bool disable_ap_sme;
module_param(disable_ap_sme, bool, 0444);
MODULE_PARM_DESC(disable_ap_sme, " let user space handle AP mode SME");
@ -594,6 +596,9 @@ int wil_spec2wmi_ch(u8 spec_ch, u8 *wmi_ch)
case 12:
*wmi_ch = WMI_CHANNEL_12;
break;
case WIL_DISABLE_EDMG:
*wmi_ch = 0;
break;
default:
return -EINVAL;
}

View file

@ -1049,6 +1049,7 @@ struct wil6210_priv {
u8 wakeup_trigger;
struct wil_suspend_stats suspend_stats;
struct wil_debugfs_data dbg_data;
/* set to WIL_EDMG_DISABLE to force disable EDMG */
u8 force_edmg_channel;
bool tx_latency; /* collect TX latency measurements */
size_t tx_latency_res; /* bin resolution in usec */