1 --- a/drivers/net/wireless/ath/ath9k/Kconfig
2 +++ b/drivers/net/wireless/ath/ath9k/Kconfig
3 @@ -59,6 +59,14 @@ config ATH9K_RATE_CONTROL
4 Say Y, if you want to use the ath9k specific rate control
5 module instead of minstrel_ht.
7 +config ATH9K_BTCOEX_SUPPORT
8 + bool "Atheros ath9k bluetooth coexistence support"
12 + Say Y, if you want to use the ath9k radios together with
13 + Bluetooth modules in the same system.
16 tristate "Atheros HTC based wireless cards support"
17 depends on USB && MAC80211
18 --- a/drivers/net/wireless/ath/ath9k/hw.h
19 +++ b/drivers/net/wireless/ath/ath9k/hw.h
20 @@ -210,7 +210,11 @@ enum ath9k_hw_caps {
21 ATH9K_HW_CAP_5GHZ = BIT(14),
22 ATH9K_HW_CAP_APM = BIT(15),
23 ATH9K_HW_CAP_RTT = BIT(16),
24 +#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
25 ATH9K_HW_CAP_MCI = BIT(17),
27 + ATH9K_HW_CAP_MCI = 0,
31 struct ath9k_hw_capabilities {
32 --- a/drivers/net/wireless/ath/ath9k/btcoex.h
33 +++ b/drivers/net/wireless/ath/ath9k/btcoex.h
34 @@ -98,6 +98,16 @@ struct ath_btcoex_hw {
35 u32 wlan_weight[AR9300_NUM_WLAN_WEIGHTS];
38 +#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
39 +static inline enum ath_btcoex_scheme
40 +ath9k_hw_get_btcoex_scheme(struct ath_hw *ah)
42 + return ah->btcoex_hw.scheme;
45 +#define ath9k_hw_get_btcoex_scheme(...) ATH_BTCOEX_CFG_NONE
48 void ath9k_hw_btcoex_init_2wire(struct ath_hw *ah);
49 void ath9k_hw_btcoex_init_3wire(struct ath_hw *ah);
50 void ath9k_hw_init_btcoex_hw(struct ath_hw *ah, int qnum);
51 --- a/drivers/net/wireless/ath/ath9k/init.c
52 +++ b/drivers/net/wireless/ath/ath9k/init.c
53 @@ -411,7 +411,7 @@ static int ath9k_init_btcoex(struct ath_
54 struct ath_hw *ah = sc->sc_ah;
57 - switch (sc->sc_ah->btcoex_hw.scheme) {
58 + switch (ath9k_hw_get_btcoex_scheme(sc->sc_ah)) {
59 case ATH_BTCOEX_CFG_NONE:
61 case ATH_BTCOEX_CFG_2WIRE:
62 @@ -866,10 +866,10 @@ static void ath9k_deinit_softc(struct at
63 kfree(sc->sbands[IEEE80211_BAND_5GHZ].channels);
65 if ((sc->btcoex.no_stomp_timer) &&
66 - sc->sc_ah->btcoex_hw.scheme == ATH_BTCOEX_CFG_3WIRE)
67 + ath9k_hw_get_btcoex_scheme(sc->sc_ah) == ATH_BTCOEX_CFG_3WIRE)
68 ath_gen_timer_free(sc->sc_ah, sc->btcoex.no_stomp_timer);
70 - if (sc->sc_ah->btcoex_hw.scheme == ATH_BTCOEX_CFG_MCI)
71 + if (ath9k_hw_get_btcoex_scheme(sc->sc_ah) == ATH_BTCOEX_CFG_MCI)
74 for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++)
75 --- a/drivers/net/wireless/ath/ath9k/pci.c
76 +++ b/drivers/net/wireless/ath/ath9k/pci.c
77 @@ -121,7 +121,7 @@ static void ath_pci_aspm_init(struct ath
81 - if (ah->btcoex_hw.scheme != ATH_BTCOEX_CFG_NONE) {
82 + if (ath9k_hw_get_btcoex_scheme(ah) != ATH_BTCOEX_CFG_NONE) {
83 /* Bluetooth coexistance requires disabling ASPM. */
84 pci_read_config_byte(pdev, pos + PCI_EXP_LNKCTL, &aspm);
85 aspm &= ~(PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1);
86 --- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
87 +++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
88 @@ -610,7 +610,7 @@ static void ath9k_init_btcoex(struct ath
92 - switch (priv->ah->btcoex_hw.scheme) {
93 + switch (ath9k_hw_get_btcoex_scheme(priv->ah)) {
94 case ATH_BTCOEX_CFG_NONE:
96 case ATH_BTCOEX_CFG_3WIRE:
97 @@ -704,7 +704,8 @@ static int ath9k_init_priv(struct ath9k_
99 if (product && strncmp(product, ATH_HTC_BTCOEX_PRODUCT_ID, 5) == 0) {
100 ah->btcoex_hw.scheme = ATH_BTCOEX_CFG_3WIRE;
101 - ath9k_init_btcoex(priv);
102 + if (ath9k_hw_get_btcoex_scheme(ah) != ATH_BTCOEX_CFG_NONE)
103 + ath9k_init_btcoex(priv);
107 --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
108 +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
109 @@ -958,7 +958,7 @@ static int ath9k_htc_start(struct ieee80
110 mod_timer(&priv->tx.cleanup_timer,
111 jiffies + msecs_to_jiffies(ATH9K_HTC_TX_CLEANUP_INTERVAL));
113 - if (ah->btcoex_hw.scheme == ATH_BTCOEX_CFG_3WIRE) {
114 + if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_3WIRE) {
115 ath9k_hw_btcoex_set_weight(ah, AR_BT_COEX_WGHT,
116 AR_STOMP_LOW_WLAN_WGHT);
117 ath9k_hw_btcoex_enable(ah);
118 @@ -1010,7 +1010,8 @@ static void ath9k_htc_stop(struct ieee80
120 mutex_lock(&priv->mutex);
122 - if (ah->btcoex_hw.enabled) {
123 + if (ah->btcoex_hw.enabled &&
124 + ath9k_hw_get_btcoex_scheme(ah) != ATH_BTCOEX_CFG_NONE) {
125 ath9k_hw_btcoex_disable(ah);
126 if (ah->btcoex_hw.scheme == ATH_BTCOEX_CFG_3WIRE)
127 ath_htc_cancel_btcoex_work(priv);
128 --- a/drivers/net/wireless/ath/ath9k/main.c
129 +++ b/drivers/net/wireless/ath/ath9k/main.c
130 @@ -742,11 +742,11 @@ void ath9k_tasklet(unsigned long data)
134 - if (ah->btcoex_hw.scheme == ATH_BTCOEX_CFG_3WIRE)
135 + if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_3WIRE)
136 if (status & ATH9K_INT_GENTIMER)
137 ath_gen_timer_isr(sc->sc_ah);
139 - if (status & ATH9K_INT_MCI)
140 + if ((status & ATH9K_INT_MCI) && ATH9K_HW_CAP_MCI)
144 @@ -1083,14 +1083,14 @@ static int ath9k_start(struct ieee80211_
146 spin_unlock_bh(&sc->sc_pcu_lock);
148 - if ((ah->btcoex_hw.scheme != ATH_BTCOEX_CFG_NONE) &&
149 + if ((ath9k_hw_get_btcoex_scheme(ah) != ATH_BTCOEX_CFG_NONE) &&
150 !ah->btcoex_hw.enabled) {
151 if (!(sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_MCI))
152 ath9k_hw_btcoex_set_weight(ah, AR_BT_COEX_WGHT,
153 AR_STOMP_LOW_WLAN_WGHT);
154 ath9k_hw_btcoex_enable(ah);
156 - if (ah->btcoex_hw.scheme == ATH_BTCOEX_CFG_3WIRE)
157 + if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_3WIRE)
158 ath9k_btcoex_timer_resume(sc);
161 @@ -1194,9 +1194,10 @@ static void ath9k_stop(struct ieee80211_
162 /* Ensure HW is awake when we try to shut it down. */
165 - if (ah->btcoex_hw.enabled) {
166 + if (ah->btcoex_hw.enabled &&
167 + ath9k_hw_get_btcoex_scheme(ah) != ATH_BTCOEX_CFG_NONE) {
168 ath9k_hw_btcoex_disable(ah);
169 - if (ah->btcoex_hw.scheme == ATH_BTCOEX_CFG_3WIRE)
170 + if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_3WIRE)
171 ath9k_btcoex_timer_pause(sc);
172 ath_mci_flush_profile(&sc->btcoex.mci);
174 --- a/drivers/net/wireless/ath/ath9k/gpio.c
175 +++ b/drivers/net/wireless/ath/ath9k/gpio.c
176 @@ -253,6 +253,9 @@ int ath_init_btcoex_timer(struct ath_sof
178 struct ath_btcoex *btcoex = &sc->btcoex;
180 + if (ath9k_hw_get_btcoex_scheme(sc->sc_ah) == ATH_BTCOEX_CFG_NONE)
183 btcoex->btcoex_period = ATH_BTCOEX_DEF_BT_PERIOD * 1000;
184 btcoex->btcoex_no_stomp = (100 - ATH_BTCOEX_DEF_DUTY_CYCLE) *
185 btcoex->btcoex_period / 100;
186 @@ -286,6 +289,9 @@ void ath9k_btcoex_timer_resume(struct at
187 ath_dbg(ath9k_hw_common(ah), ATH_DBG_BTCOEX,
188 "Starting btcoex timers\n");
190 + if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_NONE)
193 /* make sure duty cycle timer is also stopped when resuming */
194 if (btcoex->hw_timer_enabled)
195 ath9k_gen_timer_stop(sc->sc_ah, btcoex->no_stomp_timer);
196 @@ -306,6 +312,9 @@ void ath9k_btcoex_timer_pause(struct ath
197 struct ath_btcoex *btcoex = &sc->btcoex;
198 struct ath_hw *ah = sc->sc_ah;
200 + if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_NONE)
203 del_timer_sync(&btcoex->period_timer);
205 if (btcoex->hw_timer_enabled)
206 --- a/drivers/net/wireless/ath/ath9k/hw.c
207 +++ b/drivers/net/wireless/ath/ath9k/hw.c
208 @@ -1929,7 +1929,8 @@ int ath9k_hw_reset(struct ath_hw *ah, st
212 - if (ah->btcoex_hw.enabled)
213 + if (ah->btcoex_hw.enabled &&
214 + ath9k_hw_get_btcoex_scheme(ah) != ATH_BTCOEX_CFG_NONE)
215 ath9k_hw_btcoex_enable(ah);
217 if (mci && mci_hw->ready) {
218 --- a/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c
219 +++ b/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c
220 @@ -116,6 +116,9 @@ void ath_htc_init_btcoex_work(struct ath
222 struct ath_btcoex *btcoex = &priv->btcoex;
224 + if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_NONE)
227 btcoex->btcoex_period = ATH_BTCOEX_DEF_BT_PERIOD;
228 btcoex->btcoex_no_stomp = (100 - ATH_BTCOEX_DEF_DUTY_CYCLE) *
229 btcoex->btcoex_period / 100;
230 @@ -134,6 +137,9 @@ void ath_htc_resume_btcoex_work(struct a
231 struct ath_btcoex *btcoex = &priv->btcoex;
232 struct ath_hw *ah = priv->ah;
234 + if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_NONE)
237 ath_dbg(ath9k_hw_common(ah), ATH_DBG_BTCOEX, "Starting btcoex work\n");
239 btcoex->bt_priority_cnt = 0;
240 @@ -148,6 +154,9 @@ void ath_htc_resume_btcoex_work(struct a
242 void ath_htc_cancel_btcoex_work(struct ath9k_htc_priv *priv)
244 + if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_NONE)
247 cancel_delayed_work_sync(&priv->coex_period_work);
248 cancel_delayed_work_sync(&priv->duty_cycle_work);
250 --- a/drivers/net/wireless/ath/ath9k/btcoex.c
251 +++ b/drivers/net/wireless/ath/ath9k/btcoex.c
252 @@ -68,6 +68,9 @@ void ath9k_hw_init_btcoex_hw(struct ath_
254 bool rxclear_polarity = ath_bt_config.bt_rxclear_polarity;
256 + if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_NONE)
259 if (AR_SREV_9300_20_OR_LATER(ah))
260 rxclear_polarity = !ath_bt_config.bt_rxclear_polarity;
262 @@ -99,6 +102,9 @@ void ath9k_hw_btcoex_init_2wire(struct a
264 struct ath_btcoex_hw *btcoex_hw = &ah->btcoex_hw;
266 + if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_NONE)
269 /* connect bt_active to baseband */
270 REG_CLR_BIT(ah, AR_GPIO_INPUT_EN_VAL,
271 (AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_DEF |
272 @@ -121,6 +127,9 @@ void ath9k_hw_btcoex_init_3wire(struct a
274 struct ath_btcoex_hw *btcoex_hw = &ah->btcoex_hw;
276 + if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_NONE)
280 REG_SET_BIT(ah, AR_GPIO_INPUT_EN_VAL,
281 (AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_BB |
282 @@ -147,6 +156,9 @@ static void ath9k_hw_btcoex_enable_2wire
284 struct ath_btcoex_hw *btcoex_hw = &ah->btcoex_hw;
286 + if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_NONE)
289 /* Configure the desired GPIO port for TX_FRAME output */
290 ath9k_hw_cfg_output(ah, btcoex_hw->wlanactive_gpio,
291 AR_GPIO_OUTPUT_MUX_AS_TX_FRAME);
292 @@ -158,6 +170,9 @@ void ath9k_hw_btcoex_set_weight(struct a
294 struct ath_btcoex_hw *btcoex_hw = &ah->btcoex_hw;
296 + if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_NONE)
299 btcoex_hw->bt_coex_weights = SM(bt_weight, AR_BTCOEX_BT_WGHT) |
300 SM(wlan_weight, AR_BTCOEX_WL_WGHT);
302 @@ -219,9 +234,9 @@ void ath9k_hw_btcoex_enable(struct ath_h
304 struct ath_btcoex_hw *btcoex_hw = &ah->btcoex_hw;
306 - switch (btcoex_hw->scheme) {
307 + switch (ath9k_hw_get_btcoex_scheme(ah)) {
308 case ATH_BTCOEX_CFG_NONE:
311 case ATH_BTCOEX_CFG_2WIRE:
312 ath9k_hw_btcoex_enable_2wire(ah);
314 @@ -246,6 +261,9 @@ void ath9k_hw_btcoex_disable(struct ath_
315 struct ath_btcoex_hw *btcoex_hw = &ah->btcoex_hw;
318 + if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_NONE)
321 btcoex_hw->enabled = false;
322 if (btcoex_hw->scheme == ATH_BTCOEX_CFG_MCI) {
323 ath9k_hw_btcoex_bt_stomp(ah, ATH_BTCOEX_STOMP_NONE);
324 @@ -294,6 +312,9 @@ static void ar9003_btcoex_bt_stomp(struc
325 void ath9k_hw_btcoex_bt_stomp(struct ath_hw *ah,
326 enum ath_stomp_type stomp_type)
328 + if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_NONE)
331 if (AR_SREV_9300_20_OR_LATER(ah)) {
332 ar9003_btcoex_bt_stomp(ah, stomp_type);
334 --- a/drivers/net/wireless/ath/ath9k/ar9003_mci.c
335 +++ b/drivers/net/wireless/ath/ath9k/ar9003_mci.c
336 @@ -85,6 +85,9 @@ void ar9003_mci_remote_reset(struct ath_
338 u32 payload[4] = { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffff00};
340 + if (!ATH9K_HW_CAP_MCI)
343 ar9003_mci_send_message(ah, MCI_REMOTE_RESET, 0, payload, 16,
346 @@ -94,6 +97,9 @@ void ar9003_mci_send_lna_transfer(struct
348 u32 payload = 0x00000000;
350 + if (!ATH9K_HW_CAP_MCI)
353 ar9003_mci_send_message(ah, MCI_LNA_TRANS, 0, &payload, 1,
356 @@ -107,6 +113,9 @@ static void ar9003_mci_send_req_wake(str
358 void ar9003_mci_send_sys_waking(struct ath_hw *ah, bool wait_done)
360 + if (!ATH9K_HW_CAP_MCI)
363 ar9003_mci_send_message(ah, MCI_SYS_WAKING, MCI_FLAG_DISABLE_TIMESTAMP,
364 NULL, 0, wait_done, false);
366 @@ -221,6 +230,9 @@ void ar9003_mci_send_coex_halt_bt_gpm(st
367 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci;
368 u32 payload[4] = {0, 0, 0, 0};
370 + if (!ATH9K_HW_CAP_MCI)
373 ath_dbg(common, ATH_DBG_MCI, "MCI Send Coex %s BT GPM.\n",
374 (halt) ? "halt" : "unhalt");
376 @@ -381,12 +393,17 @@ static void ar9003_mci_prep_interface(st
378 void ar9003_mci_disable_interrupt(struct ath_hw *ah)
380 + if (!ATH9K_HW_CAP_MCI)
383 REG_WRITE(ah, AR_MCI_INTERRUPT_EN, 0);
384 REG_WRITE(ah, AR_MCI_INTERRUPT_RX_MSG_EN, 0);
387 void ar9003_mci_enable_interrupt(struct ath_hw *ah)
389 + if (!ATH9K_HW_CAP_MCI)
392 REG_WRITE(ah, AR_MCI_INTERRUPT_EN, AR_MCI_INTERRUPT_DEFAULT);
393 REG_WRITE(ah, AR_MCI_INTERRUPT_RX_MSG_EN,
394 @@ -397,6 +414,9 @@ bool ar9003_mci_check_int(struct ath_hw
398 + if (!ATH9K_HW_CAP_MCI)
401 intr = REG_READ(ah, AR_MCI_INTERRUPT_RX_MSG_RAW);
402 return ((intr & ints) == ints);
404 @@ -405,6 +425,10 @@ void ar9003_mci_get_interrupt(struct ath
407 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci;
409 + if (!ATH9K_HW_CAP_MCI)
412 *raw_intr = mci->raw_intr;
413 *rx_msg_intr = mci->rx_msg_intr;
415 @@ -418,6 +442,9 @@ void ar9003_mci_2g5g_changed(struct ath_
417 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci;
419 + if (!ATH9K_HW_CAP_MCI)
422 if (!mci->update_2g5g &&
423 (mci->is_2g != is_2g))
424 mci->update_2g5g = true;
425 @@ -531,6 +558,9 @@ void ar9003_mci_reset(struct ath_hw *ah,
426 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci;
429 + if (!ATH9K_HW_CAP_MCI)
432 ath_dbg(common, ATH_DBG_MCI, "MCI full_sleep = %d, is_2g = %d\n",
433 is_full_sleep, is_2g);
435 @@ -661,6 +691,9 @@ void ar9003_mci_mute_bt(struct ath_hw *a
437 struct ath_common *common = ath9k_hw_common(ah);
439 + if (!ATH9K_HW_CAP_MCI)
442 /* disable all MCI messages */
443 REG_WRITE(ah, AR_MCI_MSG_ATTRIBUTES_TABLE, 0xffff0000);
444 REG_WRITE(ah, AR_BTCOEX_WL_WEIGHTS0, 0xffffffff);
445 @@ -693,6 +726,9 @@ void ar9003_mci_sync_bt_state(struct ath
446 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci;
449 + if (!ATH9K_HW_CAP_MCI)
452 cur_bt_state = ar9003_mci_state(ah, MCI_STATE_REMOTE_SLEEP, NULL);
454 if (mci->bt_state != cur_bt_state) {
455 @@ -857,6 +893,9 @@ void ar9003_mci_2g5g_switch(struct ath_h
456 struct ath_common *common = ath9k_hw_common(ah);
457 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci;
459 + if (!ATH9K_HW_CAP_MCI)
462 if (mci->update_2g5g) {
465 @@ -908,6 +947,9 @@ bool ar9003_mci_send_message(struct ath_
466 u32 saved_mci_int_en;
469 + if (!ATH9K_HW_CAP_MCI)
472 saved_mci_int_en = REG_READ(ah, AR_MCI_INTERRUPT_EN);
473 regval = REG_READ(ah, AR_BTCOEX_CTRL);
475 @@ -973,6 +1015,9 @@ void ar9003_mci_setup(struct ath_hw *ah,
476 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci;
477 void *sched_buf = (void *)((char *) gpm_buf + (sched_addr - gpm_addr));
479 + if (!ATH9K_HW_CAP_MCI)
482 mci->gpm_addr = gpm_addr;
483 mci->gpm_buf = gpm_buf;
485 @@ -987,6 +1032,9 @@ void ar9003_mci_cleanup(struct ath_hw *a
487 struct ath_common *common = ath9k_hw_common(ah);
489 + if (!ATH9K_HW_CAP_MCI)
492 /* Turn off MCI and Jupiter mode. */
493 REG_WRITE(ah, AR_BTCOEX_CTRL, 0x00);
494 ath_dbg(common, ATH_DBG_MCI, "MCI ar9003_mci_cleanup\n");
495 @@ -1056,6 +1104,9 @@ u32 ar9003_mci_wait_for_gpm(struct ath_h
496 u8 recv_type = 0, recv_opcode = 0;
497 bool b_is_bt_cal_done = (gpm_type == MCI_GPM_BT_CAL_DONE);
499 + if (!ATH9K_HW_CAP_MCI)
502 more_data = time_out ? MCI_GPM_NOMORE : MCI_GPM_MORE;
504 while (time_out > 0) {
505 @@ -1188,6 +1239,9 @@ u32 ar9003_mci_state(struct ath_hw *ah,
506 u32 value = 0, more_gpm = 0, gpm_ptr;
509 + if (!ATH9K_HW_CAP_MCI)
512 switch (state_type) {
513 case MCI_STATE_ENABLE:
515 --- a/drivers/net/wireless/ath/ath9k/mci.c
516 +++ b/drivers/net/wireless/ath/ath9k/mci.c
517 @@ -425,6 +425,9 @@ int ath_mci_setup(struct ath_softc *sc)
518 struct ath_mci_coex *mci = &sc->mci_coex;
521 + if (!ATH9K_HW_CAP_MCI)
524 mci->sched_buf.bf_len = ATH_MCI_SCHED_BUF_SIZE + ATH_MCI_GPM_BUF_SIZE;
526 if (ath_mci_buf_alloc(sc, &mci->sched_buf)) {
527 @@ -458,6 +461,9 @@ void ath_mci_cleanup(struct ath_softc *s
528 struct ath_hw *ah = sc->sc_ah;
529 struct ath_mci_coex *mci = &sc->mci_coex;
531 + if (!ATH9K_HW_CAP_MCI)
535 * both schedule and gpm buffers will be released
537 @@ -476,6 +482,9 @@ void ath_mci_intr(struct ath_softc *sc)
538 u32 more_data = MCI_GPM_MORE;
539 bool skip_gpm = false;
541 + if (!ATH9K_HW_CAP_MCI)
544 ar9003_mci_get_interrupt(sc->sc_ah, &mci_int, &mci_int_rxmsg);
546 if (ar9003_mci_state(ah, MCI_STATE_ENABLE, NULL) == 0) {