hostapd: replace "argument list too long" fix with a simpler version
[openwrt/staging/stintel.git] / package / network / services / hostapd / patches / 990-ctrl-make-WNM_AP-functions-dependant-on-CONFIG_AP.patch
1 From f0e9f5aab52b3eab85d28338cc996972ced4c39c Mon Sep 17 00:00:00 2001
2 From: David Bauer <mail@david-bauer.net>
3 Date: Tue, 17 May 2022 23:07:59 +0200
4 Subject: [PATCH] ctrl: make WNM_AP functions dependant on CONFIG_AP
5
6 This fixes linking errors found when compiling wpa_supplicant with
7 CONFIG_WNM_AP enabled but CONFIG_AP disabled.
8
9 Signed-off-by: David Bauer <mail@david-bauer.net>
10 ---
11 wpa_supplicant/ctrl_iface.c | 4 ++--
12 1 file changed, 2 insertions(+), 2 deletions(-)
13
14 --- a/wpa_supplicant/ctrl_iface.c
15 +++ b/wpa_supplicant/ctrl_iface.c
16 @@ -13220,7 +13220,7 @@ char * wpa_supplicant_ctrl_iface_process
17 if (wpas_ctrl_iface_coloc_intf_report(wpa_s, buf + 18))
18 reply_len = -1;
19 #endif /* CONFIG_WNM */
20 -#ifdef CONFIG_WNM_AP
21 +#if defined(CONFIG_AP) && defined(CONFIG_WNM_AP)
22 } else if (os_strncmp(buf, "DISASSOC_IMMINENT ", 18) == 0) {
23 if (ap_ctrl_iface_disassoc_imminent(wpa_s, buf + 18))
24 reply_len = -1;
25 @@ -13230,7 +13230,7 @@ char * wpa_supplicant_ctrl_iface_process
26 } else if (os_strncmp(buf, "BSS_TM_REQ ", 11) == 0) {
27 if (ap_ctrl_iface_bss_tm_req(wpa_s, buf + 11))
28 reply_len = -1;
29 -#endif /* CONFIG_WNM_AP */
30 +#endif /* CONFIG_AP && CONFIG_WNM_AP */
31 } else if (os_strcmp(buf, "FLUSH") == 0) {
32 wpa_supplicant_ctrl_iface_flush(wpa_s);
33 } else if (os_strncmp(buf, "RADIO_WORK ", 11) == 0) {