diff options
author | Kiran Divekar <dkiran@marvell.com> | 2010-06-05 08:20:37 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-06-23 21:13:59 +0200 |
commit | e4fe4eafa41cf951fb8fe2b9725ae84c599668d8 (patch) | |
tree | cf943b3f3be3f70f74edad6923234d425ba59a8b /drivers/net/wireless/libertas/cmdresp.c | |
parent | Libertas: cfg80211 support (diff) | |
download | linux-e4fe4eafa41cf951fb8fe2b9725ae84c599668d8.tar.xz linux-e4fe4eafa41cf951fb8fe2b9725ae84c599668d8.zip |
Libertas: fix WARN_ON issues in cfg80211 support
In following scenarios WARN_ON() in cfg80211 code was triggered.
a) Driver unload or card removal.
b) Disconnect from infra network
c) Adhoc start/join
d) Adhoc stop
Added following fixes to avoid WARN_ON() in cfg80211 code.
a) Ensured that cfg80211_disconnected() function defined in cfg80211
code will be called only in infra mode.
b) Solved timing issue by moving cfg80211_disconnected() call inside
lbs_cfg_disconnect().
c) Updated "wdev->ssid" in driver code after Adhoc join/start
d) Removed unnecessory cfg80211_disconnected() call in lbs_remove_card.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/cmdresp.c')
-rw-r--r-- | drivers/net/wireless/libertas/cmdresp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c index 9c18227ecc75..52b543c52a93 100644 --- a/drivers/net/wireless/libertas/cmdresp.c +++ b/drivers/net/wireless/libertas/cmdresp.c @@ -31,7 +31,9 @@ void lbs_mac_event_disconnected(struct lbs_private *priv) * It causes problem in the Supplicant */ msleep_interruptible(1000); - lbs_send_disconnect_notification(priv); + + if (priv->wdev->iftype == NL80211_IFTYPE_STATION) + lbs_send_disconnect_notification(priv); /* report disconnect to upper layer */ netif_stop_queue(priv->dev); |