diff options
author | Johannes Berg <johannes.berg@intel.com> | 2015-06-23 17:47:05 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2015-07-17 15:38:26 +0200 |
commit | 33d8783c58427683b533664f67f8c4378ed64495 (patch) | |
tree | c85ca188c6028c484c7c95996e5de399f9ed09a4 /net/wireless/core.h | |
parent | 69f132236827ce7d4531846cc2b9447dd5620aff (diff) | |
download | op-kernel-dev-33d8783c58427683b533664f67f8c4378ed64495.zip op-kernel-dev-33d8783c58427683b533664f67f8c4378ed64495.tar.gz |
cfg80211: allow mgmt_frame_register callback to sleep
This callback is currently not allowed to sleep, which makes it more
difficult to implement proper driver methods in mac80211 than it has
to be. Instead of doing asynchronous work here in mac80211, make it
possible for the callback to sleep by doing some asynchronous work
in cfg80211. This also enables improvements to other drivers, like
ath6kl, that would like to sleep in this callback.
While at it, also fix the code to call the driver on the implicit
unregistration when an interface is removed, and do that also when
a P2P-Device wdev is destroyed (otherwise we leak the structs.)
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/core.h')
-rw-r--r-- | net/wireless/core.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/wireless/core.h b/net/wireless/core.h index 311eef2..b9d5bc8 100644 --- a/net/wireless/core.h +++ b/net/wireless/core.h @@ -59,6 +59,10 @@ struct cfg80211_registered_device { struct list_head beacon_registrations; spinlock_t beacon_registrations_lock; + struct list_head mlme_unreg; + spinlock_t mlme_unreg_lock; + struct work_struct mlme_unreg_wk; + /* protected by RTNL only */ int num_running_ifaces; int num_running_monitor_ifaces; @@ -348,6 +352,7 @@ void cfg80211_mlme_down(struct cfg80211_registered_device *rdev, int cfg80211_mlme_register_mgmt(struct wireless_dev *wdev, u32 snd_pid, u16 frame_type, const u8 *match_data, int match_len); +void cfg80211_mlme_unreg_wk(struct work_struct *wk); void cfg80211_mlme_unregister_socket(struct wireless_dev *wdev, u32 nlpid); void cfg80211_mlme_purge_registrations(struct wireless_dev *wdev); int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev, |