diff options
author | Mahesh Palivela <maheshp@posedge.com> | 2012-07-02 07:25:12 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-07-02 09:13:09 -0400 |
commit | ba0afa2f22e1e3f332e45460f99328025d44564e (patch) | |
tree | 196fd62764006dc3b9a17ac4b1e05d60eb7c484e /net/mac80211/util.c | |
parent | b188148c690e15284d5b20d384f950506d02e3e2 (diff) |
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 c4245695afc3..cb73a0341af4 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, | |||
1072 | pos += noffset - offset; | 1072 | pos += noffset - offset; |
1073 | } | 1073 | } |
1074 | 1074 | ||
1075 | if (sband->vht_cap.vht_supported) | ||
1076 | pos = ieee80211_ie_build_vht_cap(pos, &sband->vht_cap, | ||
1077 | sband->vht_cap.cap); | ||
1078 | |||
1075 | return pos - buffer; | 1079 | return pos - buffer; |
1076 | } | 1080 | } |
1077 | 1081 | ||
@@ -1699,6 +1703,27 @@ u8 *ieee80211_ie_build_ht_cap(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap, | |||
1699 | return pos; | 1703 | return pos; |
1700 | } | 1704 | } |
1701 | 1705 | ||
1706 | u8 *ieee80211_ie_build_vht_cap(u8 *pos, struct ieee80211_sta_vht_cap *vht_cap, | ||
1707 | u32 cap) | ||
1708 | { | ||
1709 | __le32 tmp; | ||
1710 | |||
1711 | *pos++ = WLAN_EID_VHT_CAPABILITY; | ||
1712 | *pos++ = sizeof(struct ieee80211_vht_capabilities); | ||
1713 | memset(pos, 0, sizeof(struct ieee80211_vht_capabilities)); | ||
1714 | |||
1715 | /* capability flags */ | ||
1716 | tmp = cpu_to_le32(cap); | ||
1717 | memcpy(pos, &tmp, sizeof(u32)); | ||
1718 | pos += sizeof(u32); | ||
1719 | |||
1720 | /* VHT MCS set */ | ||
1721 | memcpy(pos, &vht_cap->vht_mcs, sizeof(vht_cap->vht_mcs)); | ||
1722 | pos += sizeof(vht_cap->vht_mcs); | ||
1723 | |||
1724 | return pos; | ||
1725 | } | ||
1726 | |||
1702 | u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap, | 1727 | u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap, |
1703 | struct ieee80211_channel *channel, | 1728 | struct ieee80211_channel *channel, |
1704 | enum nl80211_channel_type channel_type, | 1729 | enum nl80211_channel_type channel_type, |