VHT: Store VHT capabilities and manage VHT flag for STAs
Signed-hostap: Mahesh Palivela <maheshp@posedge.com>
This commit is contained in:
parent
6c93c38d7c
commit
de3cdf354a
4 changed files with 39 additions and 0 deletions
|
@ -648,6 +648,13 @@ static u16 check_assoc_ies(struct hostapd_data *hapd, struct sta_info *sta,
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_IEEE80211N */
|
#endif /* CONFIG_IEEE80211N */
|
||||||
|
|
||||||
|
#ifdef CONFIG_IEEE80211AC
|
||||||
|
resp = copy_sta_vht_capab(hapd, sta, elems.vht_capabilities,
|
||||||
|
elems.vht_capabilities_len);
|
||||||
|
if (resp != WLAN_STATUS_SUCCESS)
|
||||||
|
return resp;
|
||||||
|
#endif /* CONFIG_IEEE80211AC */
|
||||||
|
|
||||||
if ((hapd->conf->wpa & WPA_PROTO_RSN) && elems.rsn_ie) {
|
if ((hapd->conf->wpa & WPA_PROTO_RSN) && elems.rsn_ie) {
|
||||||
wpa_ie = elems.rsn_ie;
|
wpa_ie = elems.rsn_ie;
|
||||||
wpa_ie_len = elems.rsn_ie_len;
|
wpa_ie_len = elems.rsn_ie_len;
|
||||||
|
|
|
@ -56,6 +56,8 @@ void hostapd_get_ht_capab(struct hostapd_data *hapd,
|
||||||
u16 copy_sta_ht_capab(struct hostapd_data *hapd, struct sta_info *sta,
|
u16 copy_sta_ht_capab(struct hostapd_data *hapd, struct sta_info *sta,
|
||||||
const u8 *ht_capab, size_t ht_capab_len);
|
const u8 *ht_capab, size_t ht_capab_len);
|
||||||
void update_ht_state(struct hostapd_data *hapd, struct sta_info *sta);
|
void update_ht_state(struct hostapd_data *hapd, struct sta_info *sta);
|
||||||
|
u16 copy_sta_vht_capab(struct hostapd_data *hapd, struct sta_info *sta,
|
||||||
|
const u8 *vht_capab, size_t vht_capab_len);
|
||||||
void hostapd_tx_status(struct hostapd_data *hapd, const u8 *addr,
|
void hostapd_tx_status(struct hostapd_data *hapd, const u8 *addr,
|
||||||
const u8 *buf, size_t len, int ack);
|
const u8 *buf, size_t len, int ack);
|
||||||
void hostapd_eapol_tx_status(struct hostapd_data *hapd, const u8 *dst,
|
void hostapd_eapol_tx_status(struct hostapd_data *hapd, const u8 *dst,
|
||||||
|
|
|
@ -70,3 +70,31 @@ u8 * hostapd_eid_vht_operation(struct hostapd_data *hapd, u8 *eid)
|
||||||
|
|
||||||
return pos;
|
return pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
u16 copy_sta_vht_capab(struct hostapd_data *hapd, struct sta_info *sta,
|
||||||
|
const u8 *vht_capab, size_t vht_capab_len)
|
||||||
|
{
|
||||||
|
/* Disable VHT caps for STAs associated to no-VHT BSSes. */
|
||||||
|
if (!vht_capab ||
|
||||||
|
vht_capab_len < sizeof(struct ieee80211_vht_capabilities) ||
|
||||||
|
hapd->conf->disable_11ac) {
|
||||||
|
sta->flags &= ~WLAN_STA_VHT;
|
||||||
|
os_free(sta->vht_capabilities);
|
||||||
|
sta->vht_capabilities = NULL;
|
||||||
|
return WLAN_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sta->vht_capabilities == NULL) {
|
||||||
|
sta->vht_capabilities =
|
||||||
|
os_zalloc(sizeof(struct ieee80211_vht_capabilities));
|
||||||
|
if (sta->vht_capabilities == NULL)
|
||||||
|
return WLAN_STATUS_UNSPECIFIED_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
sta->flags |= WLAN_STA_VHT;
|
||||||
|
os_memcpy(sta->vht_capabilities, vht_capab,
|
||||||
|
sizeof(struct ieee80211_vht_capabilities));
|
||||||
|
|
||||||
|
return WLAN_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#define WLAN_STA_ASSOC_REQ_OK BIT(15)
|
#define WLAN_STA_ASSOC_REQ_OK BIT(15)
|
||||||
#define WLAN_STA_WPS2 BIT(16)
|
#define WLAN_STA_WPS2 BIT(16)
|
||||||
#define WLAN_STA_GAS BIT(17)
|
#define WLAN_STA_GAS BIT(17)
|
||||||
|
#define WLAN_STA_VHT BIT(18)
|
||||||
#define WLAN_STA_PENDING_DISASSOC_CB BIT(29)
|
#define WLAN_STA_PENDING_DISASSOC_CB BIT(29)
|
||||||
#define WLAN_STA_PENDING_DEAUTH_CB BIT(30)
|
#define WLAN_STA_PENDING_DEAUTH_CB BIT(30)
|
||||||
#define WLAN_STA_NONERP BIT(31)
|
#define WLAN_STA_NONERP BIT(31)
|
||||||
|
@ -97,6 +98,7 @@ struct sta_info {
|
||||||
u8 *psk; /* PSK from RADIUS authentication server */
|
u8 *psk; /* PSK from RADIUS authentication server */
|
||||||
|
|
||||||
struct ieee80211_ht_capabilities *ht_capabilities;
|
struct ieee80211_ht_capabilities *ht_capabilities;
|
||||||
|
struct ieee80211_vht_capabilities *vht_capabilities;
|
||||||
|
|
||||||
#ifdef CONFIG_IEEE80211W
|
#ifdef CONFIG_IEEE80211W
|
||||||
int sa_query_count; /* number of pending SA Query requests;
|
int sa_query_count; /* number of pending SA Query requests;
|
||||||
|
|
Loading…
Reference in a new issue