diff options
author | Dmitry Shmidt <dimitrysh@google.com> | 2013-09-12 12:39:30 -0700 |
---|---|---|
committer | Dmitry Shmidt <dimitrysh@google.com> | 2013-09-12 12:39:30 -0700 |
commit | 9432e129bab61fa2bcd91efcf608abb0d0aec28e (patch) | |
tree | 9b728fc069b088370ad7e02b662feccae1884066 | |
parent | 51a47d533b6bf0efff06cc80195a588852a45058 (diff) | |
download | wpa_supplicant_8-9432e129bab61fa2bcd91efcf608abb0d0aec28e.tar.gz |
Android: P2P: Remember country locale
Bug: 10641114
Change-Id: Iab32a76b277cc8195f47a02fb8e6936ff2529aaa
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
-rw-r--r-- | wpa_supplicant/ctrl_iface.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index 8736b076..af57afaa 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -5150,8 +5150,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 = sprintf(buf, "%s\n", "OK"); + } return ret; } #endif |