diff options
author | Howard M. Harte <hharte@broadcom.com> | 2011-07-27 12:16:11 -0700 |
---|---|---|
committer | Dmitry Shmidt <dimitrysh@google.com> | 2011-07-29 16:05:15 -0700 |
commit | 3eb50e2dd03feebcd3a66eb7601f2af328b7bd9c (patch) | |
tree | 41a954f6ddaa9fe420efd7f412c25ad5b242df76 /drivers/net | |
parent | 4b05b77708b01dd4a335d1a77b753134ef3de2ef (diff) | |
download | kernel_samsung_crespo-3eb50e2dd03feebcd3a66eb7601f2af328b7bd9c.zip kernel_samsung_crespo-3eb50e2dd03feebcd3a66eb7601f2af328b7bd9c.tar.gz kernel_samsung_crespo-3eb50e2dd03feebcd3a66eb7601f2af328b7bd9c.tar.bz2 |
net: wireless: bcmdhd: change logic for removing monitor interace for P2P.
Change-Id: Ie757ec25c86d0402d0463a9b7f2fff14b840f446
Signed-off-by: Howard M. Harte <hharte@broadcom.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/bcmdhd/dhd_linux_mon.c | 13 | ||||
-rw-r--r-- | drivers/net/wireless/bcmdhd/wl_cfg80211.c | 7 |
2 files changed, 9 insertions, 11 deletions
diff --git a/drivers/net/wireless/bcmdhd/dhd_linux_mon.c b/drivers/net/wireless/bcmdhd/dhd_linux_mon.c index 25eba63..6c1ff4d 100644 --- a/drivers/net/wireless/bcmdhd/dhd_linux_mon.c +++ b/drivers/net/wireless/bcmdhd/dhd_linux_mon.c @@ -322,17 +322,17 @@ int dhd_del_monitor(struct net_device *ndev) return -EINVAL; mutex_lock(&g_monitor.lock); for (i = 0; i < DHD_MAX_IFS; i++) { - if (g_monitor.mon_if[i].mon_ndev == ndev) { + if (g_monitor.mon_if[i].mon_ndev == ndev || + g_monitor.mon_if[i].real_ndev == ndev) { g_monitor.mon_if[i].real_ndev = NULL; - g_monitor.mon_if[i].mon_ndev = NULL; if (rtnl_is_locked()) { rtnl_unlock(); rollback_lock = true; } - unregister_netdev(ndev); - free_netdev(ndev); + unregister_netdev(g_monitor.mon_if[i].mon_ndev); + free_netdev(g_monitor.mon_if[i].mon_ndev); + g_monitor.mon_if[i].mon_ndev = NULL; g_monitor.monitor_state = MONITOR_STATE_INTERFACE_DELETED; - ndev = NULL; break; } } @@ -341,7 +341,8 @@ int dhd_del_monitor(struct net_device *ndev) rollback_lock = false; } - if (ndev) + if (g_monitor.monitor_state != + MONITOR_STATE_INTERFACE_DELETED) MON_PRINT("interface not found in monitor IF array, is this a monitor IF? 0x%p\n", ndev); mutex_unlock(&g_monitor.lock); diff --git a/drivers/net/wireless/bcmdhd/wl_cfg80211.c b/drivers/net/wireless/bcmdhd/wl_cfg80211.c index 98c9ff6..cc5d86e 100644 --- a/drivers/net/wireless/bcmdhd/wl_cfg80211.c +++ b/drivers/net/wireless/bcmdhd/wl_cfg80211.c @@ -1005,10 +1005,7 @@ wl_cfg80211_del_virtual_iface(struct wiphy *wiphy, struct net_device *dev) struct wl_priv *wl = WL_PRIV_GET(); s32 timeout = -1; s32 ret = 0; - if (dev && dev->type == ARPHRD_IEEE80211_RADIOTAP) { - ret = dhd_del_monitor(dev); - goto exit; - } + if (wl->p2p_supported) { memcpy(p2p_mac.octet, wl->p2p->int_addr.octet, ETHER_ADDR_LEN); if (wl->p2p->vif_created) { @@ -1029,9 +1026,9 @@ wl_cfg80211_del_virtual_iface(struct wiphy *wiphy, struct net_device *dev) } else { WL_ERR(("IFDEL didn't complete properly")); } + ret = dhd_del_monitor(dev); } } -exit: return ret; } |