diff options
author | Dmitry Shmidt <dimitrysh@google.com> | 2013-12-13 14:07:39 -0800 |
---|---|---|
committer | Dmitry Shmidt <dimitrysh@google.com> | 2013-12-16 16:30:14 -0800 |
commit | 48315aa9517619694d3d11760d8818b4fde1d1f8 (patch) | |
tree | 70e4a86a75ac8f19fe3a5afea1293d55a45685b9 /bcmdhd/wpa_supplicant_8_lib | |
parent | f80bcfb3f6c5231124c420ec3cff8d86d5497ec4 (diff) | |
download | hardware_broadcom_wlan-48315aa9517619694d3d11760d8818b4fde1d1f8.zip hardware_broadcom_wlan-48315aa9517619694d3d11760d8818b4fde1d1f8.tar.gz hardware_broadcom_wlan-48315aa9517619694d3d11760d8818b4fde1d1f8.tar.bz2 |
bcmdhd: Re-routing private command to parent interface (p2p->wlan0)
Change-Id: Ic86b5a66dbdaeb3fbd5f54599e0b1d396e6c9dff
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.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/bcmdhd/wpa_supplicant_8_lib/driver_cmd_nl80211.c b/bcmdhd/wpa_supplicant_8_lib/driver_cmd_nl80211.c index 29b9e12..5e1a2c6 100644 --- a/bcmdhd/wpa_supplicant_8_lib/driver_cmd_nl80211.c +++ b/bcmdhd/wpa_supplicant_8_lib/driver_cmd_nl80211.c @@ -45,6 +45,23 @@ int wpa_driver_nl80211_driver_cmd(void *priv, char *cmd, char *buf, android_wifi_priv_cmd priv_cmd; int ret = 0; + if (bss->ifindex <= 0 && bss->wdev_id > 0) { + /* DRIVER CMD received on the DEDICATED P2P Interface which doesn't + * have an NETDEVICE associated with it. So we have to re-route the + * command to the parent NETDEVICE + */ + struct wpa_supplicant *wpa_s = (struct wpa_supplicant *)(drv->ctx); + + wpa_printf(MSG_DEBUG, "Re-routing DRIVER cmd to parent iface"); + if (wpa_s && wpa_s->parent) { + /* Update the nl80211 pointers corresponding to parent iface */ + bss = wpa_s->parent->drv_priv; + drv = bss->drv; + wpa_printf(MSG_DEBUG, "Re-routing command to iface: %s" + " cmd (%s)", bss->ifname, cmd); + } + } + if (os_strcasecmp(cmd, "STOP") == 0) { linux_set_iface_flags(drv->global->ioctl_sock, bss->ifname, 0); wpa_msg(drv->ctx, MSG_INFO, WPA_EVENT_DRIVER_STATE "STOPPED"); |