Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F103198580
add vht conf flags
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
adrian
Nov 22 2024, 4:09 AM
2024-11-22 04:09:34 (UTC+0)
Size
2 KB
Referenced Files
None
Subscribers
None
add vht conf flags
View Options
diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h
index 53139a3852b8..a1c4f17208ab 100644
--- a/sys/net80211/ieee80211_var.h
+++ b/sys/net80211/ieee80211_var.h
@@ -244,10 +244,11 @@ struct ieee80211com {
uint8_t ic_txstream; /* # TX streams */
/* VHT information */
- uint32_t ic_vht_flags; /* VHT state flags */
+ uint32_t ic_vht_flags; /* VHT state flags (IEEE80211_FVHT) */
struct ieee80211_vht_cap ic_vht_cap; /* VHT capabilities + MCS info */
uint32_t ic_vhtextcaps; /* VHT extended capabilities (TODO) */
- uint32_t ic_vht_spare[3];
+ uint32_t ic_vht_conf; /* VHT config (IEEE80211_FVHT) */
+ uint32_t ic_vht_spare[2];
/* optional state for Atheros SuperG protocol extensions */
struct ieee80211_superg *ic_superg;
diff --git a/sys/net80211/ieee80211_vht.c b/sys/net80211/ieee80211_vht.c
index 0839f426e09c..9c54939db32f 100644
--- a/sys/net80211/ieee80211_vht.c
+++ b/sys/net80211/ieee80211_vht.c
@@ -143,11 +143,25 @@ ieee80211_vht_vattach(struct ieee80211vap *vap)
vap->iv_vht_cap.vht_cap_info = ic->ic_vht_cap.vht_cap_info;
vap->iv_vhtextcaps = ic->ic_vhtextcaps;
- /* XXX assume VHT80 support; should really check vhtcaps */
- vap->iv_vht_flags =
- IEEE80211_FVHT_VHT
- | IEEE80211_FVHT_USEVHT40
- | IEEE80211_FVHT_USEVHT80;
+ vap->iv_vht_flags = IEEE80211_FVHT_VHT;
+
+ /*
+ * This isn't in vht_cap_info, it's actually in the channel config.
+ * So instead check the config.
+ */
+ if (ic->ic_vht_conf & IEEE80211_FVHT_USEVHT40)
+ vap->iv_vht_flags |= IEEE80211_FVHT_USEVHT40;
+ if (ic->ic_vht_conf & IEEE80211_FVHT_USEVHT80)
+ vap->iv_vht_flags |= IEEE80211_FVHT_USEVHT80;
+
+ /*
+ * These are in vht_cap_info, so just use them.
+ *
+ * It may be better to only enable VHT80 if 40 is enabled,
+ * and 160 / 80+80 if 40 is enabled. It's also likely better
+ * to put the FVHT into the config space and do a sanity check
+ * here.
+ */
if (IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160MHZ(vap->iv_vht_cap.vht_cap_info))
vap->iv_vht_flags |= IEEE80211_FVHT_USEVHT160;
if (IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160_80P80MHZ(vap->iv_vht_cap.vht_cap_info))
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14789436
Default Alt Text
add vht conf flags (2 KB)
Attached To
Mode
P652 add vht conf flags
Attached
Detach File
Event Timeline
Log In to Comment