From 1198947acd01b730ae9ef83debba98e3da391e6f Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Tue, 22 Mar 2011 13:39:00 +0000 Subject: [PATCH] Clean up setting the short preamble bit in the rate - this way it is very obvious (and cleanly so) that it occurs for non-11n rates. --- sys/dev/ath/if_ath_tx_ht.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/dev/ath/if_ath_tx_ht.c b/sys/dev/ath/if_ath_tx_ht.c index 06642b1d02e..10e647f0bce 100644 --- a/sys/dev/ath/if_ath_tx_ht.c +++ b/sys/dev/ath/if_ath_tx_ht.c @@ -143,9 +143,6 @@ ath_rateseries_setup(struct ath_softc *sc, struct ieee80211_node *ni, #endif series[i].Rate = rt->info[rix[i]].rateCode; - /* the short preamble field is only applicable for non-MCS rates */ - if (shortPreamble && ! (series[i].Rate & IEEE80211_RATE_MCS)) - series[i].Rate |= rt->info[rix[i]].shortPreamble; /* PktDuration doesn't include slot, ACK, RTS, etc timing - it's just the packet duration */ if (series[i].Rate & IEEE80211_RATE_MCS) { @@ -156,6 +153,8 @@ ath_rateseries_setup(struct ath_softc *sc, struct ieee80211_node *ni, , series[i].RateFlags & HAL_RATESERIES_2040 , series[i].RateFlags & HAL_RATESERIES_HALFGI); } else { + if (shortPreamble) + series[i].Rate |= rt->info[rix[i]].shortPreamble; series[i].PktDuration = ath_hal_computetxtime(ah, rt, pktlen, rix[i], shortPreamble); }