211-ctrl-make-WNM_AP-functions-dependant-on-CONFIG_AP.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. From f0e9f5aab52b3eab85d28338cc996972ced4c39c Mon Sep 17 00:00:00 2001
  2. From: David Bauer <[email protected]>
  3. Date: Tue, 17 May 2022 23:07:59 +0200
  4. Subject: [PATCH] ctrl: make WNM_AP functions dependant on CONFIG_AP
  5. This fixes linking errors found when compiling wpa_supplicant with
  6. CONFIG_WNM_AP enabled but CONFIG_AP disabled.
  7. Signed-off-by: David Bauer <[email protected]>
  8. ---
  9. wpa_supplicant/ctrl_iface.c | 4 ++--
  10. 1 file changed, 2 insertions(+), 2 deletions(-)
  11. --- a/wpa_supplicant/ctrl_iface.c
  12. +++ b/wpa_supplicant/ctrl_iface.c
  13. @@ -13292,7 +13292,7 @@ char * wpa_supplicant_ctrl_iface_process
  14. if (wpas_ctrl_iface_coloc_intf_report(wpa_s, buf + 18))
  15. reply_len = -1;
  16. #endif /* CONFIG_WNM */
  17. -#ifdef CONFIG_WNM_AP
  18. +#if defined(CONFIG_AP) && defined(CONFIG_WNM_AP)
  19. } else if (os_strncmp(buf, "DISASSOC_IMMINENT ", 18) == 0) {
  20. if (ap_ctrl_iface_disassoc_imminent(wpa_s, buf + 18))
  21. reply_len = -1;
  22. @@ -13302,7 +13302,7 @@ char * wpa_supplicant_ctrl_iface_process
  23. } else if (os_strncmp(buf, "BSS_TM_REQ ", 11) == 0) {
  24. if (ap_ctrl_iface_bss_tm_req(wpa_s, buf + 11))
  25. reply_len = -1;
  26. -#endif /* CONFIG_WNM_AP */
  27. +#endif /* CONFIG_AP && CONFIG_WNM_AP */
  28. } else if (os_strcmp(buf, "FLUSH") == 0) {
  29. wpa_supplicant_ctrl_iface_flush(wpa_s);
  30. } else if (os_strncmp(buf, "RADIO_WORK ", 11) == 0) {