summaryrefslogtreecommitdiffstats
path: root/sys/dev/ath/if_ath_tx_ht.c
diff options
context:
space:
mode:
authorgrehan <grehan@FreeBSD.org>2011-06-28 06:26:03 +0000
committergrehan <grehan@FreeBSD.org>2011-06-28 06:26:03 +0000
commit2c6741be0f59191f2283eb268e4f7690399d578a (patch)
treeb139c8c6dcca4fa284815daade405b75886ee360 /sys/dev/ath/if_ath_tx_ht.c
parent3c35264f695e0a1f8a04dbcca1c93bb5159b2274 (diff)
parent19ae02bba572390c7299166228d31e54003e094a (diff)
downloadFreeBSD-src-2c6741be0f59191f2283eb268e4f7690399d578a.zip
FreeBSD-src-2c6741be0f59191f2283eb268e4f7690399d578a.tar.gz
IFC @ r222830
Diffstat (limited to 'sys/dev/ath/if_ath_tx_ht.c')
-rw-r--r--sys/dev/ath/if_ath_tx_ht.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/sys/dev/ath/if_ath_tx_ht.c b/sys/dev/ath/if_ath_tx_ht.c
index f4ade31..348a1499 100644
--- a/sys/dev/ath/if_ath_tx_ht.c
+++ b/sys/dev/ath/if_ath_tx_ht.c
@@ -136,15 +136,23 @@ ath_rateseries_setup(struct ath_softc *sc, struct ieee80211_node *ni,
*/
if (ni->ni_chw == 40)
series[i].RateFlags |= HAL_RATESERIES_2040;
-#if 0
+
/*
- * The hardware only supports short-gi in 40mhz mode -
- * if later hardware supports it in 20mhz mode, be sure
- * to add the relevant check here.
+ * Set short-GI only if the node has advertised it
+ * the channel width is suitable, and we support it.
+ * We don't currently have a "negotiated" set of bits -
+ * ni_htcap is what the remote end sends, not what this
+ * node is capable of.
*/
- if (ni->ni_htcap & IEEE80211_HTCAP_SHORTGI40)
+ if (ni->ni_chw == 40 &&
+ ic->ic_htcaps & IEEE80211_HTCAP_SHORTGI40 &&
+ ni->ni_htcap & IEEE80211_HTCAP_SHORTGI40)
+ series[i].RateFlags |= HAL_RATESERIES_HALFGI;
+
+ if (ni->ni_chw == 20 &&
+ ic->ic_htcaps & IEEE80211_HTCAP_SHORTGI20 &&
+ ni->ni_htcap & IEEE80211_HTCAP_SHORTGI20)
series[i].RateFlags |= HAL_RATESERIES_HALFGI;
-#endif
series[i].Rate = rt->info[rix[i]].rateCode;
OpenPOWER on IntegriCloud