Fix AP mode HT Capabilities IE to use A-MPDU Parameters from the driver

Instead of using hardcoded maximum A-MPDU length of 64 kB and no
restrictions on minimum MPDU Start Spacing, use the correct values
reported by the driver.
This commit is contained in:
Jouni Malinen 2009-11-29 12:21:26 +02:00
parent a49148fd55
commit be8eb8ab3e
3 changed files with 14 additions and 6 deletions

View file

@ -52,6 +52,7 @@ struct hostapd_hw_modes {
struct hostapd_rate_data *rates;
u16 ht_capab;
u8 mcs_set[16];
u8 a_mpdu_params;
};

View file

@ -2186,6 +2186,18 @@ 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_AMPDU_FACTOR]) {
mode->a_mpdu_params |= nla_get_u8(
tb_band[NL80211_BAND_ATTR_HT_AMPDU_FACTOR]) &
0x03;
}
if (tb_band[NL80211_BAND_ATTR_HT_AMPDU_DENSITY]) {
mode->a_mpdu_params |= nla_get_u8(
tb_band[NL80211_BAND_ATTR_HT_AMPDU_DENSITY]) <<
2;
}
if (tb_band[NL80211_BAND_ATTR_HT_MCS_SET] &&
nla_len(tb_band[NL80211_BAND_ATTR_HT_MCS_SET])) {
u8 *mcs;