diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-03-31 12:12:07 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-04-22 16:54:39 -0400 |
commit | 5ef2d41afb7fce2315d12a8aaebe0c9f1b50755b (patch) | |
tree | 00fb4ac6a019b42c5be143793a3b34253f43eea9 /net/mac80211/util.c | |
parent | de95a54b1aebe5592cae971ca5e5d9ec6a381a17 (diff) | |
download | lwn-5ef2d41afb7fce2315d12a8aaebe0c9f1b50755b.tar.gz lwn-5ef2d41afb7fce2315d12a8aaebe0c9f1b50755b.zip |
mac80211: include HT capabilities in probe request
Include the HT capabilities in the probe request frame.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r-- | net/mac80211/util.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 72b091317a7c..1ff83532120f 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -861,6 +861,22 @@ int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer, *pos++ = rate->bitrate / 5; } + if (sband->ht_cap.ht_supported) { + __le16 tmp = cpu_to_le16(sband->ht_cap.cap); + + *pos++ = WLAN_EID_HT_CAPABILITY; + *pos++ = sizeof(struct ieee80211_ht_cap); + memset(pos, 0, sizeof(struct ieee80211_ht_cap)); + memcpy(pos, &tmp, sizeof(u16)); + pos += sizeof(u16); + /* TODO: needs a define here for << 2 */ + *pos++ = sband->ht_cap.ampdu_factor | + (sband->ht_cap.ampdu_density << 2); + memcpy(pos, &sband->ht_cap.mcs, sizeof(sband->ht_cap.mcs)); + pos += sizeof(sband->ht_cap.mcs); + pos += 2 + 4 + 1; /* ext info, BF cap, antsel */ + } + /* * If adding more here, adjust code in main.c * that calculates local->scan_ies_len. |