aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ctrl_iface.c
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2013-09-12 19:39:30 (GMT)
committerJouni Malinen <j@w1.fi>2013-11-22 18:23:16 (GMT)
commita94737ea38a44ba7c8d4e48dd824c67a5b70bee3 (patch)
treec785e9b7e51d76fd4091d412f79e51346983f488 /wpa_supplicant/ctrl_iface.c
parent5e2c3490d5a59b6a9aebb9a5d094318d6bc6b779 (diff)
downloadhostap-a94737ea38a44ba7c8d4e48dd824c67a5b70bee3.zip
hostap-a94737ea38a44ba7c8d4e48dd824c67a5b70bee3.tar.gz
hostap-a94737ea38a44ba7c8d4e48dd824c67a5b70bee3.tar.bz2
Android: P2P: Remember country locale
This updates P2P modules based on the Android specific DRIVER COUNTRY command. Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'wpa_supplicant/ctrl_iface.c')
-rw-r--r--wpa_supplicant/ctrl_iface.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index d5a77b4..a060477 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -5165,8 +5165,19 @@ 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);
- if (ret == 0)
+ if (ret == 0) {
+ if (os_strncasecmp(cmd, "COUNTRY", 7) == 0) {
+ struct p2p_data *p2p = wpa_s->global->p2p;
+ if (p2p) {
+ char country[3];
+ country[0] = cmd[8];
+ country[1] = cmd[9];
+ country[2] = 0x04;
+ p2p_set_country(p2p, country);
+ }
+ }
ret = os_snprintf(buf, buflen, "%s\n", "OK");
+ }
return ret;
}
#endif /* ANDROID */