ath5k: Extend get_default_sifs/slot_time

* Extend get_default_sifs/slot_time to include timings for turbo
 half and quarter rate modes.

 * AR5210 code for now uses timings already on core clock units
 instead of usecs so rename them (we 'll clean it up later).

 Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>

Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Nick Kossifidis
2010-11-23 21:09:11 +02:00
committed by John W. Linville
parent 25ddfa1957
commit 3017fcab41
3 changed files with 68 additions and 24 deletions

View File

@@ -297,7 +297,8 @@ int ath5k_hw_reset_tx_queue(struct ath5k_hw *ah, unsigned int queue)
/* Set Slot time */
ath5k_hw_reg_write(ah, (ah->ah_bwmode == AR5K_BWMODE_40MHZ) ?
AR5K_INIT_SLOT_TIME_TURBO : AR5K_INIT_SLOT_TIME,
AR5K_INIT_SLOT_TIME_TURBO_CLOCK :
AR5K_INIT_SLOT_TIME_CLOCK,
AR5K_SLOT_TIME);
/* Set ACK_CTS timeout */
ath5k_hw_reg_write(ah, (ah->ah_bwmode == AR5K_BWMODE_40MHZ) ?
@@ -306,15 +307,16 @@ int ath5k_hw_reset_tx_queue(struct ath5k_hw *ah, unsigned int queue)
/* Set IFS0 */
if (ah->ah_bwmode == AR5K_BWMODE_40MHZ) {
ath5k_hw_reg_write(ah, ((AR5K_INIT_SIFS_TURBO +
tq->tqi_aifs * AR5K_INIT_SLOT_TIME_TURBO) <<
AR5K_IFS0_DIFS_S) | AR5K_INIT_SIFS_TURBO,
ath5k_hw_reg_write(ah, ((AR5K_INIT_SIFS_TURBO_CLOCK +
tq->tqi_aifs * AR5K_INIT_SLOT_TIME_TURBO_CLOCK)
<< AR5K_IFS0_DIFS_S) |
AR5K_INIT_SIFS_TURBO_CLOCK,
AR5K_IFS0);
} else {
ath5k_hw_reg_write(ah, ((AR5K_INIT_SIFS +
tq->tqi_aifs * AR5K_INIT_SLOT_TIME) <<
ath5k_hw_reg_write(ah, ((AR5K_INIT_SIFS_CLOCK +
tq->tqi_aifs * AR5K_INIT_SLOT_TIME_CLOCK) <<
AR5K_IFS0_DIFS_S) |
AR5K_INIT_SIFS, AR5K_IFS0);
AR5K_INIT_SIFS_CLOCK, AR5K_IFS0);
}
/* Set IFS1 */