Show supported group_mgmt capabilities
This extends GET_CAPABILITY command to allow the supported group management frame cipher suites to be listed. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
893e152e64
commit
b5f045deee
1 changed files with 40 additions and 0 deletions
|
@ -3333,6 +3333,13 @@ static const struct cipher_info ciphers[] = {
|
|||
{ WPA_DRIVER_CAPA_ENC_WEP40, "WEP40", 1 }
|
||||
};
|
||||
|
||||
static const struct cipher_info ciphers_group_mgmt[] = {
|
||||
{ WPA_DRIVER_CAPA_ENC_BIP, "AES-128-CMAC", 1 },
|
||||
{ WPA_DRIVER_CAPA_ENC_BIP_GMAC_128, "BIP-GMAC-128", 1 },
|
||||
{ WPA_DRIVER_CAPA_ENC_BIP_GMAC_256, "BIP-GMAC-256", 1 },
|
||||
{ WPA_DRIVER_CAPA_ENC_BIP_CMAC_256, "BIP-CMAC-256", 1 },
|
||||
};
|
||||
|
||||
|
||||
static int ctrl_iface_get_capability_pairwise(int res, char *strict,
|
||||
struct wpa_driver_capa *capa,
|
||||
|
@ -3406,6 +3413,35 @@ static int ctrl_iface_get_capability_group(int res, char *strict,
|
|||
}
|
||||
|
||||
|
||||
static int ctrl_iface_get_capability_group_mgmt(int res, char *strict,
|
||||
struct wpa_driver_capa *capa,
|
||||
char *buf, size_t buflen)
|
||||
{
|
||||
int ret;
|
||||
char *pos, *end;
|
||||
unsigned int i;
|
||||
|
||||
pos = buf;
|
||||
end = pos + buflen;
|
||||
|
||||
if (res < 0)
|
||||
return 0;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(ciphers_group_mgmt); i++) {
|
||||
if (capa->enc & ciphers_group_mgmt[i].capa) {
|
||||
ret = os_snprintf(pos, end - pos, "%s%s",
|
||||
pos == buf ? "" : " ",
|
||||
ciphers_group_mgmt[i].name);
|
||||
if (os_snprintf_error(end - pos, ret))
|
||||
return pos - buf;
|
||||
pos += ret;
|
||||
}
|
||||
}
|
||||
|
||||
return pos - buf;
|
||||
}
|
||||
|
||||
|
||||
static int ctrl_iface_get_capability_key_mgmt(int res, char *strict,
|
||||
struct wpa_driver_capa *capa,
|
||||
char *buf, size_t buflen)
|
||||
|
@ -3755,6 +3791,10 @@ static int wpa_supplicant_ctrl_iface_get_capability(
|
|||
return ctrl_iface_get_capability_group(res, strict, &capa,
|
||||
buf, buflen);
|
||||
|
||||
if (os_strcmp(field, "group_mgmt") == 0)
|
||||
return ctrl_iface_get_capability_group_mgmt(res, strict, &capa,
|
||||
buf, buflen);
|
||||
|
||||
if (os_strcmp(field, "key_mgmt") == 0)
|
||||
return ctrl_iface_get_capability_key_mgmt(res, strict, &capa,
|
||||
buf, buflen);
|
||||
|
|
Loading…
Reference in a new issue