diff options
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, | |||
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. |