From 74a54be9a43af7469a005e893a656774dc3c85dd Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Tue, 22 Nov 2016 02:51:06 +0000 Subject: [PATCH] [net80211] store references to VHT and related IEs. This just stores pointers to the IE; it doesn't yet parse anything. Note: it blows out the size of ieee80211_node, so this will require ye olde kernel/modules recompile. --- sys/net80211/ieee80211_node.c | 19 +++++++++++++++++++ sys/net80211/ieee80211_node.h | 5 +++++ 2 files changed, 24 insertions(+) diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index 2d1c03f806f..c08051f6827 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -896,6 +896,10 @@ ieee80211_sta_join(struct ieee80211vap *vap, struct ieee80211_channel *chan, if (ni->ni_ies.tdma_ie != NULL) ieee80211_parse_tdma(ni, ni->ni_ies.tdma_ie); #endif + + /* XXX parse VHT IEs */ + /* XXX parse BSSLOAD IE */ + /* XXX parse APCHANREP IE */ } vap->iv_dtim_period = se->se_dtimperiod; @@ -1055,6 +1059,21 @@ ieee80211_ies_expand(struct ieee80211_ies *ies) ies->meshid_ie = ie; break; #endif + case IEEE80211_ELEMID_VHT_CAP: + ies->vhtcap_ie = ie; + break; + case IEEE80211_ELEMID_VHT_OPMODE: + ies->vhtopmode_ie = ie; + break; + case IEEE80211_ELEMID_VHT_PWR_ENV: + ies->vhtpwrenv_ie = ie; + break; + case IEEE80211_ELEMID_BSSLOAD: + ies->bssload_ie = ie; + break; + case IEEE80211_ELEMID_APCHANREP: + ies->apchanrep_ie = ie; + break; } ielen -= 2 + ie[1]; ie += 2 + ie[1]; diff --git a/sys/net80211/ieee80211_node.h b/sys/net80211/ieee80211_node.h index 7bbf9761c97..699247d658e 100644 --- a/sys/net80211/ieee80211_node.h +++ b/sys/net80211/ieee80211_node.h @@ -83,6 +83,11 @@ struct ieee80211_ies { uint8_t *htinfo_ie; /* captured HTINFO ie */ uint8_t *tdma_ie; /* captured TDMA ie */ uint8_t *meshid_ie; /* captured MESH ID ie */ + uint8_t *vhtcap_ie; /* captured VHTCAP ie */ + uint8_t *vhtopmode_ie; /* captured VHTOPMODE ie */ + uint8_t *vhtpwrenv_ie; /* captured VHTPWRENV ie */ + uint8_t *apchanrep_ie; /* captured APCHANREP ie */ + uint8_t *bssload_ie; /* captured BSSLOAD ie */ uint8_t *spare[4]; /* NB: these must be the last members of this structure */ uint8_t *data; /* frame data > 802.11 header */