]> git.baikalelectronics.ru Git - kernel.git/commit
cfg80211: process events caused by suspend before suspending
authorJohannes Berg <johannes.berg@intel.com>
Wed, 26 Oct 2016 05:56:59 +0000 (07:56 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 26 Oct 2016 05:59:52 +0000 (07:59 +0200)
commitea182b4dd9c4837e69b41b6957aad79255fb31a5
treed059eed01943b33083d6313ec4ad4b2262f5c02c
parenta35e09deec35658eec20d4326dee9cc64c37f1b1
cfg80211: process events caused by suspend before suspending

When suspending without WoWLAN, cfg80211 will ask drivers to
disconnect. Even when the driver does this synchronously, and
immediately returns with a notification, cfg80211 schedules
the handling thereof to a workqueue, and may then call back
into the driver when the driver was already suspended/ing.

Fix this by processing all events caused by cfg80211_leave_all()
directly after that function returns. The driver still needs to
do the right thing here and wait for the firmware response, but
that is - at least - true for mwifiex where this occurred.

Reported-by: Amitkumar Karwar <akarwar@marvell.com>
Tested-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/sysfs.c