svn commit: r298604 - head/sys/net80211
Adrian Chadd
adrian at FreeBSD.org
Tue Apr 26 01:29:04 UTC 2016
Author: adrian
Date: Tue Apr 26 01:29:03 2016
New Revision: 298604
URL: https://svnweb.freebsd.org/changeset/base/298604
Log:
[net80211] add STBC capability flags to iv_flags_ht.
This is in preparation for exposing configuring STBC flags up to ifconfig
so STBC TX/RX can be configured at runtime.
* Set the FHT_STBC flags for TX/RX if the HT capabilitiex exist
* Clear the RX STBC HT capability flag when creating a HTCAP IE, so
we only announce it if it's configured in the FHT flags.
Tested:
* AR9331 (carambola2), AP/STA modes
Modified:
head/sys/net80211/ieee80211_ht.c
Modified: head/sys/net80211/ieee80211_ht.c
==============================================================================
--- head/sys/net80211/ieee80211_ht.c Tue Apr 26 01:26:11 2016 (r298603)
+++ head/sys/net80211/ieee80211_ht.c Tue Apr 26 01:29:03 2016 (r298604)
@@ -293,6 +293,11 @@ ieee80211_ht_vattach(struct ieee80211vap
vap->iv_flags_ht |= IEEE80211_FHT_AMSDU_RX;
if (vap->iv_htcaps & IEEE80211_HTC_AMSDU)
vap->iv_flags_ht |= IEEE80211_FHT_AMSDU_TX;
+
+ if (vap->iv_htcaps & IEEE80211_HTCAP_TXSTBC)
+ vap->iv_flags_ht |= IEEE80211_FHT_STBC_TX;
+ if (vap->iv_htcaps & IEEE80211_HTCAP_RXSTBC)
+ vap->iv_flags_ht |= IEEE80211_FHT_STBC_RX;
}
/* NB: disable default legacy WDS, too many issues right now */
if (vap->iv_flags_ext & IEEE80211_FEXT_WDSLEGACY)
@@ -2778,6 +2783,13 @@ ieee80211_add_htcap_body(uint8_t *frm, s
if ((vap->iv_flags_ht & IEEE80211_FHT_SHORTGI40) == 0 ||
(caps & IEEE80211_HTCAP_CHWIDTH40) == 0)
caps &= ~IEEE80211_HTCAP_SHORTGI40;
+
+ /* adjust STBC based on receive capabilities */
+ if ((vap->iv_flags_ht & IEEE80211_FHT_STBC_RX) == 0)
+ caps &= ~IEEE80211_HTCAP_RXSTBC;
+
+ /* XXX TODO: adjust LDPC based on receive capabilities */
+
ADDSHORT(frm, caps);
/* HT parameters */
More information about the svn-src-all
mailing list