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 | |
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>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ath9k.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/beacon.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/xmit.c | 10 |
4 files changed, 4 insertions, 22 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index f74640cbdbf6..00a22683981a 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h | |||
@@ -421,7 +421,6 @@ void ath9k_beacon_config(struct ath_softc *sc, struct ieee80211_vif *vif, | |||
421 | u32 changed); | 421 | u32 changed); |
422 | void ath9k_beacon_assign_slot(struct ath_softc *sc, struct ieee80211_vif *vif); | 422 | void ath9k_beacon_assign_slot(struct ath_softc *sc, struct ieee80211_vif *vif); |
423 | void ath9k_beacon_remove_slot(struct ath_softc *sc, struct ieee80211_vif *vif); | 423 | void ath9k_beacon_remove_slot(struct ath_softc *sc, struct ieee80211_vif *vif); |
424 | int ath_beaconq_config(struct ath_softc *sc); | ||
425 | void ath9k_set_beacon(struct ath_softc *sc); | 424 | void ath9k_set_beacon(struct ath_softc *sc); |
426 | void ath9k_set_beaconing_status(struct ath_softc *sc, bool status); | 425 | void ath9k_set_beaconing_status(struct ath_softc *sc, bool status); |
427 | 426 | ||
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 | ||
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index fa97facf7795..d8ae0f5e3da7 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -1359,10 +1359,6 @@ static int ath9k_conf_tx(struct ieee80211_hw *hw, | |||
1359 | if (ret) | 1359 | if (ret) |
1360 | ath_err(common, "TXQ Update failed\n"); | 1360 | ath_err(common, "TXQ Update failed\n"); |
1361 | 1361 | ||
1362 | if (sc->sc_ah->opmode == NL80211_IFTYPE_ADHOC) | ||
1363 | if (queue == WME_AC_BE && !ret) | ||
1364 | ath_beaconq_config(sc); | ||
1365 | |||
1366 | mutex_unlock(&sc->mutex); | 1362 | mutex_unlock(&sc->mutex); |
1367 | ath9k_ps_restore(sc); | 1363 | ath9k_ps_restore(sc); |
1368 | 1364 | ||
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index 0a735bd15981..310c95e33cb1 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c | |||
@@ -1416,16 +1416,6 @@ int ath_txq_update(struct ath_softc *sc, int qnum, | |||
1416 | int error = 0; | 1416 | int error = 0; |
1417 | struct ath9k_tx_queue_info qi; | 1417 | struct ath9k_tx_queue_info qi; |
1418 | 1418 | ||
1419 | if (qnum == sc->beacon.beaconq) { | ||
1420 | /* | ||
1421 | * XXX: for beacon queue, we just save the parameter. | ||
1422 | * It will be picked up by ath_beaconq_config when | ||
1423 | * it's necessary. | ||
1424 | */ | ||
1425 | sc->beacon.beacon_qi = *qinfo; | ||
1426 | return 0; | ||
1427 | } | ||
1428 | |||
1429 | BUG_ON(sc->tx.txq[qnum].axq_qnum != qnum); | 1419 | BUG_ON(sc->tx.txq[qnum].axq_qnum != qnum); |
1430 | 1420 | ||
1431 | ath9k_hw_get_txq_props(ah, qnum, &qi); | 1421 | ath9k_hw_get_txq_props(ah, qnum, &qi); |