From 089e360cc74f30666658ecd93a7a1b5bfd1e1452 Mon Sep 17 00:00:00 2001 From: Matthew Wang Date: Thu, 5 Dec 2024 10:11:16 +0000 Subject: [PATCH] Android: Wrap a P2P-specific chunk in CONFIG_P2P This special driver_cmd handling is specific for P2P and won't compile without CONFIG_P2P=y. Signed-off-by: Matthew Wang --- wpa_supplicant/ctrl_iface.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index c024c8f87..5b7e2f1b5 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -8760,6 +8760,7 @@ static int wpa_supplicant_driver_cmd(struct wpa_supplicant *wpa_s, char *cmd, ret = wpa_drv_driver_cmd(wpa_s, cmd, buf, buflen); if (ret == 0) { +#ifdef CONFIG_P2P if (os_strncasecmp(cmd, "COUNTRY", 7) == 0) { struct p2p_data *p2p = wpa_s->global->p2p; if (p2p) { @@ -8770,6 +8771,7 @@ static int wpa_supplicant_driver_cmd(struct wpa_supplicant *wpa_s, char *cmd, p2p_set_country(p2p, country); } } +#endif /* CONFIG_P2P */ ret = os_snprintf(buf, buflen, "%s\n", "OK"); if (os_snprintf_error(buflen, ret)) ret = -1; -- 2.47.3