diff --git a/hostapd/ieee802_11.c b/hostapd/ieee802_11.c index 6bad2d250..8132a6e3b 100644 --- a/hostapd/ieee802_11.c +++ b/hostapd/ieee802_11.c @@ -120,9 +120,8 @@ u8 * hostapd_eid_ht_capabilities_info(struct hostapd_data *hapd, u8 *eid) MAX_RX_AMPDU_FACTOR_64KB); cap->capabilities_info = host_to_le16(hapd->iconf->ht_capab); - - cap->supported_mcs_set[0] = 0xff; - cap->supported_mcs_set[1] = 0xff; + os_memcpy(cap->supported_mcs_set, hapd->iface->current_mode->mcs_set, + 16); pos += sizeof(*cap); diff --git a/src/drivers/driver.h b/src/drivers/driver.h index 9b44f13dc..89400cd78 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -51,6 +51,7 @@ struct hostapd_hw_modes { int num_rates; struct hostapd_rate_data *rates; u16 ht_capab; + u8 mcs_set[16]; }; diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 626d74fb7..d11141dc1 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -2229,6 +2229,13 @@ static int phy_info_handler(struct nl_msg *msg, void *arg) tb_band[NL80211_BAND_ATTR_HT_CAPA]); } + if (tb_band[NL80211_BAND_ATTR_HT_MCS_SET] && + nla_len(tb_band[NL80211_BAND_ATTR_HT_MCS_SET])) { + u8 *mcs; + mcs = nla_data(tb_band[NL80211_BAND_ATTR_HT_MCS_SET]); + os_memcpy(mode->mcs_set, mcs, 16); + } + nla_for_each_nested(nl_freq, tb_band[NL80211_BAND_ATTR_FREQS], rem_freq) { nla_parse(tb_freq, NL80211_FREQUENCY_ATTR_MAX, nla_data(nl_freq), nla_len(nl_freq), freq_policy);