diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2012-07-17 07:46:09 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-07-17 15:11:39 -0400 |
commit | 7e52c8aa35c987236a80b7063c418a3d29b51052 (patch) | |
tree | ff741c00befa89883e12c5418b01243df5dd135a /drivers/net/wireless/ath/ath9k/beacon.c | |
parent | aa45fe9683ba861bf49d51479b11b3d482b57416 (diff) |
ath9k: Cleanup beacon queue configuration
Setup the beacon queue parameters after disabling
interrupts. Also, remove the redundant call in conf_tx()
for IBSS mode since the queue would be configured
with the appropriate cwmin/cwmax values when beaconing
is enabled.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/beacon.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/beacon.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c index 2962b3e928d8..02fbd3eebc2b 100644 --- a/drivers/net/wireless/ath/ath9k/beacon.c +++ b/drivers/net/wireless/ath/ath9k/beacon.c | |||
@@ -30,7 +30,7 @@ static void ath9k_reset_beacon_status(struct ath_softc *sc) | |||
30 | * the operating mode of the station (AP or AdHoc). Parameters are AIFS | 30 | * the operating mode of the station (AP or AdHoc). Parameters are AIFS |
31 | * settings and channel width min/max | 31 | * settings and channel width min/max |
32 | */ | 32 | */ |
33 | int ath_beaconq_config(struct ath_softc *sc) | 33 | static void ath9k_beaconq_config(struct ath_softc *sc) |
34 | { | 34 | { |
35 | struct ath_hw *ah = sc->sc_ah; | 35 | struct ath_hw *ah = sc->sc_ah; |
36 | struct ath_common *common = ath9k_hw_common(ah); | 36 | struct ath_common *common = ath9k_hw_common(ah); |
@@ -38,6 +38,7 @@ int ath_beaconq_config(struct ath_softc *sc) | |||
38 | struct ath_txq *txq; | 38 | struct ath_txq *txq; |
39 | 39 | ||
40 | ath9k_hw_get_txq_props(ah, sc->beacon.beaconq, &qi); | 40 | ath9k_hw_get_txq_props(ah, sc->beacon.beaconq, &qi); |
41 | |||
41 | if (sc->sc_ah->opmode == NL80211_IFTYPE_AP) { | 42 | if (sc->sc_ah->opmode == NL80211_IFTYPE_AP) { |
42 | /* Always burst out beacon and CAB traffic. */ | 43 | /* Always burst out beacon and CAB traffic. */ |
43 | qi.tqi_aifs = 1; | 44 | qi.tqi_aifs = 1; |
@@ -56,12 +57,9 @@ int ath_beaconq_config(struct ath_softc *sc) | |||
56 | } | 57 | } |
57 | 58 | ||
58 | if (!ath9k_hw_set_txq_props(ah, sc->beacon.beaconq, &qi)) { | 59 | if (!ath9k_hw_set_txq_props(ah, sc->beacon.beaconq, &qi)) { |
59 | ath_err(common, | 60 | ath_err(common, "Unable to update h/w beacon queue parameters\n"); |
60 | "Unable to update h/w beacon queue parameters\n"); | ||
61 | return 0; | ||
62 | } else { | 61 | } else { |
63 | ath9k_hw_resettxqueue(ah, sc->beacon.beaconq); | 62 | ath9k_hw_resettxqueue(ah, sc->beacon.beaconq); |
64 | return 1; | ||
65 | } | 63 | } |
66 | } | 64 | } |
67 | 65 | ||
@@ -401,6 +399,7 @@ static void ath9k_beacon_init(struct ath_softc *sc, u32 nexttbtt, u32 intval) | |||
401 | 399 | ||
402 | ath9k_hw_disable_interrupts(ah); | 400 | ath9k_hw_disable_interrupts(ah); |
403 | ath9k_hw_reset_tsf(ah); | 401 | ath9k_hw_reset_tsf(ah); |
402 | ath9k_beaconq_config(sc); | ||
404 | ath9k_hw_beaconinit(ah, nexttbtt, intval); | 403 | ath9k_hw_beaconinit(ah, nexttbtt, intval); |
405 | sc->beacon.bmisscnt = 0; | 404 | sc->beacon.bmisscnt = 0; |
406 | ath9k_hw_set_interrupts(ah); | 405 | ath9k_hw_set_interrupts(ah); |
@@ -432,7 +431,6 @@ static void ath9k_beacon_config_ap(struct ath_softc *sc, | |||
432 | ath_dbg(common, BEACON, "AP nexttbtt: %u intval: %u conf_intval: %u\n", | 431 | ath_dbg(common, BEACON, "AP nexttbtt: %u intval: %u conf_intval: %u\n", |
433 | nexttbtt, intval, conf->beacon_interval); | 432 | nexttbtt, intval, conf->beacon_interval); |
434 | 433 | ||
435 | ath_beaconq_config(sc); | ||
436 | ath9k_beacon_init(sc, nexttbtt, intval); | 434 | ath9k_beacon_init(sc, nexttbtt, intval); |
437 | } | 435 | } |
438 | 436 | ||
@@ -584,7 +582,6 @@ static void ath9k_beacon_config_adhoc(struct ath_softc *sc, | |||
584 | ath_dbg(common, BEACON, "IBSS nexttbtt: %u intval: %u conf_intval: %u\n", | 582 | ath_dbg(common, BEACON, "IBSS nexttbtt: %u intval: %u conf_intval: %u\n", |
585 | nexttbtt, intval, conf->beacon_interval); | 583 | nexttbtt, intval, conf->beacon_interval); |
586 | 584 | ||
587 | ath_beaconq_config(sc); | ||
588 | ath9k_beacon_init(sc, nexttbtt, intval); | 585 | ath9k_beacon_init(sc, nexttbtt, intval); |
589 | } | 586 | } |
590 | 587 | ||