aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath9k/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath9k/core.c')
-rw-r--r--drivers/net/wireless/ath9k/core.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/drivers/net/wireless/ath9k/core.c b/drivers/net/wireless/ath9k/core.c
index 7f92d469ad02..8359356ac02e 100644
--- a/drivers/net/wireless/ath9k/core.c
+++ b/drivers/net/wireless/ath9k/core.c
@@ -355,7 +355,7 @@ int ath_set_channel(struct ath_softc *sc, struct ath9k_channel *hchan)
355 fastcc = false; 355 fastcc = false;
356 356
357 spin_lock_bh(&sc->sc_resetlock); 357 spin_lock_bh(&sc->sc_resetlock);
358 if (!ath9k_hw_reset(ah, sc->sc_opmode, hchan, 358 if (!ath9k_hw_reset(ah, hchan,
359 ht_macmode, sc->sc_tx_chainmask, 359 ht_macmode, sc->sc_tx_chainmask,
360 sc->sc_rx_chainmask, 360 sc->sc_rx_chainmask,
361 sc->sc_ht_extprotspacing, 361 sc->sc_ht_extprotspacing,
@@ -533,7 +533,8 @@ int ath_vap_listen(struct ath_softc *sc, int if_id)
533 rfilt = ath_calcrxfilter(sc); 533 rfilt = ath_calcrxfilter(sc);
534 ath9k_hw_setrxfilter(ah, rfilt); 534 ath9k_hw_setrxfilter(ah, rfilt);
535 535
536 if (sc->sc_opmode == ATH9K_M_STA || sc->sc_opmode == ATH9K_M_IBSS) { 536 if (sc->sc_ah->ah_opmode == ATH9K_M_STA ||
537 sc->sc_ah->ah_opmode == ATH9K_M_IBSS) {
537 memcpy(sc->sc_curbssid, ath_bcast_mac, ETH_ALEN); 538 memcpy(sc->sc_curbssid, ath_bcast_mac, ETH_ALEN);
538 ath9k_hw_write_associd(ah, sc->sc_curbssid, sc->sc_curaid); 539 ath9k_hw_write_associd(ah, sc->sc_curbssid, sc->sc_curaid);
539 } else 540 } else
@@ -603,7 +604,7 @@ int ath_vap_attach(struct ath_softc *sc,
603 sc->sc_vaps[if_id] = avp; 604 sc->sc_vaps[if_id] = avp;
604 sc->sc_nvaps++; 605 sc->sc_nvaps++;
605 /* Set the device opmode */ 606 /* Set the device opmode */
606 sc->sc_opmode = opmode; 607 sc->sc_ah->ah_opmode = opmode;
607 608
608 /* default VAP configuration */ 609 /* default VAP configuration */
609 avp->av_config.av_fixed_rateset = IEEE80211_FIXED_RATE_NONE; 610 avp->av_config.av_fixed_rateset = IEEE80211_FIXED_RATE_NONE;
@@ -677,7 +678,8 @@ int ath_open(struct ath_softc *sc, struct ath9k_channel *initial_chan)
677 int error = 0; 678 int error = 0;
678 enum ath9k_ht_macmode ht_macmode = ath_cwm_macmode(sc); 679 enum ath9k_ht_macmode ht_macmode = ath_cwm_macmode(sc);
679 680
680 DPRINTF(sc, ATH_DBG_CONFIG, "%s: mode %d\n", __func__, sc->sc_opmode); 681 DPRINTF(sc, ATH_DBG_CONFIG, "%s: mode %d\n",
682 __func__, sc->sc_ah->ah_opmode);
681 683
682 /* 684 /*
683 * Stop anything previously setup. This is safe 685 * Stop anything previously setup. This is safe
@@ -702,7 +704,7 @@ int ath_open(struct ath_softc *sc, struct ath9k_channel *initial_chan)
702 sc->sc_curchan = *initial_chan; 704 sc->sc_curchan = *initial_chan;
703 705
704 spin_lock_bh(&sc->sc_resetlock); 706 spin_lock_bh(&sc->sc_resetlock);
705 if (!ath9k_hw_reset(ah, sc->sc_opmode, &sc->sc_curchan, ht_macmode, 707 if (!ath9k_hw_reset(ah, &sc->sc_curchan, ht_macmode,
706 sc->sc_tx_chainmask, sc->sc_rx_chainmask, 708 sc->sc_tx_chainmask, sc->sc_rx_chainmask,
707 sc->sc_ht_extprotspacing, false, &status)) { 709 sc->sc_ht_extprotspacing, false, &status)) {
708 DPRINTF(sc, ATH_DBG_FATAL, 710 DPRINTF(sc, ATH_DBG_FATAL,
@@ -749,7 +751,8 @@ int ath_open(struct ath_softc *sc, struct ath9k_channel *initial_chan)
749 * Note we only do this (at the moment) for station mode. 751 * Note we only do this (at the moment) for station mode.
750 */ 752 */
751 if (ath9k_hw_phycounters(ah) && 753 if (ath9k_hw_phycounters(ah) &&
752 ((sc->sc_opmode == ATH9K_M_STA) || (sc->sc_opmode == ATH9K_M_IBSS))) 754 ((sc->sc_ah->ah_opmode == ATH9K_M_STA) ||
755 (sc->sc_ah->ah_opmode == ATH9K_M_IBSS)))
753 sc->sc_imask |= ATH9K_INT_MIB; 756 sc->sc_imask |= ATH9K_INT_MIB;
754 /* 757 /*
755 * Some hardware processes the TIM IE and fires an 758 * Some hardware processes the TIM IE and fires an
@@ -758,7 +761,7 @@ int ath_open(struct ath_softc *sc, struct ath9k_channel *initial_chan)
758 * enable the TIM interrupt when operating as station. 761 * enable the TIM interrupt when operating as station.
759 */ 762 */
760 if ((ah->ah_caps.hw_caps & ATH9K_HW_CAP_ENHANCEDPM) && 763 if ((ah->ah_caps.hw_caps & ATH9K_HW_CAP_ENHANCEDPM) &&
761 (sc->sc_opmode == ATH9K_M_STA) && 764 (sc->sc_ah->ah_opmode == ATH9K_M_STA) &&
762 !sc->sc_config.swBeaconProcess) 765 !sc->sc_config.swBeaconProcess)
763 sc->sc_imask |= ATH9K_INT_TIM; 766 sc->sc_imask |= ATH9K_INT_TIM;
764 /* 767 /*
@@ -789,7 +792,7 @@ int ath_reset(struct ath_softc *sc, bool retry_tx)
789 792
790 /* Reset chip */ 793 /* Reset chip */
791 spin_lock_bh(&sc->sc_resetlock); 794 spin_lock_bh(&sc->sc_resetlock);
792 if (!ath9k_hw_reset(ah, sc->sc_opmode, &sc->sc_curchan, 795 if (!ath9k_hw_reset(ah, &sc->sc_curchan,
793 ht_macmode, 796 ht_macmode,
794 sc->sc_tx_chainmask, sc->sc_rx_chainmask, 797 sc->sc_tx_chainmask, sc->sc_rx_chainmask,
795 sc->sc_ht_extprotspacing, false, &status)) { 798 sc->sc_ht_extprotspacing, false, &status)) {
@@ -1096,7 +1099,7 @@ int ath_init(u16 devid, struct ath_softc *sc)
1096 goto bad; 1099 goto bad;
1097 1100
1098 /* default to STA mode */ 1101 /* default to STA mode */
1099 sc->sc_opmode = ATH9K_M_MONITOR; 1102 sc->sc_ah->ah_opmode = ATH9K_M_MONITOR;
1100 1103
1101 /* Setup rate tables */ 1104 /* Setup rate tables */
1102 1105