wpa_supplicant: Add support for VHT BSS membership selector

This allows wpa_supplicant to associate to an AP that has VHT BSS
membership selector set to indicate VHT support is required for the BSS.

Without the patch it was impossible to connect to, e.g., hostapd-based
AP that has require_vht=1. wpa_supplicant was complaining with:
  hardware does not support required rate 63.0 Mbps

Signed-hostap: Michal Kazior <michal.kazior@tieto.com>
This commit is contained in:
Michal Kazior 2013-07-20 17:28:42 +03:00 committed by Jouni Malinen
parent 3f9a8137f5
commit c8ebeda406
3 changed files with 45 additions and 1 deletions

View file

@ -61,6 +61,7 @@ struct hostapd_channel_data {
};
#define HOSTAPD_MODE_FLAG_HT_INFO_KNOWN BIT(0)
#define HOSTAPD_MODE_FLAG_VHT_INFO_KNOWN BIT(1)
/**
* struct hostapd_hw_modes - Supported hardware mode information

View file

@ -5658,7 +5658,20 @@ static int phy_info_band(struct phy_info_arg *phy_info, struct nlattr *nl_band)
mode = &phy_info->modes[*(phy_info->num_modes)];
os_memset(mode, 0, sizeof(*mode));
mode->mode = NUM_HOSTAPD_MODES;
mode->flags = HOSTAPD_MODE_FLAG_HT_INFO_KNOWN;
mode->flags = HOSTAPD_MODE_FLAG_HT_INFO_KNOWN |
HOSTAPD_MODE_FLAG_VHT_INFO_KNOWN;
/*
* Unsupported VHT MCS stream is defined as value 3, so the VHT
* MCS RX/TX map must be initialized with 0xffff to mark all 8
* possible streams as unsupported. This will be overridden if
* driver advertises VHT support.
*/
mode->vht_mcs_set[0] = 0xff;
mode->vht_mcs_set[1] = 0xff;
mode->vht_mcs_set[4] = 0xff;
mode->vht_mcs_set[5] = 0xff;
*(phy_info->num_modes) += 1;
phy_info->last_mode = nl_band->nla_type;
phy_info->last_chan_idx = 0;