23 #define ATH_HTC_BTCOEX_PRODUCT_ID "wb193"
25 #ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
44 ath_dbg(ath9k_hw_common(ah), BTCOEX,
45 "BT scan detected\n");
49 ath_dbg(ath9k_hw_common(ah), BTCOEX,
50 "BT priority traffic detected\n");
73 ath_detect_bt_priority(priv);
78 ath_err(common,
"Unable to set BTCOEX parameters\n");
98 static void ath_btcoex_duty_cycle_work(
struct work_struct *work)
104 struct ath_common *common = ath9k_hw_common(ah);
106 ath_dbg(common, BTCOEX,
"time slice work for bt and wlan\n");
134 static void ath_htc_resume_btcoex_work(
struct ath9k_htc_priv *priv)
139 ath_dbg(ath9k_hw_common(ah), BTCOEX,
"Starting btcoex work\n");
152 static void ath_htc_cancel_btcoex_work(
struct ath9k_htc_priv *priv)
166 ath_htc_resume_btcoex_work(priv);
174 if (ah->btcoex_hw.enabled &&
177 ath_htc_cancel_btcoex_work(priv);
185 struct ath_common *common = ath9k_hw_common(ah);
200 switch (ath9k_hw_get_btcoex_scheme(priv->
ah)) {
204 priv->
ah->btcoex_hw.btactive_gpio = 7;
205 priv->
ah->btcoex_hw.btpriority_gpio = 6;
206 priv->
ah->btcoex_hw.wlanactive_gpio = 8;
209 ath_htc_init_btcoex_work(priv);
225 #ifdef CONFIG_MAC80211_LEDS
233 (priv->brightness ==
LED_OFF));
236 static void ath9k_led_brightness(
struct led_classdev *led_cdev,
250 if (!priv->led_registered)
253 ath9k_led_brightness(&priv->led_cdev,
LED_OFF);
277 snprintf(priv->led_name,
sizeof(priv->led_name),
278 "ath9k_htc-%s", wiphy_name(priv->
hw->wiphy));
279 priv->led_cdev.name = priv->led_name;
280 priv->led_cdev.brightness_set = ath9k_led_brightness;
286 INIT_WORK(&priv->led_work, ath9k_led_work);
287 priv->led_registered =
true;
303 priv->
ah->rfkill_polarity;
312 bool blocked = !!ath_is_rfkill_set(priv);