Date: Tue, 26 Apr 2016 01:29:03 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298604 - head/sys/net80211 Message-ID: <201604260129.u3Q1T31A088228@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604260129.u3Q1T31A088228>