The current code used the fields in ath_set11nratescenario() . Use them

correctly:

* pass in whether to allow the hardware to override the duration field
  in the main data frame (durupdate_en) - PS_POLL frames in particular
  don't have the duration bit overriden;
* there's no rts/cts duration here; that's done elsehwere
This commit is contained in:
Adrian Chadd 2011-02-12 02:14:19 +00:00
parent 6edf6104a9
commit bf26df3693
3 changed files with 7 additions and 6 deletions

View File

@ -812,7 +812,7 @@ ath_tx_start(struct ath_softc *sc, struct ieee80211_node *ni, struct ath_buf *bf
}
if (ath_tx_is_11n(sc)) {
ath_buf_set_rate(sc, ni, bf, pktlen, flags, ctsrate, rate, try);
ath_buf_set_rate(sc, ni, bf, pktlen, flags, ctsrate, (atype == HAL_PKT_TYPE_PSPOLL), rate, try);
}
ath_tx_handoff(sc, txq, bf);
@ -998,7 +998,7 @@ ath_tx_raw_start(struct ath_softc *sc, struct ieee80211_node *ni,
* notice that rix doesn't include any of the "magic" flags txrate
* does for communicating "other stuff" to the HAL.
*/
ath_buf_set_rate(sc, ni, bf, pktlen, flags, ctsrate, rate, try);
ath_buf_set_rate(sc, ni, bf, pktlen, flags, ctsrate, (atype == HAL_PKT_TYPE_PSPOLL), rate, try);
}
/* NB: no buffered multicast in power save support */

View File

@ -168,7 +168,7 @@ ath_rateseries_print(HAL_11N_RATE_SERIES *series)
void
ath_buf_set_rate(struct ath_softc *sc, struct ieee80211_node *ni, struct ath_buf *bf,
int pktlen, int flags, uint8_t ctsrate, uint8_t *rix, uint8_t *try)
int pktlen, int flags, uint8_t ctsrate, int is_pspoll, uint8_t *rix, uint8_t *try)
{
HAL_11N_RATE_SERIES series[4];
struct ath_desc *ds = bf->bf_desc;
@ -189,8 +189,9 @@ ath_buf_set_rate(struct ath_softc *sc, struct ieee80211_node *ni, struct ath_buf
/* Set rate scenario */
ath_hal_set11nratescenario(ah, ds,
!is_pspoll, /* whether to override the duration or not */
/* don't allow hardware to override the duration on ps-poll packets */
ctsrate, /* rts/cts rate */
0, /* rts/cts duration */
series, /* 11n rate series */
4, /* number of series */
flags);

View File

@ -33,7 +33,7 @@
extern void ath_buf_set_rate(struct ath_softc *sc,
struct ieee80211_node *ni, struct ath_buf *bf,
int pktlen, int flags, uint8_t ctsrate, uint8_t *rix,
uint8_t *try);
int pktlen, int flags, uint8_t ctsrate, int is_pspoll,
uint8_t *rix, uint8_t *try);
#endif