]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Android: Wrap a P2P-specific chunk in CONFIG_P2P
authorMatthew Wang <matthewmwang@chromium.org>
Thu, 5 Dec 2024 10:11:16 +0000 (10:11 +0000)
committerJouni Malinen <j@w1.fi>
Sun, 22 Dec 2024 22:32:01 +0000 (00:32 +0200)
This special driver_cmd handling is specific for P2P and won't compile
without CONFIG_P2P=y.

Signed-off-by: Matthew Wang <matthewmwang@chromium.org>
wpa_supplicant/ctrl_iface.c

index c024c8f8761d6e6cae606906a9c52f29a1591a39..5b7e2f1b573cb019624412446888cc8d7f078686 100644 (file)
@@ -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;