From: Johannes Berg Date: Tue, 13 Aug 2013 07:23:57 +0000 (+0200) Subject: cfg80211: don't request disconnect if not connected X-Git-Tag: v3.11-rc7~11^2~8^2^2^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dee8a9732e713480075adbbca8eb220c5b8d1216;p=pandora-kernel.git cfg80211: don't request disconnect if not connected Neil Brown reports that with libertas, my recent cfg80211 SME changes in commit ceca7b7121795ef81bd598a240d53a92566 ("cfg80211: separate internal SME implementation") broke libertas suspend because it we now asked it to disconnect while already disconnected. The problematic change is in cfg80211_disconnect() as it previously checked the SME state and now calls the driver disconnect operation unconditionally. Fix this by checking if there's a current_bss indicating a connection, and do nothing if not. Reported-and-tested-by: Neil Brown Signed-off-by: Johannes Berg --- Reading git-diff-tree failed