hostapd: Add extended capabilities into STA command

Signed-off-by: bhagavathi perumal s <bperumal@qti.qualcomm.com>
This commit is contained in:
bhagavathi perumal s 2017-10-06 20:33:25 +05:30 committed by Jouni Malinen
parent d1f3a81446
commit 65f9db6bc2
4 changed files with 22 additions and 1 deletions

View file

@ -254,6 +254,15 @@ static int hostapd_ctrl_iface_sta_mib(struct hostapd_data *hapd,
len += ret; len += ret;
} }
if (sta->ext_capability &&
buflen - len > (unsigned) (11 + 2 * sta->ext_capability[0])) {
len += os_snprintf(buf + len, buflen - len, "ext_capab=");
len += wpa_snprintf_hex(buf + len, buflen - len,
sta->ext_capability + 1,
sta->ext_capability[0]);
len += os_snprintf(buf + len, buflen - len, "\n");
}
return len; return len;
} }

View file

@ -2123,8 +2123,16 @@ static u16 check_ext_capab(struct hostapd_data *hapd, struct sta_info *sta,
} }
#endif /* CONFIG_INTERWORKING */ #endif /* CONFIG_INTERWORKING */
if (ext_capab_ie_len > 0) if (ext_capab_ie_len > 0) {
sta->ecsa_supported = !!(ext_capab_ie[0] & BIT(2)); sta->ecsa_supported = !!(ext_capab_ie[0] & BIT(2));
os_free(sta->ext_capability);
sta->ext_capability = os_malloc(1 + ext_capab_ie_len);
if (sta->ext_capability) {
sta->ext_capability[0] = ext_capab_ie_len;
os_memcpy(sta->ext_capability + 1, ext_capab_ie,
ext_capab_ie_len);
}
}
return WLAN_STATUS_SUCCESS; return WLAN_STATUS_SUCCESS;
} }

View file

@ -359,6 +359,8 @@ void ap_free_sta(struct hostapd_data *hapd, struct sta_info *sta)
crypto_ecdh_deinit(sta->owe_ecdh); crypto_ecdh_deinit(sta->owe_ecdh);
#endif /* CONFIG_OWE */ #endif /* CONFIG_OWE */
os_free(sta->ext_capability);
os_free(sta); os_free(sta);
} }

View file

@ -251,6 +251,8 @@ struct sta_info {
u16 owe_group; u16 owe_group;
#endif /* CONFIG_OWE */ #endif /* CONFIG_OWE */
u8 *ext_capability;
#ifdef CONFIG_TESTING_OPTIONS #ifdef CONFIG_TESTING_OPTIONS
enum wpa_alg last_tk_alg; enum wpa_alg last_tk_alg;
int last_tk_key_idx; int last_tk_key_idx;