hostapd: support qos_map_set without CONFIG_INTERWORKING
[openwrt/staging/thess.git] / package / network / services / hostapd / patches / 750-qos_map_set_without_interworking.patch
1 --- a/hostapd/config_file.c
2 +++ b/hostapd/config_file.c
3 @@ -1643,6 +1643,8 @@ static int parse_anqp_elem(struct hostap
4 return 0;
5 }
6
7 +#endif /* CONFIG_INTERWORKING */
8 +
9
10 static int parse_qos_map_set(struct hostapd_bss_config *bss,
11 char *buf, int line)
12 @@ -1684,8 +1686,6 @@ static int parse_qos_map_set(struct host
13 return 0;
14 }
15
16 -#endif /* CONFIG_INTERWORKING */
17 -
18
19 #ifdef CONFIG_HS20
20 static int hs20_parse_conn_capab(struct hostapd_bss_config *bss, char *buf,
21 @@ -4058,10 +4058,10 @@ static int hostapd_config_fill(struct ho
22 bss->gas_frag_limit = val;
23 } else if (os_strcmp(buf, "gas_comeback_delay") == 0) {
24 bss->gas_comeback_delay = atoi(pos);
25 +#endif /* CONFIG_INTERWORKING */
26 } else if (os_strcmp(buf, "qos_map_set") == 0) {
27 if (parse_qos_map_set(bss, pos, line) < 0)
28 return 1;
29 -#endif /* CONFIG_INTERWORKING */
30 #ifdef CONFIG_RADIUS_TEST
31 } else if (os_strcmp(buf, "dump_msk_file") == 0) {
32 os_free(bss->dump_msk_file);
33 --- a/src/ap/hostapd.c
34 +++ b/src/ap/hostapd.c
35 @@ -1415,6 +1415,7 @@ static int hostapd_setup_bss(struct host
36 wpa_printf(MSG_ERROR, "GAS server initialization failed");
37 return -1;
38 }
39 +#endif /* CONFIG_INTERWORKING */
40
41 if (conf->qos_map_set_len &&
42 hostapd_drv_set_qos_map(hapd, conf->qos_map_set,
43 @@ -1422,7 +1423,6 @@ static int hostapd_setup_bss(struct host
44 wpa_printf(MSG_ERROR, "Failed to initialize QoS Map");
45 return -1;
46 }
47 -#endif /* CONFIG_INTERWORKING */
48
49 if (conf->bss_load_update_period && bss_load_update_init(hapd)) {
50 wpa_printf(MSG_ERROR, "BSS Load initialization failed");
51 --- a/src/ap/drv_callbacks.c
52 +++ b/src/ap/drv_callbacks.c
53 @@ -271,12 +271,10 @@ int hostapd_notif_assoc(struct hostapd_d
54 }
55 #endif /* NEED_AP_MLME */
56
57 -#ifdef CONFIG_INTERWORKING
58 if (elems.ext_capab && elems.ext_capab_len > 4) {
59 if (elems.ext_capab[4] & 0x01)
60 sta->qos_map_enabled = 1;
61 }
62 -#endif /* CONFIG_INTERWORKING */
63
64 #ifdef CONFIG_HS20
65 wpabuf_free(sta->hs20_ie);
66 --- a/src/ap/ieee802_11.c
67 +++ b/src/ap/ieee802_11.c
68 @@ -4136,13 +4136,11 @@ static u16 copy_supp_rates(struct hostap
69 static u16 check_ext_capab(struct hostapd_data *hapd, struct sta_info *sta,
70 const u8 *ext_capab_ie, size_t ext_capab_ie_len)
71 {
72 -#ifdef CONFIG_INTERWORKING
73 /* check for QoS Map support */
74 if (ext_capab_ie_len >= 5) {
75 if (ext_capab_ie[4] & 0x01)
76 sta->qos_map_enabled = 1;
77 }
78 -#endif /* CONFIG_INTERWORKING */
79
80 if (ext_capab_ie_len > 0) {
81 sta->ecsa_supported = !!(ext_capab_ie[0] & BIT(2));
82 --- a/wpa_supplicant/events.c
83 +++ b/wpa_supplicant/events.c
84 @@ -2535,8 +2535,6 @@ void wnm_bss_keep_alive_deinit(struct wp
85 }
86
87
88 -#ifdef CONFIG_INTERWORKING
89 -
90 static int wpas_qos_map_set(struct wpa_supplicant *wpa_s, const u8 *qos_map,
91 size_t len)
92 {
93 @@ -2569,8 +2567,6 @@ static void interworking_process_assoc_r
94 }
95 }
96
97 -#endif /* CONFIG_INTERWORKING */
98 -
99
100 static void multi_ap_process_assoc_resp(struct wpa_supplicant *wpa_s,
101 const u8 *ies, size_t ies_len)
102 @@ -2704,10 +2700,8 @@ static int wpa_supplicant_event_associnf
103 wnm_process_assoc_resp(wpa_s, data->assoc_info.resp_ies,
104 data->assoc_info.resp_ies_len);
105 #endif /* CONFIG_WNM */
106 -#ifdef CONFIG_INTERWORKING
107 interworking_process_assoc_resp(wpa_s, data->assoc_info.resp_ies,
108 data->assoc_info.resp_ies_len);
109 -#endif /* CONFIG_INTERWORKING */
110 if (wpa_s->hw_capab == CAPAB_VHT &&
111 get_ie(data->assoc_info.resp_ies,
112 data->assoc_info.resp_ies_len, WLAN_EID_VHT_CAP))