Libertas: fix WARN_ON issues in cfg80211 support
authorKiran Divekar <dkiran@marvell.com>
Sat, 5 Jun 2010 06:20:37 +0000 (23:20 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 23 Jun 2010 19:13:59 +0000 (15:13 -0400)
commite4fe4eafa41cf951fb8fe2b9725ae84c599668d8
treecf943b3f3be3f70f74edad6923234d425ba59a8b
parente86dc1ca4676445d9f0dfe35104efe0eb8a2f566
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>
drivers/net/wireless/libertas/cfg.c
drivers/net/wireless/libertas/cmdresp.c
drivers/net/wireless/libertas/main.c