Allow AP mode extended capabilities to be overridden
The new hostapd configuration parameters ext_capa_mask and ext_capa can now be used to mask out or add extended capability bits. While this is not without CONFIG_TESTING_OPTIONS, the main use case for this is for testing purposes. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
7365eb43ea
commit
60974eb3f6
3 changed files with 35 additions and 1 deletions
|
@ -451,7 +451,7 @@ static void hostapd_ext_capab_byte(struct hostapd_data *hapd, u8 *pos, int idx)
|
|||
u8 * hostapd_eid_ext_capab(struct hostapd_data *hapd, u8 *eid)
|
||||
{
|
||||
u8 *pos = eid;
|
||||
u8 len = 12, i;
|
||||
u8 len = EXT_CAPA_MAX_LEN, i;
|
||||
|
||||
if (len < hapd->iface->extended_capa_len)
|
||||
len = hapd->iface->extended_capa_len;
|
||||
|
@ -465,6 +465,11 @@ u8 * hostapd_eid_ext_capab(struct hostapd_data *hapd, u8 *eid)
|
|||
*pos &= ~hapd->iface->extended_capa_mask[i];
|
||||
*pos |= hapd->iface->extended_capa[i];
|
||||
}
|
||||
|
||||
if (i < EXT_CAPA_MAX_LEN) {
|
||||
*pos &= ~hapd->conf->ext_capa_mask[i];
|
||||
*pos |= hapd->conf->ext_capa[i];
|
||||
}
|
||||
}
|
||||
|
||||
while (len > 0 && eid[1 + len] == 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue