gpio.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519
  1. /*
  2. * Copyright (c) 2008-2011 Atheros Communications Inc.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for any
  5. * purpose with or without fee is hereby granted, provided that the above
  6. * copyright notice and this permission notice appear in all copies.
  7. *
  8. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  9. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  10. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  11. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  12. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  13. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  14. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. #include "ath9k.h"
  17. /********************************/
  18. /* LED functions */
  19. /********************************/
  20. #ifdef CONFIG_MAC80211_LEDS
  21. static void ath_fill_led_pin(struct ath_softc *sc)
  22. {
  23. struct ath_hw *ah = sc->sc_ah;
  24. /* Set default led pin if invalid */
  25. if (ah->led_pin < 0) {
  26. if (AR_SREV_9287(ah))
  27. ah->led_pin = ATH_LED_PIN_9287;
  28. else if (AR_SREV_9485(ah))
  29. ah->led_pin = ATH_LED_PIN_9485;
  30. else if (AR_SREV_9300(ah))
  31. ah->led_pin = ATH_LED_PIN_9300;
  32. else if (AR_SREV_9462(ah) || AR_SREV_9565(ah))
  33. ah->led_pin = ATH_LED_PIN_9462;
  34. else
  35. ah->led_pin = ATH_LED_PIN_DEF;
  36. }
  37. /* Configure gpio for output */
  38. ath9k_hw_gpio_request_out(ah, ah->led_pin, "ath9k-led",
  39. AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
  40. /* LED off, active low */
  41. ath9k_hw_set_gpio(ah, ah->led_pin, ah->config.led_active_high ? 0 : 1);
  42. }
  43. static void ath_led_brightness(struct led_classdev *led_cdev,
  44. enum led_brightness brightness)
  45. {
  46. struct ath_softc *sc = container_of(led_cdev, struct ath_softc, led_cdev);
  47. u32 val = (brightness == LED_OFF);
  48. if (sc->sc_ah->config.led_active_high)
  49. val = !val;
  50. ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, val);
  51. }
  52. void ath_deinit_leds(struct ath_softc *sc)
  53. {
  54. if (!sc->led_registered)
  55. return;
  56. ath_led_brightness(&sc->led_cdev, LED_OFF);
  57. led_classdev_unregister(&sc->led_cdev);
  58. ath9k_hw_gpio_free(sc->sc_ah, sc->sc_ah->led_pin);
  59. }
  60. void ath_init_leds(struct ath_softc *sc)
  61. {
  62. int ret;
  63. if (AR_SREV_9100(sc->sc_ah))
  64. return;
  65. ath_fill_led_pin(sc);
  66. if (!ath9k_led_blink)
  67. sc->led_cdev.default_trigger =
  68. ieee80211_get_radio_led_name(sc->hw);
  69. snprintf(sc->led_name, sizeof(sc->led_name),
  70. "ath9k-%s", wiphy_name(sc->hw->wiphy));
  71. sc->led_cdev.name = sc->led_name;
  72. sc->led_cdev.brightness_set = ath_led_brightness;
  73. ret = led_classdev_register(wiphy_dev(sc->hw->wiphy), &sc->led_cdev);
  74. if (ret < 0)
  75. return;
  76. sc->led_registered = true;
  77. }
  78. #endif
  79. /*******************/
  80. /* Rfkill */
  81. /*******************/
  82. static bool ath_is_rfkill_set(struct ath_softc *sc)
  83. {
  84. struct ath_hw *ah = sc->sc_ah;
  85. bool is_blocked;
  86. ath9k_ps_wakeup(sc);
  87. is_blocked = ath9k_hw_gpio_get(ah, ah->rfkill_gpio) ==
  88. ah->rfkill_polarity;
  89. ath9k_ps_restore(sc);
  90. return is_blocked;
  91. }
  92. void ath9k_rfkill_poll_state(struct ieee80211_hw *hw)
  93. {
  94. struct ath_softc *sc = hw->priv;
  95. bool blocked = !!ath_is_rfkill_set(sc);
  96. wiphy_rfkill_set_hw_state(hw->wiphy, blocked);
  97. }
  98. void ath_start_rfkill_poll(struct ath_softc *sc)
  99. {
  100. struct ath_hw *ah = sc->sc_ah;
  101. if (ah->caps.hw_caps & ATH9K_HW_CAP_RFSILENT)
  102. wiphy_rfkill_start_polling(sc->hw->wiphy);
  103. }
  104. #ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
  105. /******************/
  106. /* BTCOEX */
  107. /******************/
  108. /*
  109. * Detects if there is any priority bt traffic
  110. */
  111. static void ath_detect_bt_priority(struct ath_softc *sc)
  112. {
  113. struct ath_btcoex *btcoex = &sc->btcoex;
  114. struct ath_hw *ah = sc->sc_ah;
  115. if (ath9k_hw_gpio_get(sc->sc_ah, ah->btcoex_hw.btpriority_gpio))
  116. btcoex->bt_priority_cnt++;
  117. if (time_after(jiffies, btcoex->bt_priority_time +
  118. msecs_to_jiffies(ATH_BT_PRIORITY_TIME_THRESHOLD))) {
  119. clear_bit(BT_OP_PRIORITY_DETECTED, &btcoex->op_flags);
  120. clear_bit(BT_OP_SCAN, &btcoex->op_flags);
  121. /* Detect if colocated bt started scanning */
  122. if (btcoex->bt_priority_cnt >= ATH_BT_CNT_SCAN_THRESHOLD) {
  123. ath_dbg(ath9k_hw_common(sc->sc_ah), BTCOEX,
  124. "BT scan detected\n");
  125. set_bit(BT_OP_PRIORITY_DETECTED, &btcoex->op_flags);
  126. set_bit(BT_OP_SCAN, &btcoex->op_flags);
  127. } else if (btcoex->bt_priority_cnt >= ATH_BT_CNT_THRESHOLD) {
  128. ath_dbg(ath9k_hw_common(sc->sc_ah), BTCOEX,
  129. "BT priority traffic detected\n");
  130. set_bit(BT_OP_PRIORITY_DETECTED, &btcoex->op_flags);
  131. }
  132. btcoex->bt_priority_cnt = 0;
  133. btcoex->bt_priority_time = jiffies;
  134. }
  135. }
  136. static void ath_mci_ftp_adjust(struct ath_softc *sc)
  137. {
  138. struct ath_btcoex *btcoex = &sc->btcoex;
  139. struct ath_mci_profile *mci = &btcoex->mci;
  140. struct ath_hw *ah = sc->sc_ah;
  141. if (btcoex->bt_wait_time > ATH_BTCOEX_RX_WAIT_TIME) {
  142. if (ar9003_mci_state(ah, MCI_STATE_NEED_FTP_STOMP) &&
  143. (mci->num_pan || mci->num_other_acl))
  144. ah->btcoex_hw.mci.stomp_ftp =
  145. (sc->rx.num_pkts < ATH_BTCOEX_STOMP_FTP_THRESH);
  146. else
  147. ah->btcoex_hw.mci.stomp_ftp = false;
  148. btcoex->bt_wait_time = 0;
  149. sc->rx.num_pkts = 0;
  150. }
  151. }
  152. /*
  153. * This is the master bt coex timer which runs for every
  154. * 45ms, bt traffic will be given priority during 55% of this
  155. * period while wlan gets remaining 45%
  156. */
  157. static void ath_btcoex_period_timer(struct timer_list *t)
  158. {
  159. struct ath_softc *sc = from_timer(sc, t, btcoex.period_timer);
  160. struct ath_hw *ah = sc->sc_ah;
  161. struct ath_btcoex *btcoex = &sc->btcoex;
  162. enum ath_stomp_type stomp_type;
  163. u32 timer_period;
  164. unsigned long flags;
  165. spin_lock_irqsave(&sc->sc_pm_lock, flags);
  166. if (sc->sc_ah->power_mode == ATH9K_PM_NETWORK_SLEEP) {
  167. btcoex->bt_wait_time += btcoex->btcoex_period;
  168. spin_unlock_irqrestore(&sc->sc_pm_lock, flags);
  169. goto skip_hw_wakeup;
  170. }
  171. spin_unlock_irqrestore(&sc->sc_pm_lock, flags);
  172. ath9k_ps_wakeup(sc);
  173. spin_lock_bh(&btcoex->btcoex_lock);
  174. if (ah->caps.hw_caps & ATH9K_HW_CAP_MCI) {
  175. ath9k_mci_update_rssi(sc);
  176. ath_mci_ftp_adjust(sc);
  177. }
  178. if (!(ah->caps.hw_caps & ATH9K_HW_CAP_MCI))
  179. ath_detect_bt_priority(sc);
  180. stomp_type = btcoex->bt_stomp_type;
  181. timer_period = btcoex->btcoex_no_stomp;
  182. if (!(ah->caps.hw_caps & ATH9K_HW_CAP_MCI)) {
  183. if (test_bit(BT_OP_SCAN, &btcoex->op_flags)) {
  184. stomp_type = ATH_BTCOEX_STOMP_ALL;
  185. timer_period = btcoex->btscan_no_stomp;
  186. }
  187. } else if (btcoex->stomp_audio >= 5) {
  188. stomp_type = ATH_BTCOEX_STOMP_AUDIO;
  189. btcoex->stomp_audio = 0;
  190. }
  191. ath9k_hw_btcoex_bt_stomp(ah, stomp_type);
  192. ath9k_hw_btcoex_enable(ah);
  193. spin_unlock_bh(&btcoex->btcoex_lock);
  194. if (btcoex->btcoex_period != btcoex->btcoex_no_stomp)
  195. mod_timer(&btcoex->no_stomp_timer,
  196. jiffies + msecs_to_jiffies(timer_period));
  197. ath9k_ps_restore(sc);
  198. skip_hw_wakeup:
  199. mod_timer(&btcoex->period_timer,
  200. jiffies + msecs_to_jiffies(btcoex->btcoex_period));
  201. }
  202. /*
  203. * Generic tsf based hw timer which configures weight
  204. * registers to time slice between wlan and bt traffic
  205. */
  206. static void ath_btcoex_no_stomp_timer(struct timer_list *t)
  207. {
  208. struct ath_softc *sc = from_timer(sc, t, btcoex.no_stomp_timer);
  209. struct ath_hw *ah = sc->sc_ah;
  210. struct ath_btcoex *btcoex = &sc->btcoex;
  211. ath9k_ps_wakeup(sc);
  212. spin_lock_bh(&btcoex->btcoex_lock);
  213. if (btcoex->bt_stomp_type == ATH_BTCOEX_STOMP_LOW ||
  214. (!(ah->caps.hw_caps & ATH9K_HW_CAP_MCI) &&
  215. test_bit(BT_OP_SCAN, &btcoex->op_flags)))
  216. ath9k_hw_btcoex_bt_stomp(ah, ATH_BTCOEX_STOMP_NONE);
  217. else if (btcoex->bt_stomp_type == ATH_BTCOEX_STOMP_ALL)
  218. ath9k_hw_btcoex_bt_stomp(ah, ATH_BTCOEX_STOMP_LOW);
  219. ath9k_hw_btcoex_enable(ah);
  220. spin_unlock_bh(&btcoex->btcoex_lock);
  221. ath9k_ps_restore(sc);
  222. }
  223. static void ath_init_btcoex_timer(struct ath_softc *sc)
  224. {
  225. struct ath_btcoex *btcoex = &sc->btcoex;
  226. btcoex->btcoex_period = ATH_BTCOEX_DEF_BT_PERIOD;
  227. btcoex->btcoex_no_stomp = (100 - ATH_BTCOEX_DEF_DUTY_CYCLE) *
  228. btcoex->btcoex_period / 100;
  229. btcoex->btscan_no_stomp = (100 - ATH_BTCOEX_BTSCAN_DUTY_CYCLE) *
  230. btcoex->btcoex_period / 100;
  231. btcoex->bt_stomp_type = ATH_BTCOEX_STOMP_LOW;
  232. timer_setup(&btcoex->period_timer, ath_btcoex_period_timer, 0);
  233. timer_setup(&btcoex->no_stomp_timer, ath_btcoex_no_stomp_timer, 0);
  234. spin_lock_init(&btcoex->btcoex_lock);
  235. }
  236. /*
  237. * (Re)start btcoex timers
  238. */
  239. void ath9k_btcoex_timer_resume(struct ath_softc *sc)
  240. {
  241. struct ath_btcoex *btcoex = &sc->btcoex;
  242. struct ath_hw *ah = sc->sc_ah;
  243. if (ath9k_hw_get_btcoex_scheme(ah) != ATH_BTCOEX_CFG_3WIRE &&
  244. ath9k_hw_get_btcoex_scheme(ah) != ATH_BTCOEX_CFG_MCI)
  245. return;
  246. ath_dbg(ath9k_hw_common(ah), BTCOEX, "Starting btcoex timers\n");
  247. /* make sure duty cycle timer is also stopped when resuming */
  248. del_timer_sync(&btcoex->no_stomp_timer);
  249. btcoex->bt_priority_cnt = 0;
  250. btcoex->bt_priority_time = jiffies;
  251. clear_bit(BT_OP_PRIORITY_DETECTED, &btcoex->op_flags);
  252. clear_bit(BT_OP_SCAN, &btcoex->op_flags);
  253. mod_timer(&btcoex->period_timer, jiffies);
  254. }
  255. /*
  256. * Pause btcoex timer and bt duty cycle timer
  257. */
  258. void ath9k_btcoex_timer_pause(struct ath_softc *sc)
  259. {
  260. struct ath_btcoex *btcoex = &sc->btcoex;
  261. struct ath_hw *ah = sc->sc_ah;
  262. if (ath9k_hw_get_btcoex_scheme(ah) != ATH_BTCOEX_CFG_3WIRE &&
  263. ath9k_hw_get_btcoex_scheme(ah) != ATH_BTCOEX_CFG_MCI)
  264. return;
  265. ath_dbg(ath9k_hw_common(ah), BTCOEX, "Stopping btcoex timers\n");
  266. del_timer_sync(&btcoex->period_timer);
  267. del_timer_sync(&btcoex->no_stomp_timer);
  268. }
  269. void ath9k_btcoex_stop_gen_timer(struct ath_softc *sc)
  270. {
  271. struct ath_btcoex *btcoex = &sc->btcoex;
  272. del_timer_sync(&btcoex->no_stomp_timer);
  273. }
  274. u16 ath9k_btcoex_aggr_limit(struct ath_softc *sc, u32 max_4ms_framelen)
  275. {
  276. struct ath_btcoex *btcoex = &sc->btcoex;
  277. struct ath_mci_profile *mci = &sc->btcoex.mci;
  278. u16 aggr_limit = 0;
  279. if ((sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_MCI) && mci->aggr_limit)
  280. aggr_limit = (max_4ms_framelen * mci->aggr_limit) >> 4;
  281. else if (test_bit(BT_OP_PRIORITY_DETECTED, &btcoex->op_flags))
  282. aggr_limit = min((max_4ms_framelen * 3) / 8,
  283. (u32)ATH_AMPDU_LIMIT_MAX);
  284. return aggr_limit;
  285. }
  286. void ath9k_btcoex_handle_interrupt(struct ath_softc *sc, u32 status)
  287. {
  288. if (status & ATH9K_INT_MCI)
  289. ath_mci_intr(sc);
  290. }
  291. void ath9k_start_btcoex(struct ath_softc *sc)
  292. {
  293. struct ath_hw *ah = sc->sc_ah;
  294. if (ah->btcoex_hw.enabled ||
  295. ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_NONE)
  296. return;
  297. if (!(ah->caps.hw_caps & ATH9K_HW_CAP_MCI))
  298. ath9k_hw_btcoex_set_weight(ah, AR_BT_COEX_WGHT,
  299. AR_STOMP_LOW_WLAN_WGHT, 0);
  300. else
  301. ath9k_hw_btcoex_set_weight(ah, 0, 0,
  302. ATH_BTCOEX_STOMP_NONE);
  303. ath9k_hw_btcoex_enable(ah);
  304. ath9k_btcoex_timer_resume(sc);
  305. }
  306. void ath9k_stop_btcoex(struct ath_softc *sc)
  307. {
  308. struct ath_hw *ah = sc->sc_ah;
  309. if (!ah->btcoex_hw.enabled ||
  310. ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_NONE)
  311. return;
  312. ath9k_btcoex_timer_pause(sc);
  313. ath9k_hw_btcoex_disable(ah);
  314. if (ah->caps.hw_caps & ATH9K_HW_CAP_MCI)
  315. ath_mci_flush_profile(&sc->btcoex.mci);
  316. }
  317. void ath9k_deinit_btcoex(struct ath_softc *sc)
  318. {
  319. struct ath_hw *ah = sc->sc_ah;
  320. if (ath9k_hw_mci_is_enabled(ah))
  321. ath_mci_cleanup(sc);
  322. else {
  323. enum ath_btcoex_scheme scheme = ath9k_hw_get_btcoex_scheme(ah);
  324. if (scheme == ATH_BTCOEX_CFG_2WIRE ||
  325. scheme == ATH_BTCOEX_CFG_3WIRE)
  326. ath9k_hw_btcoex_deinit(sc->sc_ah);
  327. }
  328. }
  329. int ath9k_init_btcoex(struct ath_softc *sc)
  330. {
  331. struct ath_txq *txq;
  332. struct ath_hw *ah = sc->sc_ah;
  333. int r;
  334. ath9k_hw_btcoex_init_scheme(ah);
  335. switch (ath9k_hw_get_btcoex_scheme(sc->sc_ah)) {
  336. case ATH_BTCOEX_CFG_NONE:
  337. break;
  338. case ATH_BTCOEX_CFG_2WIRE:
  339. ath9k_hw_btcoex_init_2wire(sc->sc_ah);
  340. break;
  341. case ATH_BTCOEX_CFG_3WIRE:
  342. ath9k_hw_btcoex_init_3wire(sc->sc_ah);
  343. ath_init_btcoex_timer(sc);
  344. txq = sc->tx.txq_map[IEEE80211_AC_BE];
  345. ath9k_hw_init_btcoex_hw(sc->sc_ah, txq->axq_qnum);
  346. break;
  347. case ATH_BTCOEX_CFG_MCI:
  348. ath_init_btcoex_timer(sc);
  349. sc->btcoex.duty_cycle = ATH_BTCOEX_DEF_DUTY_CYCLE;
  350. INIT_LIST_HEAD(&sc->btcoex.mci.info);
  351. ath9k_hw_btcoex_init_mci(ah);
  352. r = ath_mci_setup(sc);
  353. if (r)
  354. return r;
  355. break;
  356. default:
  357. WARN_ON(1);
  358. break;
  359. }
  360. return 0;
  361. }
  362. static int ath9k_dump_mci_btcoex(struct ath_softc *sc, u8 *buf, u32 size)
  363. {
  364. struct ath_btcoex *btcoex = &sc->btcoex;
  365. struct ath_mci_profile *mci = &btcoex->mci;
  366. struct ath_hw *ah = sc->sc_ah;
  367. struct ath_btcoex_hw *btcoex_hw = &ah->btcoex_hw;
  368. u32 len = 0;
  369. int i;
  370. ATH_DUMP_BTCOEX("Total BT profiles", NUM_PROF(mci));
  371. ATH_DUMP_BTCOEX("MGMT", mci->num_mgmt);
  372. ATH_DUMP_BTCOEX("SCO", mci->num_sco);
  373. ATH_DUMP_BTCOEX("A2DP", mci->num_a2dp);
  374. ATH_DUMP_BTCOEX("HID", mci->num_hid);
  375. ATH_DUMP_BTCOEX("PAN", mci->num_pan);
  376. ATH_DUMP_BTCOEX("ACL", mci->num_other_acl);
  377. ATH_DUMP_BTCOEX("BDR", mci->num_bdr);
  378. ATH_DUMP_BTCOEX("Aggr. Limit", mci->aggr_limit);
  379. ATH_DUMP_BTCOEX("Stomp Type", btcoex->bt_stomp_type);
  380. ATH_DUMP_BTCOEX("BTCoex Period (msec)", btcoex->btcoex_period);
  381. ATH_DUMP_BTCOEX("Duty Cycle", btcoex->duty_cycle);
  382. ATH_DUMP_BTCOEX("BT Wait time", btcoex->bt_wait_time);
  383. ATH_DUMP_BTCOEX("Concurrent Tx", btcoex_hw->mci.concur_tx);
  384. ATH_DUMP_BTCOEX("Concurrent RSSI cnt", btcoex->rssi_count);
  385. len += scnprintf(buf + len, size - len, "BT Weights: ");
  386. for (i = 0; i < AR9300_NUM_BT_WEIGHTS; i++)
  387. len += scnprintf(buf + len, size - len, "%08x ",
  388. btcoex_hw->bt_weight[i]);
  389. len += scnprintf(buf + len, size - len, "\n");
  390. len += scnprintf(buf + len, size - len, "WLAN Weights: ");
  391. for (i = 0; i < AR9300_NUM_BT_WEIGHTS; i++)
  392. len += scnprintf(buf + len, size - len, "%08x ",
  393. btcoex_hw->wlan_weight[i]);
  394. len += scnprintf(buf + len, size - len, "\n");
  395. len += scnprintf(buf + len, size - len, "Tx Priorities: ");
  396. for (i = 0; i < ATH_BTCOEX_STOMP_MAX; i++)
  397. len += scnprintf(buf + len, size - len, "%08x ",
  398. btcoex_hw->tx_prio[i]);
  399. len += scnprintf(buf + len, size - len, "\n");
  400. return len;
  401. }
  402. static int ath9k_dump_legacy_btcoex(struct ath_softc *sc, u8 *buf, u32 size)
  403. {
  404. struct ath_btcoex *btcoex = &sc->btcoex;
  405. u32 len = 0;
  406. ATH_DUMP_BTCOEX("Stomp Type", btcoex->bt_stomp_type);
  407. ATH_DUMP_BTCOEX("BTCoex Period (msec)", btcoex->btcoex_period);
  408. ATH_DUMP_BTCOEX("Duty Cycle", btcoex->duty_cycle);
  409. ATH_DUMP_BTCOEX("BT Wait time", btcoex->bt_wait_time);
  410. return len;
  411. }
  412. int ath9k_dump_btcoex(struct ath_softc *sc, u8 *buf, u32 size)
  413. {
  414. if (ath9k_hw_mci_is_enabled(sc->sc_ah))
  415. return ath9k_dump_mci_btcoex(sc, buf, size);
  416. else
  417. return ath9k_dump_legacy_btcoex(sc, buf, size);
  418. }
  419. #endif /* CONFIG_ATH9K_BTCOEX_SUPPORT */