diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2012-02-22 02:11:47 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-02-27 14:06:38 -0500 |
commit | 9d5b80fd36dd524d01a7819586b1d95312c0922f (patch) | |
tree | 37d57641defe80bd764f8a7c0b5eed5c0a94366a /drivers/net/wireless/ath | |
parent | cee5341d47fcd1cb79bbb71e430f502285fef8db (diff) |
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: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc.h | 18 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_gpio.c | 10 |
2 files changed, 22 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h index 8046be66fa87..135795257d95 100644 --- a/drivers/net/wireless/ath/ath9k/htc.h +++ b/drivers/net/wireless/ath/ath9k/htc.h | |||
@@ -400,12 +400,21 @@ struct ath_btcoex { | |||
400 | u32 btscan_no_stomp; | 400 | u32 btscan_no_stomp; |
401 | }; | 401 | }; |
402 | 402 | ||
403 | #ifdef CONFIG_ATH9K_BTCOEX_SUPPORT | ||
403 | void ath9k_htc_init_btcoex(struct ath9k_htc_priv *priv, char *product); | 404 | void ath9k_htc_init_btcoex(struct ath9k_htc_priv *priv, char *product); |
404 | void ath9k_htc_start_btcoex(struct ath9k_htc_priv *priv); | 405 | void ath9k_htc_start_btcoex(struct ath9k_htc_priv *priv); |
405 | void ath9k_htc_stop_btcoex(struct ath9k_htc_priv *priv); | 406 | void ath9k_htc_stop_btcoex(struct ath9k_htc_priv *priv); |
406 | void ath_htc_init_btcoex_work(struct ath9k_htc_priv *priv); | 407 | #else |
407 | void ath_htc_resume_btcoex_work(struct ath9k_htc_priv *priv); | 408 | static inline void ath9k_htc_init_btcoex(struct ath9k_htc_priv *priv, char *product) |
408 | void ath_htc_cancel_btcoex_work(struct ath9k_htc_priv *priv); | 409 | { |
410 | } | ||
411 | static inline void ath9k_htc_start_btcoex(struct ath9k_htc_priv *priv) | ||
412 | { | ||
413 | } | ||
414 | static inline void ath9k_htc_stop_btcoex(struct ath9k_htc_priv *priv) | ||
415 | { | ||
416 | } | ||
417 | #endif /* CONFIG_ATH9K_BTCOEX_SUPPORT */ | ||
409 | 418 | ||
410 | #define OP_INVALID BIT(0) | 419 | #define OP_INVALID BIT(0) |
411 | #define OP_SCANNING BIT(1) | 420 | #define OP_SCANNING BIT(1) |
@@ -486,7 +495,10 @@ struct ath9k_htc_priv { | |||
486 | int cabq; | 495 | int cabq; |
487 | int hwq_map[WME_NUM_AC]; | 496 | int hwq_map[WME_NUM_AC]; |
488 | 497 | ||
498 | #ifdef CONFIG_ATH9K_BTCOEX_SUPPORT | ||
489 | struct ath_btcoex btcoex; | 499 | struct ath_btcoex btcoex; |
500 | #endif | ||
501 | |||
490 | struct delayed_work coex_period_work; | 502 | struct delayed_work coex_period_work; |
491 | struct delayed_work duty_cycle_work; | 503 | struct delayed_work duty_cycle_work; |
492 | #ifdef CONFIG_ATH9K_HTC_DEBUGFS | 504 | #ifdef CONFIG_ATH9K_HTC_DEBUGFS |
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c b/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c index 2c61d363b001..6aa76745e020 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c | |||
@@ -22,6 +22,8 @@ | |||
22 | 22 | ||
23 | #define ATH_HTC_BTCOEX_PRODUCT_ID "wb193" | 23 | #define ATH_HTC_BTCOEX_PRODUCT_ID "wb193" |
24 | 24 | ||
25 | #ifdef CONFIG_ATH9K_BTCOEX_SUPPORT | ||
26 | |||
25 | /* | 27 | /* |
26 | * Detects if there is any priority bt traffic | 28 | * Detects if there is any priority bt traffic |
27 | */ | 29 | */ |
@@ -113,7 +115,7 @@ static void ath_btcoex_duty_cycle_work(struct work_struct *work) | |||
113 | ath9k_hw_btcoex_enable(priv->ah); | 115 | ath9k_hw_btcoex_enable(priv->ah); |
114 | } | 116 | } |
115 | 117 | ||
116 | void ath_htc_init_btcoex_work(struct ath9k_htc_priv *priv) | 118 | static void ath_htc_init_btcoex_work(struct ath9k_htc_priv *priv) |
117 | { | 119 | { |
118 | struct ath_btcoex *btcoex = &priv->btcoex; | 120 | struct ath_btcoex *btcoex = &priv->btcoex; |
119 | 121 | ||
@@ -133,7 +135,7 @@ void ath_htc_init_btcoex_work(struct ath9k_htc_priv *priv) | |||
133 | * (Re)start btcoex work | 135 | * (Re)start btcoex work |
134 | */ | 136 | */ |
135 | 137 | ||
136 | void ath_htc_resume_btcoex_work(struct ath9k_htc_priv *priv) | 138 | static void ath_htc_resume_btcoex_work(struct ath9k_htc_priv *priv) |
137 | { | 139 | { |
138 | struct ath_btcoex *btcoex = &priv->btcoex; | 140 | struct ath_btcoex *btcoex = &priv->btcoex; |
139 | struct ath_hw *ah = priv->ah; | 141 | struct ath_hw *ah = priv->ah; |
@@ -153,7 +155,7 @@ void ath_htc_resume_btcoex_work(struct ath9k_htc_priv *priv) | |||
153 | /* | 155 | /* |
154 | * Cancel btcoex and bt duty cycle work. | 156 | * Cancel btcoex and bt duty cycle work. |
155 | */ | 157 | */ |
156 | void ath_htc_cancel_btcoex_work(struct ath9k_htc_priv *priv) | 158 | static void ath_htc_cancel_btcoex_work(struct ath9k_htc_priv *priv) |
157 | { | 159 | { |
158 | if (ath9k_hw_get_btcoex_scheme(priv->ah) == ATH_BTCOEX_CFG_NONE) | 160 | if (ath9k_hw_get_btcoex_scheme(priv->ah) == ATH_BTCOEX_CFG_NONE) |
159 | return; | 161 | return; |
@@ -216,6 +218,8 @@ void ath9k_htc_init_btcoex(struct ath9k_htc_priv *priv, char *product) | |||
216 | } | 218 | } |
217 | } | 219 | } |
218 | 220 | ||
221 | #endif /* CONFIG_ATH9K_BTCOEX_SUPPORT */ | ||
222 | |||
219 | /*******/ | 223 | /*******/ |
220 | /* LED */ | 224 | /* LED */ |
221 | /*******/ | 225 | /*******/ |