diff options
author | Sujith <Sujith.Manoharan@atheros.com> | 2008-08-07 01:23:10 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-08-07 09:49:43 -0400 |
commit | ea9880fb059e0e95d651eab6029f58e7c81b8602 (patch) | |
tree | ad170c08ef7cd13e638c26fc45e59d38aca46cf9 /drivers/net/wireless/ath9k/xmit.c | |
parent | 60b67f519213cf6d59236d065b0953962b56abca (diff) |
ath9k: Remove redundant data structure ath9k_txq_info
Use ath9k_tx_queue_info which contains the same elements,
and merge get/set functions of tx queue properties.
Also, fix whitespace damage in struct ath_softc.
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/xmit.c')
-rw-r--r-- | drivers/net/wireless/ath9k/xmit.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/drivers/net/wireless/ath9k/xmit.c b/drivers/net/wireless/ath9k/xmit.c index 92bb3c22e7c..debd7f46d44 100644 --- a/drivers/net/wireless/ath9k/xmit.c +++ b/drivers/net/wireless/ath9k/xmit.c | |||
@@ -2209,7 +2209,7 @@ int ath_tx_cleanup(struct ath_softc *sc) | |||
2209 | struct ath_txq *ath_txq_setup(struct ath_softc *sc, int qtype, int subtype) | 2209 | struct ath_txq *ath_txq_setup(struct ath_softc *sc, int qtype, int subtype) |
2210 | { | 2210 | { |
2211 | struct ath_hal *ah = sc->sc_ah; | 2211 | struct ath_hal *ah = sc->sc_ah; |
2212 | struct ath9k_txq_info qi; | 2212 | struct ath9k_tx_queue_info qi; |
2213 | int qnum; | 2213 | int qnum; |
2214 | 2214 | ||
2215 | memzero(&qi, sizeof(qi)); | 2215 | memzero(&qi, sizeof(qi)); |
@@ -2217,7 +2217,7 @@ struct ath_txq *ath_txq_setup(struct ath_softc *sc, int qtype, int subtype) | |||
2217 | qi.tqi_aifs = ATH9K_TXQ_USEDEFAULT; | 2217 | qi.tqi_aifs = ATH9K_TXQ_USEDEFAULT; |
2218 | qi.tqi_cwmin = ATH9K_TXQ_USEDEFAULT; | 2218 | qi.tqi_cwmin = ATH9K_TXQ_USEDEFAULT; |
2219 | qi.tqi_cwmax = ATH9K_TXQ_USEDEFAULT; | 2219 | qi.tqi_cwmax = ATH9K_TXQ_USEDEFAULT; |
2220 | qi.tqi_compBuf = 0; | 2220 | qi.tqi_physCompBuf = 0; |
2221 | 2221 | ||
2222 | /* | 2222 | /* |
2223 | * Enable interrupts only for EOL and DESC conditions. | 2223 | * Enable interrupts only for EOL and DESC conditions. |
@@ -2337,11 +2337,12 @@ int ath_tx_get_qnum(struct ath_softc *sc, int qtype, int haltype) | |||
2337 | 2337 | ||
2338 | /* Update parameters for a transmit queue */ | 2338 | /* Update parameters for a transmit queue */ |
2339 | 2339 | ||
2340 | int ath_txq_update(struct ath_softc *sc, int qnum, struct ath9k_txq_info *qi0) | 2340 | int ath_txq_update(struct ath_softc *sc, int qnum, |
2341 | struct ath9k_tx_queue_info *qinfo) | ||
2341 | { | 2342 | { |
2342 | struct ath_hal *ah = sc->sc_ah; | 2343 | struct ath_hal *ah = sc->sc_ah; |
2343 | int error = 0; | 2344 | int error = 0; |
2344 | struct ath9k_txq_info qi; | 2345 | struct ath9k_tx_queue_info qi; |
2345 | 2346 | ||
2346 | if (qnum == sc->sc_bhalq) { | 2347 | if (qnum == sc->sc_bhalq) { |
2347 | /* | 2348 | /* |
@@ -2349,20 +2350,20 @@ int ath_txq_update(struct ath_softc *sc, int qnum, struct ath9k_txq_info *qi0) | |||
2349 | * It will be picked up by ath_beaconq_config when | 2350 | * It will be picked up by ath_beaconq_config when |
2350 | * it's necessary. | 2351 | * it's necessary. |
2351 | */ | 2352 | */ |
2352 | sc->sc_beacon_qi = *qi0; | 2353 | sc->sc_beacon_qi = *qinfo; |
2353 | return 0; | 2354 | return 0; |
2354 | } | 2355 | } |
2355 | 2356 | ||
2356 | ASSERT(sc->sc_txq[qnum].axq_qnum == qnum); | 2357 | ASSERT(sc->sc_txq[qnum].axq_qnum == qnum); |
2357 | 2358 | ||
2358 | ath9k_hw_gettxqueueprops(ah, qnum, &qi); | 2359 | ath9k_hw_get_txq_props(ah, qnum, &qi); |
2359 | qi.tqi_aifs = qi0->tqi_aifs; | 2360 | qi.tqi_aifs = qinfo->tqi_aifs; |
2360 | qi.tqi_cwmin = qi0->tqi_cwmin; | 2361 | qi.tqi_cwmin = qinfo->tqi_cwmin; |
2361 | qi.tqi_cwmax = qi0->tqi_cwmax; | 2362 | qi.tqi_cwmax = qinfo->tqi_cwmax; |
2362 | qi.tqi_burstTime = qi0->tqi_burstTime; | 2363 | qi.tqi_burstTime = qinfo->tqi_burstTime; |
2363 | qi.tqi_readyTime = qi0->tqi_readyTime; | 2364 | qi.tqi_readyTime = qinfo->tqi_readyTime; |
2364 | 2365 | ||
2365 | if (!ath9k_hw_settxqueueprops(ah, qnum, &qi)) { | 2366 | if (!ath9k_hw_set_txq_props(ah, qnum, &qi)) { |
2366 | DPRINTF(sc, ATH_DBG_FATAL, | 2367 | DPRINTF(sc, ATH_DBG_FATAL, |
2367 | "%s: unable to update hardware queue %u!\n", | 2368 | "%s: unable to update hardware queue %u!\n", |
2368 | __func__, qnum); | 2369 | __func__, qnum); |
@@ -2376,11 +2377,11 @@ int ath_txq_update(struct ath_softc *sc, int qnum, struct ath9k_txq_info *qi0) | |||
2376 | 2377 | ||
2377 | int ath_cabq_update(struct ath_softc *sc) | 2378 | int ath_cabq_update(struct ath_softc *sc) |
2378 | { | 2379 | { |
2379 | struct ath9k_txq_info qi; | 2380 | struct ath9k_tx_queue_info qi; |
2380 | int qnum = sc->sc_cabq->axq_qnum; | 2381 | int qnum = sc->sc_cabq->axq_qnum; |
2381 | struct ath_beacon_config conf; | 2382 | struct ath_beacon_config conf; |
2382 | 2383 | ||
2383 | ath9k_hw_gettxqueueprops(sc->sc_ah, qnum, &qi); | 2384 | ath9k_hw_get_txq_props(sc->sc_ah, qnum, &qi); |
2384 | /* | 2385 | /* |
2385 | * Ensure the readytime % is within the bounds. | 2386 | * Ensure the readytime % is within the bounds. |
2386 | */ | 2387 | */ |