Commit 7f34778e authored by Mohammed Shafi Shajakhan's avatar Mohammed Shafi Shajakhan Committed by John W. Linville

ath9k_htc: Add a modparam to enable BTCOEX rather than default

Enable BTCOEX for WB193(which seems to be the only supported
ath9k_htc BTCOEX chipset)only when it is enabled via modparam,
rather than enabling it by default.

Cc: Vivek Natarajan <nataraja@qualcomm.com>
Signed-off-by: default avatarMohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent fed27f6f
...@@ -182,8 +182,17 @@ void ath9k_htc_stop_btcoex(struct ath9k_htc_priv *priv) ...@@ -182,8 +182,17 @@ void ath9k_htc_stop_btcoex(struct ath9k_htc_priv *priv)
void ath9k_htc_init_btcoex(struct ath9k_htc_priv *priv, char *product) void ath9k_htc_init_btcoex(struct ath9k_htc_priv *priv, char *product)
{ {
struct ath_hw *ah = priv->ah; struct ath_hw *ah = priv->ah;
struct ath_common *common = ath9k_hw_common(ah);
int qnum; int qnum;
/*
* Check if BTCOEX is globally disabled.
*/
if (!common->btcoex_enabled) {
ah->btcoex_hw.scheme = ATH_BTCOEX_CFG_NONE;
return;
}
if (product && strncmp(product, ATH_HTC_BTCOEX_PRODUCT_ID, 5) == 0) { if (product && strncmp(product, ATH_HTC_BTCOEX_PRODUCT_ID, 5) == 0) {
ah->btcoex_hw.scheme = ATH_BTCOEX_CFG_3WIRE; ah->btcoex_hw.scheme = ATH_BTCOEX_CFG_3WIRE;
} }
......
...@@ -30,6 +30,10 @@ int htc_modparam_nohwcrypt; ...@@ -30,6 +30,10 @@ int htc_modparam_nohwcrypt;
module_param_named(nohwcrypt, htc_modparam_nohwcrypt, int, 0444); module_param_named(nohwcrypt, htc_modparam_nohwcrypt, int, 0444);
MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption"); MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption");
static int ath9k_htc_btcoex_enable;
module_param_named(btcoex_enable, ath9k_htc_btcoex_enable, int, 0444);
MODULE_PARM_DESC(btcoex_enable, "Enable wifi-BT coexistence");
#define CHAN2G(_freq, _idx) { \ #define CHAN2G(_freq, _idx) { \
.center_freq = (_freq), \ .center_freq = (_freq), \
.hw_value = (_idx), \ .hw_value = (_idx), \
...@@ -635,6 +639,7 @@ static int ath9k_init_priv(struct ath9k_htc_priv *priv, ...@@ -635,6 +639,7 @@ static int ath9k_init_priv(struct ath9k_htc_priv *priv,
common->hw = priv->hw; common->hw = priv->hw;
common->priv = priv; common->priv = priv;
common->debug_mask = ath9k_debug; common->debug_mask = ath9k_debug;
common->btcoex_enabled = ath9k_htc_btcoex_enable == 1;
spin_lock_init(&priv->beacon_lock); spin_lock_init(&priv->beacon_lock);
spin_lock_init(&priv->tx.tx_lock); spin_lock_init(&priv->tx.tx_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment