aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/util.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-03-31 06:12:07 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-04-22 16:54:39 -0400
commit5ef2d41afb7fce2315d12a8aaebe0c9f1b50755b (patch)
tree00fb4ac6a019b42c5be143793a3b34253f43eea9 /net/mac80211/util.c
parentde95a54b1aebe5592cae971ca5e5d9ec6a381a17 (diff)
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.c16
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,
861 *pos++ = rate->bitrate / 5; 861 *pos++ = rate->bitrate / 5;
862 } 862 }
863 863
864 if (sband->ht_cap.ht_supported) {
865 __le16 tmp = cpu_to_le16(sband->ht_cap.cap);
866
867 *pos++ = WLAN_EID_HT_CAPABILITY;
868 *pos++ = sizeof(struct ieee80211_ht_cap);
869 memset(pos, 0, sizeof(struct ieee80211_ht_cap));
870 memcpy(pos, &tmp, sizeof(u16));
871 pos += sizeof(u16);
872 /* TODO: needs a define here for << 2 */
873 *pos++ = sband->ht_cap.ampdu_factor |
874 (sband->ht_cap.ampdu_density << 2);
875 memcpy(pos, &sband->ht_cap.mcs, sizeof(sband->ht_cap.mcs));
876 pos += sizeof(sband->ht_cap.mcs);
877 pos += 2 + 4 + 1; /* ext info, BF cap, antsel */
878 }
879
864 /* 880 /*
865 * If adding more here, adjust code in main.c 881 * If adding more here, adjust code in main.c
866 * that calculates local->scan_ies_len. 882 * that calculates local->scan_ies_len.