diff options
author | Leo Kim | 2016-04-01 10:44:18 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2016-04-29 06:58:42 +0200 |
commit | 8006109ba0f9b85407ce41c86e7a9a059d08b90c (patch) | |
tree | 5bc3648c65a84fa4c09dc5fa9f1bf00a0921abe9 /drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | |
parent | staging: wilc1000: add set to null after release firmware (diff) | |
download | kernel-qcow2-linux-8006109ba0f9b85407ce41c86e7a9a059d08b90c.tar.gz kernel-qcow2-linux-8006109ba0f9b85407ce41c86e7a9a059d08b90c.tar.xz kernel-qcow2-linux-8006109ba0f9b85407ce41c86e7a9a059d08b90c.zip |
staging: wilc1000: adds a cfg80211_disconnected() function
This patch is adds a cfg80211_disconnected() when connection is lost already.
We was find this situation while test the 'rmmod sdio'.
SDIO remove function are include both remove mac_close and unregister net_device.
That is received one more a disconnect cmd from cfg80211.
Driver was already performed disconnect.
If wilc->close value was set to true, adds a call to cfg80211_disconnected().
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wilc1000/wilc_wfi_cfgoperations.c')
-rw-r--r-- | drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index 358632b9aa83..1ac835becc9d 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -819,11 +819,22 @@ static int disconnect(struct wiphy *wiphy, struct net_device *dev, u16 reason_co struct wilc_priv *priv; struct host_if_drv *pstrWFIDrv; struct wilc_vif *vif; + struct wilc *wilc; u8 NullBssid[ETH_ALEN] = {0}; wilc_connecting = 0; priv = wiphy_priv(wiphy); vif = netdev_priv(priv->dev); + wilc = vif->wilc; + + if (!wilc) + return -EIO; + + if (wilc->close) { + /* already disconnected done */ + cfg80211_disconnected(dev, 0, NULL, 0, true, GFP_KERNEL); + return 0; + } pstrWFIDrv = (struct host_if_drv *)priv->hif_drv; if (!pstrWFIDrv->p2p_connect) |