summaryrefslogtreecommitdiffstats
path: root/bcmdhd/wpa_supplicant_8_lib
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2014-04-14 15:08:11 -0700
committerDmitry Shmidt <dimitrysh@google.com>2014-04-14 15:08:11 -0700
commit7b97ab89d6ebef136a2f88d804c2c462be005402 (patch)
treefe27c37e8be884e12709c06725cc00eb06dc5abf /bcmdhd/wpa_supplicant_8_lib
parent34f5614fa5bb35cf9fa814b21206d54d0a26ef06 (diff)
downloadhardware_broadcom_wlan-7b97ab89d6ebef136a2f88d804c2c462be005402.zip
hardware_broadcom_wlan-7b97ab89d6ebef136a2f88d804c2c462be005402.tar.gz
hardware_broadcom_wlan-7b97ab89d6ebef136a2f88d804c2c462be005402.tar.bz2
bcmdhd: Fix EVENT_CHANNEL_LIST_CHANGED message
Bug: 14061861 Change-Id: Ic8ccc52195b899d51a924871ecfedc48e299e16d Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'bcmdhd/wpa_supplicant_8_lib')
-rw-r--r--bcmdhd/wpa_supplicant_8_lib/driver_cmd_nl80211.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/bcmdhd/wpa_supplicant_8_lib/driver_cmd_nl80211.c b/bcmdhd/wpa_supplicant_8_lib/driver_cmd_nl80211.c
index b3ece47..064654e 100644
--- a/bcmdhd/wpa_supplicant_8_lib/driver_cmd_nl80211.c
+++ b/bcmdhd/wpa_supplicant_8_lib/driver_cmd_nl80211.c
@@ -41,6 +41,27 @@ static void wpa_driver_send_hang_msg(struct wpa_driver_nl80211_data *drv)
}
}
+static void wpa_driver_notify_country_change(void *ctx, char *cmd)
+{
+ if ((os_strncasecmp(cmd, "COUNTRY", 7) == 0) ||
+ (os_strncasecmp(cmd, "SETBAND", 7) == 0)) {
+ union wpa_event_data event;
+
+ os_memset(&event, 0, sizeof(event));
+ event.channel_list_changed.initiator = REGDOM_SET_BY_USER;
+ if (os_strncasecmp(cmd, "COUNTRY", 7) == 0) {
+ event.channel_list_changed.type = REGDOM_TYPE_COUNTRY;
+ if (os_strlen(cmd) > 9) {
+ event.channel_list_changed.alpha2[0] = cmd[8];
+ event.channel_list_changed.alpha2[1] = cmd[9];
+ }
+ } else {
+ event.channel_list_changed.type = REGDOM_TYPE_UNKNOWN;
+ }
+ wpa_supplicant_event(ctx, EVENT_CHANNEL_LIST_CHANGED, &event);
+ }
+}
+
int wpa_driver_nl80211_driver_cmd(void *priv, char *cmd, char *buf,
size_t buf_len )
{
@@ -106,10 +127,7 @@ int wpa_driver_nl80211_driver_cmd(void *priv, char *cmd, char *buf,
(os_strcasecmp(cmd, "GETBAND") == 0) ||
(os_strncasecmp(cmd, "WLS_BATCHING", 12) == 0))
ret = strlen(buf);
- else if ((os_strncasecmp(cmd, "COUNTRY", 7) == 0) ||
- (os_strncasecmp(cmd, "SETBAND", 7) == 0))
- wpa_supplicant_event(drv->ctx,
- EVENT_CHANNEL_LIST_CHANGED, NULL);
+ wpa_driver_notify_country_change(drv->ctx, cmd);
wpa_printf(MSG_DEBUG, "%s %s len = %d, %zu", __func__, buf, ret, strlen(buf));
}
}