From: Jouni Malinen Date: Fri, 24 May 2013 10:37:22 +0000 (+0300) Subject: Do not set driver MAC ACL unless driver supports this X-Git-Tag: aosp-kk-from-upstream~216 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3cb953e4b690144b64db8a4ad78ebf547685db65;p=thirdparty%2Fhostap.git 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 --- diff --git a/hostapd/main.c b/hostapd/main.c index fb82a0238..90e59665f 100644 --- a/hostapd/main.c +++ b/hostapd/main.c @@ -279,6 +279,7 @@ static int hostapd_driver_init(struct hostapd_iface *iface) iface->extended_capa = capa.extended_capa; iface->extended_capa_mask = capa.extended_capa_mask; iface->extended_capa_len = capa.extended_capa_len; + iface->drv_max_acl_mac_addrs = capa.max_acl_mac_addrs; } return 0; diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c index f1ec48a42..780b2e2ef 100644 --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c @@ -870,6 +870,8 @@ static void hostapd_set_acl(struct hostapd_data *hapd) int err; u8 accept_acl; + if (hapd->iface->drv_max_acl_mac_addrs == 0) + return; if (!(conf->bss->num_accept_mac || conf->bss->num_deny_mac)) return; diff --git a/src/ap/hostapd.h b/src/ap/hostapd.h index 9a3bb6862..55f6dd84e 100644 --- a/src/ap/hostapd.h +++ b/src/ap/hostapd.h @@ -233,6 +233,8 @@ struct hostapd_iface { const u8 *extended_capa, *extended_capa_mask; unsigned int extended_capa_len; + unsigned int drv_max_acl_mac_addrs; + struct hostapd_hw_modes *hw_features; int num_hw_features; struct hostapd_hw_modes *current_mode;