Commit 9d5b80fd authored by Sujith Manoharan's avatar Sujith Manoharan Committed by John W. Linville

ath9k_htc: Use CONFIG_ATH9K_BTCOEX_SUPPORT

ath9k_htc can also make use of CONFIG_ATH9K_BTCOEX_SUPPORT
to be compiled without BTCOEX support.
Signed-off-by: default avatarSujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent cee5341d
...@@ -400,12 +400,21 @@ struct ath_btcoex { ...@@ -400,12 +400,21 @@ struct ath_btcoex {
u32 btscan_no_stomp; u32 btscan_no_stomp;
}; };
#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
void ath9k_htc_init_btcoex(struct ath9k_htc_priv *priv, char *product); void ath9k_htc_init_btcoex(struct ath9k_htc_priv *priv, char *product);
void ath9k_htc_start_btcoex(struct ath9k_htc_priv *priv); void ath9k_htc_start_btcoex(struct ath9k_htc_priv *priv);
void ath9k_htc_stop_btcoex(struct ath9k_htc_priv *priv); void ath9k_htc_stop_btcoex(struct ath9k_htc_priv *priv);
void ath_htc_init_btcoex_work(struct ath9k_htc_priv *priv); #else
void ath_htc_resume_btcoex_work(struct ath9k_htc_priv *priv); static inline void ath9k_htc_init_btcoex(struct ath9k_htc_priv *priv, char *product)
void ath_htc_cancel_btcoex_work(struct ath9k_htc_priv *priv); {
}
static inline void ath9k_htc_start_btcoex(struct ath9k_htc_priv *priv)
{
}
static inline void ath9k_htc_stop_btcoex(struct ath9k_htc_priv *priv)
{
}
#endif /* CONFIG_ATH9K_BTCOEX_SUPPORT */
#define OP_INVALID BIT(0) #define OP_INVALID BIT(0)
#define OP_SCANNING BIT(1) #define OP_SCANNING BIT(1)
...@@ -486,7 +495,10 @@ struct ath9k_htc_priv { ...@@ -486,7 +495,10 @@ struct ath9k_htc_priv {
int cabq; int cabq;
int hwq_map[WME_NUM_AC]; int hwq_map[WME_NUM_AC];
#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
struct ath_btcoex btcoex; struct ath_btcoex btcoex;
#endif
struct delayed_work coex_period_work; struct delayed_work coex_period_work;
struct delayed_work duty_cycle_work; struct delayed_work duty_cycle_work;
#ifdef CONFIG_ATH9K_HTC_DEBUGFS #ifdef CONFIG_ATH9K_HTC_DEBUGFS
......
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
#define ATH_HTC_BTCOEX_PRODUCT_ID "wb193" #define ATH_HTC_BTCOEX_PRODUCT_ID "wb193"
#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
/* /*
* Detects if there is any priority bt traffic * Detects if there is any priority bt traffic
*/ */
...@@ -113,7 +115,7 @@ static void ath_btcoex_duty_cycle_work(struct work_struct *work) ...@@ -113,7 +115,7 @@ static void ath_btcoex_duty_cycle_work(struct work_struct *work)
ath9k_hw_btcoex_enable(priv->ah); ath9k_hw_btcoex_enable(priv->ah);
} }
void ath_htc_init_btcoex_work(struct ath9k_htc_priv *priv) static void ath_htc_init_btcoex_work(struct ath9k_htc_priv *priv)
{ {
struct ath_btcoex *btcoex = &priv->btcoex; struct ath_btcoex *btcoex = &priv->btcoex;
...@@ -133,7 +135,7 @@ void ath_htc_init_btcoex_work(struct ath9k_htc_priv *priv) ...@@ -133,7 +135,7 @@ void ath_htc_init_btcoex_work(struct ath9k_htc_priv *priv)
* (Re)start btcoex work * (Re)start btcoex work
*/ */
void ath_htc_resume_btcoex_work(struct ath9k_htc_priv *priv) static void ath_htc_resume_btcoex_work(struct ath9k_htc_priv *priv)
{ {
struct ath_btcoex *btcoex = &priv->btcoex; struct ath_btcoex *btcoex = &priv->btcoex;
struct ath_hw *ah = priv->ah; struct ath_hw *ah = priv->ah;
...@@ -153,7 +155,7 @@ void ath_htc_resume_btcoex_work(struct ath9k_htc_priv *priv) ...@@ -153,7 +155,7 @@ void ath_htc_resume_btcoex_work(struct ath9k_htc_priv *priv)
/* /*
* Cancel btcoex and bt duty cycle work. * Cancel btcoex and bt duty cycle work.
*/ */
void ath_htc_cancel_btcoex_work(struct ath9k_htc_priv *priv) static void ath_htc_cancel_btcoex_work(struct ath9k_htc_priv *priv)
{ {
if (ath9k_hw_get_btcoex_scheme(priv->ah) == ATH_BTCOEX_CFG_NONE) if (ath9k_hw_get_btcoex_scheme(priv->ah) == ATH_BTCOEX_CFG_NONE)
return; return;
...@@ -216,6 +218,8 @@ void ath9k_htc_init_btcoex(struct ath9k_htc_priv *priv, char *product) ...@@ -216,6 +218,8 @@ void ath9k_htc_init_btcoex(struct ath9k_htc_priv *priv, char *product)
} }
} }
#endif /* CONFIG_ATH9K_BTCOEX_SUPPORT */
/*******/ /*******/
/* LED */ /* LED */
/*******/ /*******/
......
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