Message ID | 20241205101116.2935119-1-matthewmwang@google.com |
---|---|
State | Accepted |
Headers | show |
Series | Wrap a chunk in CONFIG_P2P | expand |
On Thu, Dec 05, 2024 at 10:11:16AM +0000, Matthew Wang wrote: > diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c > @@ -8655,6 +8655,7 @@ static int wpa_supplicant_driver_cmd(struct wpa_supplicant *wpa_s, char *cmd, > ret = wpa_drv_driver_cmd(wpa_s, cmd, buf, buflen); > +#ifdef CONFIG_P2P > if (ret == 0) { > if (os_strncasecmp(cmd, "COUNTRY", 7) == 0) { > struct p2p_data *p2p = wpa_s->global->p2p; > @@ -8670,6 +8671,7 @@ static int wpa_supplicant_driver_cmd(struct wpa_supplicant *wpa_s, char *cmd, > if (os_snprintf_error(buflen, ret)) > ret = -1; > } > +#endif /* CONFIG_P2P */ Thanks, applied with fixes to not comment out that os_snprintf part at the end since it is not limited to the P2P case.
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index f503beae0..0f651bbc7 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -8655,6 +8655,7 @@ static int wpa_supplicant_driver_cmd(struct wpa_supplicant *wpa_s, char *cmd, int ret; ret = wpa_drv_driver_cmd(wpa_s, cmd, buf, buflen); +#ifdef CONFIG_P2P if (ret == 0) { if (os_strncasecmp(cmd, "COUNTRY", 7) == 0) { struct p2p_data *p2p = wpa_s->global->p2p; @@ -8670,6 +8671,7 @@ static int wpa_supplicant_driver_cmd(struct wpa_supplicant *wpa_s, char *cmd, if (os_snprintf_error(buflen, ret)) ret = -1; } +#endif /* CONFIG_P2P */ return ret; } #endif /* ANDROID */
Change-Id: I23bf35bfdcde47216655b33c8fae17dc358d83a4 Signed-off-by: Matthew Wang <matthewmwang@chromium.org> --- wpa_supplicant/ctrl_iface.c | 2 ++ 1 file changed, 2 insertions(+)