From: Avinash Patil Date: Sat, 12 Oct 2013 01:31:31 +0000 (-0700) Subject: mwifiex: inform cfg80211 about disconnect if device is removed X-Git-Tag: v3.12-rc7~20^2~20^2^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8041ceeded8a0f68cc0c75faf911e4369bba89f;p=pandora-kernel.git mwifiex: inform cfg80211 about disconnect if device is removed If device is surprise removed, commands sent to FW including deauthenticate command fail as bus writes fail. We update our media_connected status to false and inform cfg80211 about disconnection only when command is successful. Since cfg80211 assumes device is still connected, it results into following WARN_ON during unload: WARNING: CPU: 0 PID: 18245 at net/wireless/core.c:937 cfg80211_netdev_notifier_call+0x175/0x4d0 [cfg80211]() Avoid this by emitting cfg80211_disconnected event even if the deauthenticate command fails. Signed-off-by: Avinash Patil Signed-off-by: Bing Zhao Signed-off-by: John W. Linville --- Reading git-diff-tree failed