Johannes Berg c7c71066c2 mac80211: add ieee80211_iterate_active_interfaces_rtnl()
If it is needed to disconnect multiple virtual interfaces after
(WoWLAN-) suspend, the most obvious approach would be to iterate
all interfaces by calling ieee80211_iterate_active_interfaces()
and then call ieee80211_resume_disconnect() for each one. This
is what the iwlmvm driver does.

Unfortunately, this causes a locking dependency from mac80211's
iflist_mtx to the key_mtx. This is problematic as the former is
intentionally never held while calling any driver operation to
allow drivers to iterate with their own locks held. The key_mtx
is held while installing a key into the driver though, so this
new lock dependency means drivers implementing the logic above
can no longer hold their own lock while iterating.

To fix this, add a new ieee80211_iterate_active_interfaces_rtnl()
function that iterates while the RTNL is already held. This is
true during suspend/resume, so that then the locking dependency
isn't introduced.

While at it, also refactor the various interface iterators and
keep only a single implementation called by the various cases.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-09-26 13:21:37 +02:00
..
2011-07-08 11:11:24 -04:00
2011-07-08 11:11:20 -04:00
2013-02-04 18:57:47 +01:00
2013-07-16 09:57:57 +03:00
2013-02-21 12:05:51 -08:00
2013-02-04 18:57:47 +01:00
2013-02-15 15:46:37 +01:00
2011-03-31 11:26:23 -03:00
2012-06-24 11:33:18 +02:00
2013-06-13 11:58:47 +02:00
2012-03-13 14:54:16 -04:00
2013-02-04 18:57:47 +01:00
2012-06-20 17:35:22 +02:00