aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath9k/beacon.c
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2009-02-09 02:57:03 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-02-13 13:44:58 -0500
commit17d7904de85125c62c7258d7cb21207f26d04048 (patch)
tree298d52125b29534c6dfcf79d6eb643c2261e82df /drivers/net/wireless/ath9k/beacon.c
parentee6e8d1c234e62e503f2dd8137643b24cf424886 (diff)
ath9k: Remove all the sc_ prefixes
This patch removes the useless sc_ prefixes for all variables. Also, refer to interfaces as VIFs and not as VAPs anymore. Signed-off-by: Sujith <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.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/drivers/net/wireless/ath9k/beacon.c b/drivers/net/wireless/ath9k/beacon.c
index 1f92ad7d3c72..139bba738c5f 100644
--- a/drivers/net/wireless/ath9k/beacon.c
+++ b/drivers/net/wireless/ath9k/beacon.c
@@ -63,7 +63,7 @@ static void ath_bstuck_process(struct ath_softc *sc)
63 * Beacons are always sent out at the lowest rate, and are not retried. 63 * Beacons are always sent out at the lowest rate, and are not retried.
64*/ 64*/
65static void ath_beacon_setup(struct ath_softc *sc, 65static void ath_beacon_setup(struct ath_softc *sc,
66 struct ath_vap *avp, struct ath_buf *bf) 66 struct ath_vif *avp, struct ath_buf *bf)
67{ 67{
68 struct sk_buff *skb = (struct sk_buff *)bf->bf_mpdu; 68 struct sk_buff *skb = (struct sk_buff *)bf->bf_mpdu;
69 struct ath_hal *ah = sc->sc_ah; 69 struct ath_hal *ah = sc->sc_ah;
@@ -96,7 +96,7 @@ static void ath_beacon_setup(struct ath_softc *sc,
96 * SWBA's 96 * SWBA's
97 * XXX assumes two antenna 97 * XXX assumes two antenna
98 */ 98 */
99 antenna = ((sc->beacon.ast_be_xmit / sc->sc_nbcnvaps) & 1 ? 2 : 1); 99 antenna = ((sc->beacon.ast_be_xmit / sc->nbcnvifs) & 1 ? 2 : 1);
100 } 100 }
101 101
102 ds->ds_data = bf->bf_buf_addr; 102 ds->ds_data = bf->bf_buf_addr;
@@ -132,24 +132,24 @@ static void ath_beacon_setup(struct ath_softc *sc,
132 memset(series, 0, sizeof(struct ath9k_11n_rate_series) * 4); 132 memset(series, 0, sizeof(struct ath9k_11n_rate_series) * 4);
133 series[0].Tries = 1; 133 series[0].Tries = 1;
134 series[0].Rate = rate; 134 series[0].Rate = rate;
135 series[0].ChSel = sc->sc_tx_chainmask; 135 series[0].ChSel = sc->tx_chainmask;
136 series[0].RateFlags = (ctsrate) ? ATH9K_RATESERIES_RTS_CTS : 0; 136 series[0].RateFlags = (ctsrate) ? ATH9K_RATESERIES_RTS_CTS : 0;
137 ath9k_hw_set11n_ratescenario(ah, ds, ds, 0, 137 ath9k_hw_set11n_ratescenario(ah, ds, ds, 0,
138 ctsrate, ctsduration, series, 4, 0); 138 ctsrate, ctsduration, series, 4, 0);
139} 139}
140 140
141/* Generate beacon frame and queue cab data for a vap */ 141/* Generate beacon frame and queue cab data for a VIF */
142static struct ath_buf *ath_beacon_generate(struct ath_softc *sc, int if_id) 142static struct ath_buf *ath_beacon_generate(struct ath_softc *sc, int if_id)
143{ 143{
144 struct ath_buf *bf; 144 struct ath_buf *bf;
145 struct ath_vap *avp; 145 struct ath_vif *avp;
146 struct sk_buff *skb; 146 struct sk_buff *skb;
147 struct ath_txq *cabq; 147 struct ath_txq *cabq;
148 struct ieee80211_vif *vif; 148 struct ieee80211_vif *vif;
149 struct ieee80211_tx_info *info; 149 struct ieee80211_tx_info *info;
150 int cabq_depth; 150 int cabq_depth;
151 151
152 vif = sc->sc_vaps[if_id]; 152 vif = sc->vifs[if_id];
153 ASSERT(vif); 153 ASSERT(vif);
154 154
155 avp = (void *)vif->drv_priv; 155 avp = (void *)vif->drv_priv;
@@ -204,10 +204,10 @@ static struct ath_buf *ath_beacon_generate(struct ath_softc *sc, int if_id)
204 /* 204 /*
205 * if the CABQ traffic from previous DTIM is pending and the current 205 * if the CABQ traffic from previous DTIM is pending and the current
206 * beacon is also a DTIM. 206 * beacon is also a DTIM.
207 * 1) if there is only one vap let the cab traffic continue. 207 * 1) if there is only one vif let the cab traffic continue.
208 * 2) if there are more than one vap and we are using staggered 208 * 2) if there are more than one vif and we are using staggered
209 * beacons, then drain the cabq by dropping all the frames in 209 * beacons, then drain the cabq by dropping all the frames in
210 * the cabq so that the current vaps cab traffic can be scheduled. 210 * the cabq so that the current vifs cab traffic can be scheduled.
211 */ 211 */
212 spin_lock_bh(&cabq->axq_lock); 212 spin_lock_bh(&cabq->axq_lock);
213 cabq_depth = cabq->axq_depth; 213 cabq_depth = cabq->axq_depth;
@@ -219,7 +219,7 @@ static struct ath_buf *ath_beacon_generate(struct ath_softc *sc, int if_id)
219 * the lock again which is a common function and that 219 * the lock again which is a common function and that
220 * acquires txq lock inside. 220 * acquires txq lock inside.
221 */ 221 */
222 if (sc->sc_nvaps > 1) { 222 if (sc->nvifs > 1) {
223 ath_draintxq(sc, cabq, false); 223 ath_draintxq(sc, cabq, false);
224 DPRINTF(sc, ATH_DBG_BEACON, 224 DPRINTF(sc, ATH_DBG_BEACON,
225 "flush previous cabq traffic\n"); 225 "flush previous cabq traffic\n");
@@ -250,10 +250,10 @@ static void ath_beacon_start_adhoc(struct ath_softc *sc, int if_id)
250 struct ieee80211_vif *vif; 250 struct ieee80211_vif *vif;
251 struct ath_hal *ah = sc->sc_ah; 251 struct ath_hal *ah = sc->sc_ah;
252 struct ath_buf *bf; 252 struct ath_buf *bf;
253 struct ath_vap *avp; 253 struct ath_vif *avp;
254 struct sk_buff *skb; 254 struct sk_buff *skb;
255 255
256 vif = sc->sc_vaps[if_id]; 256 vif = sc->vifs[if_id];
257 ASSERT(vif); 257 ASSERT(vif);
258 258
259 avp = (void *)vif->drv_priv; 259 avp = (void *)vif->drv_priv;
@@ -291,13 +291,13 @@ int ath_beaconq_setup(struct ath_hal *ah)
291int ath_beacon_alloc(struct ath_softc *sc, int if_id) 291int ath_beacon_alloc(struct ath_softc *sc, int if_id)
292{ 292{
293 struct ieee80211_vif *vif; 293 struct ieee80211_vif *vif;
294 struct ath_vap *avp; 294 struct ath_vif *avp;
295 struct ieee80211_hdr *hdr; 295 struct ieee80211_hdr *hdr;
296 struct ath_buf *bf; 296 struct ath_buf *bf;
297 struct sk_buff *skb; 297 struct sk_buff *skb;
298 __le64 tstamp; 298 __le64 tstamp;
299 299
300 vif = sc->sc_vaps[if_id]; 300 vif = sc->vifs[if_id];
301 ASSERT(vif); 301 ASSERT(vif);
302 302
303 avp = (void *)vif->drv_priv; 303 avp = (void *)vif->drv_priv;
@@ -314,7 +314,7 @@ int ath_beacon_alloc(struct ath_softc *sc, int if_id)
314 !(sc->sc_ah->ah_caps.hw_caps & ATH9K_HW_CAP_VEOL)) { 314 !(sc->sc_ah->ah_caps.hw_caps & ATH9K_HW_CAP_VEOL)) {
315 int slot; 315 int slot;
316 /* 316 /*
317 * Assign the vap to a beacon xmit slot. As 317 * Assign the vif to a beacon xmit slot. As
318 * above, this cannot fail to find one. 318 * above, this cannot fail to find one.
319 */ 319 */
320 avp->av_bslot = 0; 320 avp->av_bslot = 0;
@@ -335,7 +335,7 @@ int ath_beacon_alloc(struct ath_softc *sc, int if_id)
335 } 335 }
336 BUG_ON(sc->beacon.bslot[avp->av_bslot] != ATH_IF_ID_ANY); 336 BUG_ON(sc->beacon.bslot[avp->av_bslot] != ATH_IF_ID_ANY);
337 sc->beacon.bslot[avp->av_bslot] = if_id; 337 sc->beacon.bslot[avp->av_bslot] = if_id;
338 sc->sc_nbcnvaps++; 338 sc->nbcnvifs++;
339 } 339 }
340 } 340 }
341 341
@@ -384,8 +384,8 @@ int ath_beacon_alloc(struct ath_softc *sc, int if_id)
384 * timestamp then convert to TSF units and handle 384 * timestamp then convert to TSF units and handle
385 * byte swapping before writing it in the frame. 385 * byte swapping before writing it in the frame.
386 * The hardware will then add this each time a beacon 386 * The hardware will then add this each time a beacon
387 * frame is sent. Note that we align vap's 1..N 387 * frame is sent. Note that we align vif's 1..N
388 * and leave vap 0 untouched. This means vap 0 388 * and leave vif 0 untouched. This means vap 0
389 * has a timestamp in one beacon interval while the 389 * has a timestamp in one beacon interval while the
390 * others get a timestamp aligned to the next interval. 390 * others get a timestamp aligned to the next interval.
391 */ 391 */
@@ -416,14 +416,14 @@ int ath_beacon_alloc(struct ath_softc *sc, int if_id)
416 return 0; 416 return 0;
417} 417}
418 418
419void ath_beacon_return(struct ath_softc *sc, struct ath_vap *avp) 419void ath_beacon_return(struct ath_softc *sc, struct ath_vif *avp)
420{ 420{
421 if (avp->av_bcbuf != NULL) { 421 if (avp->av_bcbuf != NULL) {
422 struct ath_buf *bf; 422 struct ath_buf *bf;
423 423
424 if (avp->av_bslot != -1) { 424 if (avp->av_bslot != -1) {
425 sc->beacon.bslot[avp->av_bslot] = ATH_IF_ID_ANY; 425 sc->beacon.bslot[avp->av_bslot] = ATH_IF_ID_ANY;
426 sc->sc_nbcnvaps--; 426 sc->nbcnvifs--;
427 } 427 }
428 428
429 bf = avp->av_bcbuf; 429 bf = avp->av_bcbuf;
@@ -597,7 +597,7 @@ void ath9k_beacon_tasklet(unsigned long data)
597 ath9k_hw_puttxbuf(ah, sc->beacon.beaconq, bfaddr); 597 ath9k_hw_puttxbuf(ah, sc->beacon.beaconq, bfaddr);
598 ath9k_hw_txstart(ah, sc->beacon.beaconq); 598 ath9k_hw_txstart(ah, sc->beacon.beaconq);
599 599
600 sc->beacon.ast_be_xmit += bc; /* XXX per-vap? */ 600 sc->beacon.ast_be_xmit += bc; /* XXX per-vif? */
601 } 601 }
602} 602}
603 603
@@ -621,12 +621,12 @@ void ath_beacon_config(struct ath_softc *sc, int if_id)
621 struct ieee80211_vif *vif; 621 struct ieee80211_vif *vif;
622 struct ath_hal *ah = sc->sc_ah; 622 struct ath_hal *ah = sc->sc_ah;
623 struct ath_beacon_config conf; 623 struct ath_beacon_config conf;
624 struct ath_vap *avp; 624 struct ath_vif *avp;
625 enum nl80211_iftype opmode; 625 enum nl80211_iftype opmode;
626 u32 nexttbtt, intval; 626 u32 nexttbtt, intval;
627 627
628 if (if_id != ATH_IF_ID_ANY) { 628 if (if_id != ATH_IF_ID_ANY) {
629 vif = sc->sc_vaps[if_id]; 629 vif = sc->vifs[if_id];
630 ASSERT(vif); 630 ASSERT(vif);
631 avp = (void *)vif->drv_priv; 631 avp = (void *)vif->drv_priv;
632 opmode = avp->av_opmode; 632 opmode = avp->av_opmode;
@@ -781,8 +781,8 @@ void ath_beacon_config(struct ath_softc *sc, int if_id)
781 781
782 ath9k_hw_set_interrupts(ah, 0); 782 ath9k_hw_set_interrupts(ah, 0);
783 ath9k_hw_set_sta_beacon_timers(ah, &bs); 783 ath9k_hw_set_sta_beacon_timers(ah, &bs);
784 sc->sc_imask |= ATH9K_INT_BMISS; 784 sc->imask |= ATH9K_INT_BMISS;
785 ath9k_hw_set_interrupts(ah, sc->sc_imask); 785 ath9k_hw_set_interrupts(ah, sc->imask);
786 } else { 786 } else {
787 u64 tsf; 787 u64 tsf;
788 u32 tsftu; 788 u32 tsftu;
@@ -819,7 +819,7 @@ void ath_beacon_config(struct ath_softc *sc, int if_id)
819 */ 819 */
820 intval |= ATH9K_BEACON_ENA; 820 intval |= ATH9K_BEACON_ENA;
821 if (!(ah->ah_caps.hw_caps & ATH9K_HW_CAP_VEOL)) 821 if (!(ah->ah_caps.hw_caps & ATH9K_HW_CAP_VEOL))
822 sc->sc_imask |= ATH9K_INT_SWBA; 822 sc->imask |= ATH9K_INT_SWBA;
823 ath_beaconq_config(sc); 823 ath_beaconq_config(sc);
824 } else if (sc->sc_ah->ah_opmode == NL80211_IFTYPE_AP) { 824 } else if (sc->sc_ah->ah_opmode == NL80211_IFTYPE_AP) {
825 /* 825 /*
@@ -827,12 +827,12 @@ void ath_beacon_config(struct ath_softc *sc, int if_id)
827 * SWBA interrupts to prepare beacon frames. 827 * SWBA interrupts to prepare beacon frames.
828 */ 828 */
829 intval |= ATH9K_BEACON_ENA; 829 intval |= ATH9K_BEACON_ENA;
830 sc->sc_imask |= ATH9K_INT_SWBA; /* beacon prepare */ 830 sc->imask |= ATH9K_INT_SWBA; /* beacon prepare */
831 ath_beaconq_config(sc); 831 ath_beaconq_config(sc);
832 } 832 }
833 ath9k_hw_beaconinit(ah, nexttbtt, intval); 833 ath9k_hw_beaconinit(ah, nexttbtt, intval);
834 sc->beacon.bmisscnt = 0; 834 sc->beacon.bmisscnt = 0;
835 ath9k_hw_set_interrupts(ah, sc->sc_imask); 835 ath9k_hw_set_interrupts(ah, sc->imask);
836 /* 836 /*
837 * When using a self-linked beacon descriptor in 837 * When using a self-linked beacon descriptor in
838 * ibss mode load it once here. 838 * ibss mode load it once here.