aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/nl80211.h12
-rw-r--r--net/wireless/nl80211.c13
2 files changed, 25 insertions, 0 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 9bad65400fba..41720d47d618 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -452,17 +452,29 @@ enum nl80211_mpath_info {
452 * an array of nested frequency attributes 452 * an array of nested frequency attributes
453 * @NL80211_BAND_ATTR_RATES: supported bitrates in this band, 453 * @NL80211_BAND_ATTR_RATES: supported bitrates in this band,
454 * an array of nested bitrate attributes 454 * an array of nested bitrate attributes
455 * @NL80211_BAND_ATTR_HT_MCS_SET: 16-byte attribute containing the MCS set as
456 * defined in 802.11n
457 * @NL80211_BAND_ATTR_HT_CAPA: HT capabilities, as in the HT information IE
458 * @NL80211_BAND_ATTR_HT_AMPDU_FACTOR: A-MPDU factor, as in 11n
459 * @NL80211_BAND_ATTR_HT_AMPDU_DENSITY: A-MPDU density, as in 11n
455 */ 460 */
456enum nl80211_band_attr { 461enum nl80211_band_attr {
457 __NL80211_BAND_ATTR_INVALID, 462 __NL80211_BAND_ATTR_INVALID,
458 NL80211_BAND_ATTR_FREQS, 463 NL80211_BAND_ATTR_FREQS,
459 NL80211_BAND_ATTR_RATES, 464 NL80211_BAND_ATTR_RATES,
460 465
466 NL80211_BAND_ATTR_HT_MCS_SET,
467 NL80211_BAND_ATTR_HT_CAPA,
468 NL80211_BAND_ATTR_HT_AMPDU_FACTOR,
469 NL80211_BAND_ATTR_HT_AMPDU_DENSITY,
470
461 /* keep last */ 471 /* keep last */
462 __NL80211_BAND_ATTR_AFTER_LAST, 472 __NL80211_BAND_ATTR_AFTER_LAST,
463 NL80211_BAND_ATTR_MAX = __NL80211_BAND_ATTR_AFTER_LAST - 1 473 NL80211_BAND_ATTR_MAX = __NL80211_BAND_ATTR_AFTER_LAST - 1
464}; 474};
465 475
476#define NL80211_BAND_ATTR_HT_CAPA NL80211_BAND_ATTR_HT_CAPA
477
466/** 478/**
467 * enum nl80211_frequency_attr - frequency attributes 479 * enum nl80211_frequency_attr - frequency attributes
468 * @NL80211_FREQUENCY_ATTR_FREQ: Frequency in MHz 480 * @NL80211_FREQUENCY_ATTR_FREQ: Frequency in MHz
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 572793c8c7ab..4d12e885170e 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -157,6 +157,19 @@ static int nl80211_send_wiphy(struct sk_buff *msg, u32 pid, u32 seq, int flags,
157 if (!nl_band) 157 if (!nl_band)
158 goto nla_put_failure; 158 goto nla_put_failure;
159 159
160 /* add HT info */
161 if (dev->wiphy.bands[band]->ht_cap.ht_supported) {
162 NLA_PUT(msg, NL80211_BAND_ATTR_HT_MCS_SET,
163 sizeof(dev->wiphy.bands[band]->ht_cap.mcs),
164 &dev->wiphy.bands[band]->ht_cap.mcs);
165 NLA_PUT_U16(msg, NL80211_BAND_ATTR_HT_CAPA,
166 dev->wiphy.bands[band]->ht_cap.cap);
167 NLA_PUT_U8(msg, NL80211_BAND_ATTR_HT_AMPDU_FACTOR,
168 dev->wiphy.bands[band]->ht_cap.ampdu_factor);
169 NLA_PUT_U8(msg, NL80211_BAND_ATTR_HT_AMPDU_DENSITY,
170 dev->wiphy.bands[band]->ht_cap.ampdu_density);
171 }
172
160 /* add frequencies */ 173 /* add frequencies */
161 nl_freqs = nla_nest_start(msg, NL80211_BAND_ATTR_FREQS); 174 nl_freqs = nla_nest_start(msg, NL80211_BAND_ATTR_FREQS);
162 if (!nl_freqs) 175 if (!nl_freqs)