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>
This commit is contained in:
Kiran Divekar
2010-06-04 23:20:37 -07:00
committed by John W. Linville
parent e86dc1ca46
commit e4fe4eafa4
3 changed files with 15 additions and 28 deletions

View File

@@ -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);