aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath10k/debug.c
diff options
context:
space:
mode:
authorTamizh Chelvam <[email protected]>2020-01-27 19:18:56 +0000
committerKalle Valo <[email protected]>2020-02-11 14:22:49 +0000
commit9f83993e1a92ba19fcee635e4aff823a72a18d0c (patch)
tree4ace321daa4d8701e6eea0c0bff9142fcbcf8b2c /drivers/net/wireless/ath/ath10k/debug.c
parentdt-bindings: ath10k: Add new dt entries to identify coex support (diff)
downloadkernel-9f83993e1a92ba19fcee635e4aff823a72a18d0c.tar.gz
kernel-9f83993e1a92ba19fcee635e4aff823a72a18d0c.zip
ath10k: Add support to read btcoex related data from DT
BTCOEX feature is not supported by all QCA4019 chipsets. Since btcoex enabled by default in firmware, host needs to enable COEX support depends on the hardware. Enabling it by default in unsupported hardware will cause some feature disabled in hardware. This patch will read btcoex_support flag and wlan priority gpio pin number from DT. Depends on the btcoex_support flag value host will expose BTCOEX support and wlan priority gpio pin number to target. Testing: * Tested HW : QCA4019 * Tested FW : 10.4-3.2.1.1-00017 Signed-off-by: Tamizh Chelvam <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/debug.c')
-rw-r--r--drivers/net/wireless/ath/ath10k/debug.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c
index e000677ac516..3894b77db71d 100644
--- a/drivers/net/wireless/ath/ath10k/debug.c
+++ b/drivers/net/wireless/ath/ath10k/debug.c
@@ -1978,6 +1978,9 @@ static ssize_t ath10k_write_btcoex(struct file *file,
if (strtobool(buf, &val) != 0)
return -EINVAL;
+ if (!ar->coex_support)
+ return -EOPNOTSUPP;
+
mutex_lock(&ar->conf_mutex);
if (ar->state != ATH10K_STATE_ON &&