From 9c6eb35345cbde31e375986f2bf3251ca922f310 Mon Sep 17 00:00:00 2001 From: Alexei Avshalom Lazar Date: Sun, 1 Dec 2019 10:10:01 +0200 Subject: [PATCH] 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 --- drivers/net/wireless/ath/wil6210/cfg80211.c | 5 +++++ drivers/net/wireless/ath/wil6210/wil6210.h | 1 + 2 files changed, 6 insertions(+) diff --git a/drivers/net/wireless/ath/wil6210/cfg80211.c b/drivers/net/wireless/ath/wil6210/cfg80211.c index 5cef9206daaa..92d1fcdad680 100644 --- a/drivers/net/wireless/ath/wil6210/cfg80211.c +++ b/drivers/net/wireless/ath/wil6210/cfg80211.c @@ -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; } diff --git a/drivers/net/wireless/ath/wil6210/wil6210.h b/drivers/net/wireless/ath/wil6210/wil6210.h index 8454c662f861..9deeb3dec992 100644 --- a/drivers/net/wireless/ath/wil6210/wil6210.h +++ b/drivers/net/wireless/ath/wil6210/wil6210.h @@ -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 */