From bf7f09bd245aa1a26a3b4e17860ee534a0ecf56f Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 3 Nov 2013 19:05:09 +0200 Subject: [PATCH] Fix AP mode QoS Map configuration to be per-BSS This is a per-BSS configuration parameter and as such, needs to be configured to the driver from hostapd_setup_bss() instead of hostapd_driver_init(). Signed-hostap: Jouni Malinen --- hostapd/main.c | 9 --------- src/ap/hostapd.c | 7 +++++++ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/hostapd/main.c b/hostapd/main.c index 748f42a08..05d6273c3 100644 --- a/hostapd/main.c +++ b/hostapd/main.c @@ -222,15 +222,6 @@ static int hostapd_driver_init(struct hostapd_iface *iface) iface->drv_max_acl_mac_addrs = capa.max_acl_mac_addrs; } -#ifdef CONFIG_INTERWORKING - if (hapd->driver->set_qos_map && conf->qos_map_set_len && - hapd->driver->set_qos_map(hapd->drv_priv, conf->qos_map_set, - conf->qos_map_set_len)) { - wpa_printf(MSG_ERROR, "Failed to initialize QoS Map."); - return -1; - } -#endif /* CONFIG_INTERWORKING */ - return 0; } diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c index 2ea32ee1f..fec79b340 100644 --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c @@ -785,6 +785,13 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first) wpa_printf(MSG_ERROR, "GAS server initialization failed"); return -1; } + + if (conf->qos_map_set_len && + hostapd_drv_set_qos_map(hapd, conf->qos_map_set, + conf->qos_map_set_len)) { + wpa_printf(MSG_ERROR, "Failed to initialize QoS Map"); + return -1; + } #endif /* CONFIG_INTERWORKING */ if (!hostapd_drv_none(hapd) && vlan_init(hapd)) {