aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath9k/beacon.c
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2008-08-11 04:34:52 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-08-29 16:23:58 -0400
commitb4696c8b9233bea812b972a5e79c5db7ecf13867 (patch)
treeaf515054456aa403ca973ecf9640e15639f75f5a /drivers/net/wireless/ath9k/beacon.c
parent6a2b9e8c8f4be9954933051719b312adcfb7263d (diff)
ath9k: Use a single opmode variable
ah_opmode and sc_opmode are redundant. This patch removes sc_opmode. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/beacon.c')
-rw-r--r--drivers/net/wireless/ath9k/beacon.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/wireless/ath9k/beacon.c b/drivers/net/wireless/ath9k/beacon.c
index 67a804626757..2736a4b4e4a1 100644
--- a/drivers/net/wireless/ath9k/beacon.c
+++ b/drivers/net/wireless/ath9k/beacon.c
@@ -33,7 +33,7 @@ static int ath_beaconq_config(struct ath_softc *sc)
33 struct ath9k_tx_queue_info qi; 33 struct ath9k_tx_queue_info qi;
34 34
35 ath9k_hw_get_txq_props(ah, sc->sc_bhalq, &qi); 35 ath9k_hw_get_txq_props(ah, sc->sc_bhalq, &qi);
36 if (sc->sc_opmode == ATH9K_M_HOSTAP) { 36 if (sc->sc_ah->ah_opmode == ATH9K_M_HOSTAP) {
37 /* Always burst out beacon and CAB traffic. */ 37 /* Always burst out beacon and CAB traffic. */
38 qi.tqi_aifs = 1; 38 qi.tqi_aifs = 1;
39 qi.tqi_cwmin = 0; 39 qi.tqi_cwmin = 0;
@@ -85,7 +85,7 @@ static void ath_beacon_setup(struct ath_softc *sc,
85 85
86 flags = ATH9K_TXDESC_NOACK; 86 flags = ATH9K_TXDESC_NOACK;
87 87
88 if (sc->sc_opmode == ATH9K_M_IBSS && 88 if (sc->sc_ah->ah_opmode == ATH9K_M_IBSS &&
89 (ah->ah_caps.hw_caps & ATH9K_HW_CAP_VEOL)) { 89 (ah->ah_caps.hw_caps & ATH9K_HW_CAP_VEOL)) {
90 ds->ds_link = bf->bf_daddr; /* self-linked */ 90 ds->ds_link = bf->bf_daddr; /* self-linked */
91 flags |= ATH9K_TXDESC_VEOL; 91 flags |= ATH9K_TXDESC_VEOL;
@@ -375,7 +375,7 @@ int ath_beacon_alloc(struct ath_softc *sc, int if_id)
375 struct ath_buf, list); 375 struct ath_buf, list);
376 list_del(&avp->av_bcbuf->list); 376 list_del(&avp->av_bcbuf->list);
377 377
378 if (sc->sc_opmode == ATH9K_M_HOSTAP || 378 if (sc->sc_ah->ah_opmode == ATH9K_M_HOSTAP ||
379 !(sc->sc_ah->ah_caps.hw_caps & ATH9K_HW_CAP_VEOL)) { 379 !(sc->sc_ah->ah_caps.hw_caps & ATH9K_HW_CAP_VEOL)) {
380 int slot; 380 int slot;
381 /* 381 /*
@@ -750,7 +750,7 @@ void ath_beacon_config(struct ath_softc *sc, int if_id)
750 if (if_id != ATH_IF_ID_ANY) 750 if (if_id != ATH_IF_ID_ANY)
751 av_opmode = sc->sc_vaps[if_id]->av_opmode; 751 av_opmode = sc->sc_vaps[if_id]->av_opmode;
752 else 752 else
753 av_opmode = sc->sc_opmode; 753 av_opmode = sc->sc_ah->ah_opmode;
754 754
755 memzero(&conf, sizeof(struct ath_beacon_config)); 755 memzero(&conf, sizeof(struct ath_beacon_config));
756 756
@@ -770,7 +770,7 @@ void ath_beacon_config(struct ath_softc *sc, int if_id)
770 nexttbtt = TSF_TO_TU(get_unaligned_le32(conf.u.last_tstamp + 4), 770 nexttbtt = TSF_TO_TU(get_unaligned_le32(conf.u.last_tstamp + 4),
771 get_unaligned_le32(conf.u.last_tstamp)); 771 get_unaligned_le32(conf.u.last_tstamp));
772 /* XXX conditionalize multi-bss support? */ 772 /* XXX conditionalize multi-bss support? */
773 if (sc->sc_opmode == ATH9K_M_HOSTAP) { 773 if (sc->sc_ah->ah_opmode == ATH9K_M_HOSTAP) {
774 /* 774 /*
775 * For multi-bss ap support beacons are either staggered 775 * For multi-bss ap support beacons are either staggered
776 * evenly over N slots or burst together. For the former 776 * evenly over N slots or burst together. For the former
@@ -791,7 +791,7 @@ void ath_beacon_config(struct ath_softc *sc, int if_id)
791 DPRINTF(sc, ATH_DBG_BEACON, "%s: nexttbtt %u intval %u (%u)\n", 791 DPRINTF(sc, ATH_DBG_BEACON, "%s: nexttbtt %u intval %u (%u)\n",
792 __func__, nexttbtt, intval, conf.beacon_interval); 792 __func__, nexttbtt, intval, conf.beacon_interval);
793 /* Check for ATH9K_M_HOSTAP and sc_nostabeacons for WDS client */ 793 /* Check for ATH9K_M_HOSTAP and sc_nostabeacons for WDS client */
794 if (sc->sc_opmode == ATH9K_M_STA) { 794 if (sc->sc_ah->ah_opmode == ATH9K_M_STA) {
795 struct ath9k_beacon_state bs; 795 struct ath9k_beacon_state bs;
796 u64 tsf; 796 u64 tsf;
797 u32 tsftu; 797 u32 tsftu;
@@ -911,7 +911,7 @@ void ath_beacon_config(struct ath_softc *sc, int if_id)
911 ath9k_hw_set_interrupts(ah, 0); 911 ath9k_hw_set_interrupts(ah, 0);
912 if (nexttbtt == intval) 912 if (nexttbtt == intval)
913 intval |= ATH9K_BEACON_RESET_TSF; 913 intval |= ATH9K_BEACON_RESET_TSF;
914 if (sc->sc_opmode == ATH9K_M_IBSS) { 914 if (sc->sc_ah->ah_opmode == ATH9K_M_IBSS) {
915 /* 915 /*
916 * Pull nexttbtt forward to reflect the current 916 * Pull nexttbtt forward to reflect the current
917 * TSF . 917 * TSF .
@@ -943,7 +943,7 @@ void ath_beacon_config(struct ath_softc *sc, int if_id)
943 if (!(ah->ah_caps.hw_caps & ATH9K_HW_CAP_VEOL)) 943 if (!(ah->ah_caps.hw_caps & ATH9K_HW_CAP_VEOL))
944 sc->sc_imask |= ATH9K_INT_SWBA; 944 sc->sc_imask |= ATH9K_INT_SWBA;
945 ath_beaconq_config(sc); 945 ath_beaconq_config(sc);
946 } else if (sc->sc_opmode == ATH9K_M_HOSTAP) { 946 } else if (sc->sc_ah->ah_opmode == ATH9K_M_HOSTAP) {
947 /* 947 /*
948 * In AP mode we enable the beacon timers and 948 * In AP mode we enable the beacon timers and
949 * SWBA interrupts to prepare beacon frames. 949 * SWBA interrupts to prepare beacon frames.
@@ -959,7 +959,7 @@ void ath_beacon_config(struct ath_softc *sc, int if_id)
959 * When using a self-linked beacon descriptor in 959 * When using a self-linked beacon descriptor in
960 * ibss mode load it once here. 960 * ibss mode load it once here.
961 */ 961 */
962 if (sc->sc_opmode == ATH9K_M_IBSS && 962 if (sc->sc_ah->ah_opmode == ATH9K_M_IBSS &&
963 (ah->ah_caps.hw_caps & ATH9K_HW_CAP_VEOL)) 963 (ah->ah_caps.hw_caps & ATH9K_HW_CAP_VEOL))
964 ath_beacon_start_adhoc(sc, 0); 964 ath_beacon_start_adhoc(sc, 0);
965 } 965 }