aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/init.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/init.c35
1 files changed, 7 insertions, 28 deletions
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index 18d76ede859d..514a4014c198 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -379,36 +379,14 @@ static void ath9k_init_crypto(struct ath_softc *sc)
379 for (i = 0; i < common->keymax; i++) 379 for (i = 0; i < common->keymax; i++)
380 ath9k_hw_keyreset(sc->sc_ah, (u16) i); 380 ath9k_hw_keyreset(sc->sc_ah, (u16) i);
381 381
382 if (ath9k_hw_getcapability(sc->sc_ah, ATH9K_CAP_CIPHER,
383 ATH9K_CIPHER_TKIP, NULL)) {
384 /*
385 * Whether we should enable h/w TKIP MIC.
386 * XXX: if we don't support WME TKIP MIC, then we wouldn't
387 * report WMM capable, so it's always safe to turn on
388 * TKIP MIC in this case.
389 */
390 ath9k_hw_setcapability(sc->sc_ah, ATH9K_CAP_TKIP_MIC, 0, 1, NULL);
391 }
392
393 /* 382 /*
394 * Check whether the separate key cache entries 383 * Check whether the separate key cache entries
395 * are required to handle both tx+rx MIC keys. 384 * are required to handle both tx+rx MIC keys.
396 * With split mic keys the number of stations is limited 385 * With split mic keys the number of stations is limited
397 * to 27 otherwise 59. 386 * to 27 otherwise 59.
398 */ 387 */
399 if (ath9k_hw_getcapability(sc->sc_ah, ATH9K_CAP_CIPHER, 388 if (!(sc->sc_ah->misc_mode & AR_PCU_MIC_NEW_LOC_ENA))
400 ATH9K_CIPHER_TKIP, NULL)
401 && ath9k_hw_getcapability(sc->sc_ah, ATH9K_CAP_CIPHER,
402 ATH9K_CIPHER_MIC, NULL)
403 && ath9k_hw_getcapability(sc->sc_ah, ATH9K_CAP_TKIP_SPLIT,
404 0, NULL))
405 common->splitmic = 1; 389 common->splitmic = 1;
406
407 /* turn on mcast key search if possible */
408 if (!ath9k_hw_getcapability(sc->sc_ah, ATH9K_CAP_MCAST_KEYSRCH, 0, NULL))
409 (void)ath9k_hw_setcapability(sc->sc_ah, ATH9K_CAP_MCAST_KEYSRCH,
410 1, 1, NULL);
411
412} 390}
413 391
414static int ath9k_init_btcoex(struct ath_softc *sc) 392static int ath9k_init_btcoex(struct ath_softc *sc)
@@ -426,7 +404,7 @@ static int ath9k_init_btcoex(struct ath_softc *sc)
426 r = ath_init_btcoex_timer(sc); 404 r = ath_init_btcoex_timer(sc);
427 if (r) 405 if (r)
428 return -1; 406 return -1;
429 qnum = ath_tx_get_qnum(sc, ATH9K_TX_QUEUE_DATA, ATH9K_WME_AC_BE); 407 qnum = sc->tx.hwq_map[WME_AC_BE];
430 ath9k_hw_init_btcoex_hw(sc->sc_ah, qnum); 408 ath9k_hw_init_btcoex_hw(sc->sc_ah, qnum);
431 sc->btcoex.bt_stomp_type = ATH_BTCOEX_STOMP_LOW; 409 sc->btcoex.bt_stomp_type = ATH_BTCOEX_STOMP_LOW;
432 break; 410 break;
@@ -463,23 +441,23 @@ static int ath9k_init_queues(struct ath_softc *sc)
463 sc->config.cabqReadytime = ATH_CABQ_READY_TIME; 441 sc->config.cabqReadytime = ATH_CABQ_READY_TIME;
464 ath_cabq_update(sc); 442 ath_cabq_update(sc);
465 443
466 if (!ath_tx_setup(sc, ATH9K_WME_AC_BK)) { 444 if (!ath_tx_setup(sc, WME_AC_BK)) {
467 ath_print(common, ATH_DBG_FATAL, 445 ath_print(common, ATH_DBG_FATAL,
468 "Unable to setup xmit queue for BK traffic\n"); 446 "Unable to setup xmit queue for BK traffic\n");
469 goto err; 447 goto err;
470 } 448 }
471 449
472 if (!ath_tx_setup(sc, ATH9K_WME_AC_BE)) { 450 if (!ath_tx_setup(sc, WME_AC_BE)) {
473 ath_print(common, ATH_DBG_FATAL, 451 ath_print(common, ATH_DBG_FATAL,
474 "Unable to setup xmit queue for BE traffic\n"); 452 "Unable to setup xmit queue for BE traffic\n");
475 goto err; 453 goto err;
476 } 454 }
477 if (!ath_tx_setup(sc, ATH9K_WME_AC_VI)) { 455 if (!ath_tx_setup(sc, WME_AC_VI)) {
478 ath_print(common, ATH_DBG_FATAL, 456 ath_print(common, ATH_DBG_FATAL,
479 "Unable to setup xmit queue for VI traffic\n"); 457 "Unable to setup xmit queue for VI traffic\n");
480 goto err; 458 goto err;
481 } 459 }
482 if (!ath_tx_setup(sc, ATH9K_WME_AC_VO)) { 460 if (!ath_tx_setup(sc, WME_AC_VO)) {
483 ath_print(common, ATH_DBG_FATAL, 461 ath_print(common, ATH_DBG_FATAL,
484 "Unable to setup xmit queue for VO traffic\n"); 462 "Unable to setup xmit queue for VO traffic\n");
485 goto err; 463 goto err;
@@ -736,6 +714,7 @@ int ath9k_init_device(u16 devid, struct ath_softc *sc, u16 subsysid,
736 goto error_world; 714 goto error_world;
737 } 715 }
738 716
717 INIT_WORK(&sc->paprd_work, ath_paprd_calibrate);
739 INIT_WORK(&sc->chan_work, ath9k_wiphy_chan_work); 718 INIT_WORK(&sc->chan_work, ath9k_wiphy_chan_work);
740 INIT_DELAYED_WORK(&sc->wiphy_work, ath9k_wiphy_work); 719 INIT_DELAYED_WORK(&sc->wiphy_work, ath9k_wiphy_work);
741 sc->wiphy_scheduler_int = msecs_to_jiffies(500); 720 sc->wiphy_scheduler_int = msecs_to_jiffies(500);