diff options
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 1e6e0b0..db9d7dd 100644 --- a/bcmdhd/wpa_supplicant_8_lib/driver_cmd_nl80211.c +++ b/bcmdhd/wpa_supplicant_8_lib/driver_cmd_nl80211.c @@ -46,6 +46,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"); |