]> git.baikalelectronics.ru Git - kernel.git/commit
cfg80211: don't request disconnect if not connected
authorJohannes Berg <johannes.berg@intel.com>
Tue, 13 Aug 2013 07:23:57 +0000 (09:23 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 14 Aug 2013 12:00:19 +0000 (14:00 +0200)
commit0b60a052d854b9f5578a4c6f9aff86c8c448f0c2
tree8b7513da02dde717462ae6ff94009c10f587d9c3
parent2c64764b169524d37ca6a2cf2ce6aa36a9c75bdd
cfg80211: don't request disconnect if not connected

Neil Brown reports that with libertas, my recent cfg80211
SME changes in commit 4e260138731d7ed20b11606a7392c6efe1b
("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 <neilb@suse.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/sme.c