Do not set driver MAC ACL unless driver supports this

This cleans up debug log by not including comments about failed
operations in case the operation is known to fail due to not being
supported by the driver.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2013-05-24 13:37:22 +03:00 committed by Jouni Malinen
parent 3c4ca36330
commit 3cb953e4b6
3 changed files with 5 additions and 0 deletions

View file

@ -279,6 +279,7 @@ static int hostapd_driver_init(struct hostapd_iface *iface)
iface->extended_capa = capa.extended_capa; iface->extended_capa = capa.extended_capa;
iface->extended_capa_mask = capa.extended_capa_mask; iface->extended_capa_mask = capa.extended_capa_mask;
iface->extended_capa_len = capa.extended_capa_len; iface->extended_capa_len = capa.extended_capa_len;
iface->drv_max_acl_mac_addrs = capa.max_acl_mac_addrs;
} }
return 0; return 0;

View file

@ -870,6 +870,8 @@ static void hostapd_set_acl(struct hostapd_data *hapd)
int err; int err;
u8 accept_acl; u8 accept_acl;
if (hapd->iface->drv_max_acl_mac_addrs == 0)
return;
if (!(conf->bss->num_accept_mac || conf->bss->num_deny_mac)) if (!(conf->bss->num_accept_mac || conf->bss->num_deny_mac))
return; return;

View file

@ -233,6 +233,8 @@ struct hostapd_iface {
const u8 *extended_capa, *extended_capa_mask; const u8 *extended_capa, *extended_capa_mask;
unsigned int extended_capa_len; unsigned int extended_capa_len;
unsigned int drv_max_acl_mac_addrs;
struct hostapd_hw_modes *hw_features; struct hostapd_hw_modes *hw_features;
int num_hw_features; int num_hw_features;
struct hostapd_hw_modes *current_mode; struct hostapd_hw_modes *current_mode;