diff options
author | Mahesh Palivela <maheshp@posedge.com> | 2012-07-02 11:25:12 +0000 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-07-02 15:13:09 +0200 |
commit | ba0afa2f22e1e3f332e45460f99328025d44564e (patch) | |
tree | 196fd62764006dc3b9a17ac4b1e05d60eb7c484e /net/mac80211/util.c | |
parent | b188148c690e15284d5b20d384f950506d02e3e2 (diff) | |
download | op-kernel-dev-ba0afa2f22e1e3f332e45460f99328025d44564e.zip op-kernel-dev-ba0afa2f22e1e3f332e45460f99328025d44564e.tar.gz |
mac80211: include VHT capability IE in probe requests
Insert the VHT capability IE into probe requests.
Signed-off-by: Mahesh Palivela <maheshp@posedge.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r-- | net/mac80211/util.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index c424569..cb73a03 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -1072,6 +1072,10 @@ int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer, pos += noffset - offset; } + if (sband->vht_cap.vht_supported) + pos = ieee80211_ie_build_vht_cap(pos, &sband->vht_cap, + sband->vht_cap.cap); + return pos - buffer; } @@ -1699,6 +1703,27 @@ u8 *ieee80211_ie_build_ht_cap(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap, return pos; } +u8 *ieee80211_ie_build_vht_cap(u8 *pos, struct ieee80211_sta_vht_cap *vht_cap, + u32 cap) +{ + __le32 tmp; + + *pos++ = WLAN_EID_VHT_CAPABILITY; + *pos++ = sizeof(struct ieee80211_vht_capabilities); + memset(pos, 0, sizeof(struct ieee80211_vht_capabilities)); + + /* capability flags */ + tmp = cpu_to_le32(cap); + memcpy(pos, &tmp, sizeof(u32)); + pos += sizeof(u32); + + /* VHT MCS set */ + memcpy(pos, &vht_cap->vht_mcs, sizeof(vht_cap->vht_mcs)); + pos += sizeof(vht_cap->vht_mcs); + + return pos; +} + u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap, struct ieee80211_channel *channel, enum nl80211_channel_type channel_type, |