Support qos_map_set without CONFIG_INTERWORKING

This feature is useful on its own even without full interworking
support.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Felix Fietkau 2024-04-04 12:52:16 +02:00 committed by Jouni Malinen
parent 8634e7343d
commit dec6fccf17
4 changed files with 4 additions and 12 deletions

View file

@ -1678,6 +1678,8 @@ static int parse_anqp_elem(struct hostapd_bss_config *bss, char *buf, int line)
return 0; return 0;
} }
#endif /* CONFIG_INTERWORKING */
static int parse_qos_map_set(struct hostapd_bss_config *bss, static int parse_qos_map_set(struct hostapd_bss_config *bss,
char *buf, int line) char *buf, int line)
@ -1719,8 +1721,6 @@ static int parse_qos_map_set(struct hostapd_bss_config *bss,
return 0; return 0;
} }
#endif /* CONFIG_INTERWORKING */
#ifdef CONFIG_HS20 #ifdef CONFIG_HS20
static int hs20_parse_conn_capab(struct hostapd_bss_config *bss, char *buf, static int hs20_parse_conn_capab(struct hostapd_bss_config *bss, char *buf,
@ -4258,10 +4258,10 @@ static int hostapd_config_fill(struct hostapd_config *conf,
bss->gas_frag_limit = val; bss->gas_frag_limit = val;
} else if (os_strcmp(buf, "gas_comeback_delay") == 0) { } else if (os_strcmp(buf, "gas_comeback_delay") == 0) {
bss->gas_comeback_delay = atoi(pos); bss->gas_comeback_delay = atoi(pos);
#endif /* CONFIG_INTERWORKING */
} else if (os_strcmp(buf, "qos_map_set") == 0) { } else if (os_strcmp(buf, "qos_map_set") == 0) {
if (parse_qos_map_set(bss, pos, line) < 0) if (parse_qos_map_set(bss, pos, line) < 0)
return 1; return 1;
#endif /* CONFIG_INTERWORKING */
#ifdef CONFIG_RADIUS_TEST #ifdef CONFIG_RADIUS_TEST
} else if (os_strcmp(buf, "dump_msk_file") == 0) { } else if (os_strcmp(buf, "dump_msk_file") == 0) {
os_free(bss->dump_msk_file); os_free(bss->dump_msk_file);

View file

@ -1584,6 +1584,7 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first,
wpa_printf(MSG_ERROR, "GAS server initialization failed"); wpa_printf(MSG_ERROR, "GAS server initialization failed");
return -1; return -1;
} }
#endif /* CONFIG_INTERWORKING */
if (conf->qos_map_set_len && if (conf->qos_map_set_len &&
hostapd_drv_set_qos_map(hapd, conf->qos_map_set, hostapd_drv_set_qos_map(hapd, conf->qos_map_set,
@ -1591,7 +1592,6 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first,
wpa_printf(MSG_ERROR, "Failed to initialize QoS Map"); wpa_printf(MSG_ERROR, "Failed to initialize QoS Map");
return -1; return -1;
} }
#endif /* CONFIG_INTERWORKING */
if (conf->bss_load_update_period && bss_load_update_init(hapd)) { if (conf->bss_load_update_period && bss_load_update_init(hapd)) {
wpa_printf(MSG_ERROR, "BSS Load initialization failed"); wpa_printf(MSG_ERROR, "BSS Load initialization failed");

View file

@ -1138,13 +1138,11 @@ u8 * hostapd_eid_rsnxe(struct hostapd_data *hapd, u8 *eid, size_t len)
u16 check_ext_capab(struct hostapd_data *hapd, struct sta_info *sta, u16 check_ext_capab(struct hostapd_data *hapd, struct sta_info *sta,
const u8 *ext_capab_ie, size_t ext_capab_ie_len) const u8 *ext_capab_ie, size_t ext_capab_ie_len)
{ {
#ifdef CONFIG_INTERWORKING
/* check for QoS Map support */ /* check for QoS Map support */
if (ext_capab_ie_len >= 5) { if (ext_capab_ie_len >= 5) {
if (ext_capab_ie[4] & 0x01) if (ext_capab_ie[4] & 0x01)
sta->qos_map_enabled = 1; sta->qos_map_enabled = 1;
} }
#endif /* CONFIG_INTERWORKING */
if (ext_capab_ie_len > 0) { if (ext_capab_ie_len > 0) {
sta->ecsa_supported = !!(ext_capab_ie[0] & BIT(2)); sta->ecsa_supported = !!(ext_capab_ie[0] & BIT(2));

View file

@ -2935,8 +2935,6 @@ void wnm_bss_keep_alive_deinit(struct wpa_supplicant *wpa_s)
} }
#ifdef CONFIG_INTERWORKING
static int wpas_qos_map_set(struct wpa_supplicant *wpa_s, const u8 *qos_map, static int wpas_qos_map_set(struct wpa_supplicant *wpa_s, const u8 *qos_map,
size_t len) size_t len)
{ {
@ -2969,8 +2967,6 @@ static void interworking_process_assoc_resp(struct wpa_supplicant *wpa_s,
} }
} }
#endif /* CONFIG_INTERWORKING */
static void wpa_supplicant_set_4addr_mode(struct wpa_supplicant *wpa_s) static void wpa_supplicant_set_4addr_mode(struct wpa_supplicant *wpa_s)
{ {
@ -3349,10 +3345,8 @@ static int wpa_supplicant_event_associnfo(struct wpa_supplicant *wpa_s,
wnm_process_assoc_resp(wpa_s, data->assoc_info.resp_ies, wnm_process_assoc_resp(wpa_s, data->assoc_info.resp_ies,
data->assoc_info.resp_ies_len); data->assoc_info.resp_ies_len);
#endif /* CONFIG_WNM */ #endif /* CONFIG_WNM */
#ifdef CONFIG_INTERWORKING
interworking_process_assoc_resp(wpa_s, data->assoc_info.resp_ies, interworking_process_assoc_resp(wpa_s, data->assoc_info.resp_ies,
data->assoc_info.resp_ies_len); data->assoc_info.resp_ies_len);
#endif /* CONFIG_INTERWORKING */
if (wpa_s->hw_capab == CAPAB_VHT && if (wpa_s->hw_capab == CAPAB_VHT &&
get_ie(data->assoc_info.resp_ies, get_ie(data->assoc_info.resp_ies,
data->assoc_info.resp_ies_len, WLAN_EID_VHT_CAP)) data->assoc_info.resp_ies_len, WLAN_EID_VHT_CAP))