diff options
author | Rajkumar Manoharan <rmanohar@qti.qualcomm.com> | 2016-05-27 20:15:59 +0530 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2016-06-02 17:55:22 +0300 |
commit | 39136248cf8d2627fb5925f44aa7752e36b004f6 (patch) | |
tree | 7b24c33df65d58ed6c2bc1a752a63c5646b2536b /drivers/net/wireless/ath/ath10k/debug.c | |
parent | 64e001f41676bd2455bef8895a6e8eee333ede93 (diff) | |
download | kernel_replicant_linux-39136248cf8d2627fb5925f44aa7752e36b004f6.tar.gz kernel_replicant_linux-39136248cf8d2627fb5925f44aa7752e36b004f6.tar.bz2 kernel_replicant_linux-39136248cf8d2627fb5925f44aa7752e36b004f6.zip |
ath10k: add pdev param support to enable/disable btcoex
10.4 firmware has support to enable or disable btcoex functionality
without reloading firmware via wmi pdev param. Add provision to send
pdev param command via existing btcoex knob.
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/debug.c')
-rw-r--r-- | drivers/net/wireless/ath/ath10k/debug.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c index 54cb6292b879..8fbb8f2c7828 100644 --- a/drivers/net/wireless/ath/ath10k/debug.c +++ b/drivers/net/wireless/ath/ath10k/debug.c @@ -2125,6 +2125,7 @@ static ssize_t ath10k_write_btcoex(struct file *file, size_t buf_size; int ret; bool val; + u32 pdev_param; buf_size = min(count, (sizeof(buf) - 1)); if (copy_from_user(buf, ubuf, buf_size)) @@ -2148,14 +2149,25 @@ static ssize_t ath10k_write_btcoex(struct file *file, goto exit; } + pdev_param = ar->wmi.pdev_param->enable_btcoex; + if (test_bit(ATH10K_FW_FEATURE_BTCOEX_PARAM, + ar->running_fw->fw_file.fw_features)) { + ret = ath10k_wmi_pdev_set_param(ar, pdev_param, val); + if (ret) { + ath10k_warn(ar, "failed to enable btcoex: %d\n", ret); + ret = count; + goto exit; + } + } else { + ath10k_info(ar, "restarting firmware due to btcoex change"); + queue_work(ar->workqueue, &ar->restart_work); + } + if (val) set_bit(ATH10K_FLAG_BTCOEX, &ar->dev_flags); else clear_bit(ATH10K_FLAG_BTCOEX, &ar->dev_flags); - ath10k_info(ar, "restarting firmware due to btcoex change"); - - queue_work(ar->workqueue, &ar->restart_work); ret = count; exit: |