aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath9k/beacon.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath9k/beacon.c')
-rw-r--r--drivers/net/wireless/ath9k/beacon.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/net/wireless/ath9k/beacon.c b/drivers/net/wireless/ath9k/beacon.c
index ca5782fa7627..fe6929dc2937 100644
--- a/drivers/net/wireless/ath9k/beacon.c
+++ b/drivers/net/wireless/ath9k/beacon.c
@@ -27,7 +27,7 @@ static int ath_beaconq_config(struct ath_softc *sc)
27 struct ath9k_tx_queue_info qi; 27 struct ath9k_tx_queue_info qi;
28 28
29 ath9k_hw_get_txq_props(ah, sc->sc_bhalq, &qi); 29 ath9k_hw_get_txq_props(ah, sc->sc_bhalq, &qi);
30 if (sc->sc_ah->ah_opmode == ATH9K_M_HOSTAP) { 30 if (sc->sc_ah->ah_opmode == NL80211_IFTYPE_AP) {
31 /* Always burst out beacon and CAB traffic. */ 31 /* Always burst out beacon and CAB traffic. */
32 qi.tqi_aifs = 1; 32 qi.tqi_aifs = 1;
33 qi.tqi_cwmin = 0; 33 qi.tqi_cwmin = 0;
@@ -82,7 +82,7 @@ static void ath_beacon_setup(struct ath_softc *sc,
82 82
83 flags = ATH9K_TXDESC_NOACK; 83 flags = ATH9K_TXDESC_NOACK;
84 84
85 if (sc->sc_ah->ah_opmode == ATH9K_M_IBSS && 85 if (sc->sc_ah->ah_opmode == NL80211_IFTYPE_ADHOC &&
86 (ah->ah_caps.hw_caps & ATH9K_HW_CAP_VEOL)) { 86 (ah->ah_caps.hw_caps & ATH9K_HW_CAP_VEOL)) {
87 ds->ds_link = bf->bf_daddr; /* self-linked */ 87 ds->ds_link = bf->bf_daddr; /* self-linked */
88 flags |= ATH9K_TXDESC_VEOL; 88 flags |= ATH9K_TXDESC_VEOL;
@@ -302,7 +302,7 @@ int ath_beacon_alloc(struct ath_softc *sc, int if_id)
302 struct ath_buf, list); 302 struct ath_buf, list);
303 list_del(&avp->av_bcbuf->list); 303 list_del(&avp->av_bcbuf->list);
304 304
305 if (sc->sc_ah->ah_opmode == ATH9K_M_HOSTAP || 305 if (sc->sc_ah->ah_opmode == NL80211_IFTYPE_AP ||
306 !(sc->sc_ah->ah_caps.hw_caps & ATH9K_HW_CAP_VEOL)) { 306 !(sc->sc_ah->ah_caps.hw_caps & ATH9K_HW_CAP_VEOL)) {
307 int slot; 307 int slot;
308 /* 308 /*
@@ -607,16 +607,16 @@ void ath_beacon_config(struct ath_softc *sc, int if_id)
607 struct ath_hal *ah = sc->sc_ah; 607 struct ath_hal *ah = sc->sc_ah;
608 struct ath_beacon_config conf; 608 struct ath_beacon_config conf;
609 struct ath_vap *avp; 609 struct ath_vap *avp;
610 enum ath9k_opmode av_opmode; 610 enum nl80211_iftype opmode;
611 u32 nexttbtt, intval; 611 u32 nexttbtt, intval;
612 612
613 if (if_id != ATH_IF_ID_ANY) { 613 if (if_id != ATH_IF_ID_ANY) {
614 vif = sc->sc_vaps[if_id]; 614 vif = sc->sc_vaps[if_id];
615 ASSERT(vif); 615 ASSERT(vif);
616 avp = (void *)vif->drv_priv; 616 avp = (void *)vif->drv_priv;
617 av_opmode = avp->av_opmode; 617 opmode = avp->av_opmode;
618 } else { 618 } else {
619 av_opmode = sc->sc_ah->ah_opmode; 619 opmode = sc->sc_ah->ah_opmode;
620 } 620 }
621 621
622 memset(&conf, 0, sizeof(struct ath_beacon_config)); 622 memset(&conf, 0, sizeof(struct ath_beacon_config));
@@ -632,7 +632,7 @@ void ath_beacon_config(struct ath_softc *sc, int if_id)
632 nexttbtt = TSF_TO_TU(sc->bc_tstamp >> 32, sc->bc_tstamp); 632 nexttbtt = TSF_TO_TU(sc->bc_tstamp >> 32, sc->bc_tstamp);
633 633
634 /* XXX conditionalize multi-bss support? */ 634 /* XXX conditionalize multi-bss support? */
635 if (sc->sc_ah->ah_opmode == ATH9K_M_HOSTAP) { 635 if (sc->sc_ah->ah_opmode == NL80211_IFTYPE_AP) {
636 /* 636 /*
637 * For multi-bss ap support beacons are either staggered 637 * For multi-bss ap support beacons are either staggered
638 * evenly over N slots or burst together. For the former 638 * evenly over N slots or burst together. For the former
@@ -654,8 +654,8 @@ void ath_beacon_config(struct ath_softc *sc, int if_id)
654 DPRINTF(sc, ATH_DBG_BEACON, "nexttbtt %u intval %u (%u)\n", 654 DPRINTF(sc, ATH_DBG_BEACON, "nexttbtt %u intval %u (%u)\n",
655 nexttbtt, intval, conf.beacon_interval); 655 nexttbtt, intval, conf.beacon_interval);
656 656
657 /* Check for ATH9K_M_HOSTAP and sc_nostabeacons for WDS client */ 657 /* Check for NL80211_IFTYPE_AP and sc_nostabeacons for WDS client */
658 if (sc->sc_ah->ah_opmode == ATH9K_M_STA) { 658 if (sc->sc_ah->ah_opmode == NL80211_IFTYPE_STATION) {
659 struct ath9k_beacon_state bs; 659 struct ath9k_beacon_state bs;
660 u64 tsf; 660 u64 tsf;
661 u32 tsftu; 661 u32 tsftu;
@@ -774,7 +774,7 @@ void ath_beacon_config(struct ath_softc *sc, int if_id)
774 ath9k_hw_set_interrupts(ah, 0); 774 ath9k_hw_set_interrupts(ah, 0);
775 if (nexttbtt == intval) 775 if (nexttbtt == intval)
776 intval |= ATH9K_BEACON_RESET_TSF; 776 intval |= ATH9K_BEACON_RESET_TSF;
777 if (sc->sc_ah->ah_opmode == ATH9K_M_IBSS) { 777 if (sc->sc_ah->ah_opmode == NL80211_IFTYPE_ADHOC) {
778 /* 778 /*
779 * Pull nexttbtt forward to reflect the current 779 * Pull nexttbtt forward to reflect the current
780 * TSF 780 * TSF
@@ -806,7 +806,7 @@ void ath_beacon_config(struct ath_softc *sc, int if_id)
806 if (!(ah->ah_caps.hw_caps & ATH9K_HW_CAP_VEOL)) 806 if (!(ah->ah_caps.hw_caps & ATH9K_HW_CAP_VEOL))
807 sc->sc_imask |= ATH9K_INT_SWBA; 807 sc->sc_imask |= ATH9K_INT_SWBA;
808 ath_beaconq_config(sc); 808 ath_beaconq_config(sc);
809 } else if (sc->sc_ah->ah_opmode == ATH9K_M_HOSTAP) { 809 } else if (sc->sc_ah->ah_opmode == NL80211_IFTYPE_AP) {
810 /* 810 /*
811 * In AP mode we enable the beacon timers and 811 * In AP mode we enable the beacon timers and
812 * SWBA interrupts to prepare beacon frames. 812 * SWBA interrupts to prepare beacon frames.
@@ -822,7 +822,7 @@ void ath_beacon_config(struct ath_softc *sc, int if_id)
822 * When using a self-linked beacon descriptor in 822 * When using a self-linked beacon descriptor in
823 * ibss mode load it once here. 823 * ibss mode load it once here.
824 */ 824 */
825 if (sc->sc_ah->ah_opmode == ATH9K_M_IBSS && 825 if (sc->sc_ah->ah_opmode == NL80211_IFTYPE_ADHOC &&
826 (ah->ah_caps.hw_caps & ATH9K_HW_CAP_VEOL)) 826 (ah->ah_caps.hw_caps & ATH9K_HW_CAP_VEOL))
827 ath_beacon_start_adhoc(sc, 0); 827 ath_beacon_start_adhoc(sc, 0);
828 } 828 }