diff options
author | Johannes Berg <johannes.berg@intel.com> | 2015-01-09 11:29:50 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2015-01-09 11:29:50 +0100 |
commit | a809ca5e03c6dd3b324d148564715ca5ea2b8103 (patch) | |
tree | c04db322a4035104f487660fb248dbf6376d6f8b /drivers/net/wireless/mac80211_hwsim.c | |
parent | 79c892b85027d5074dfa670dd451c14ee649fb88 (diff) | |
download | talos-op-linux-a809ca5e03c6dd3b324d148564715ca5ea2b8103.tar.gz talos-op-linux-a809ca5e03c6dd3b324d148564715ca5ea2b8103.zip |
mac80211_hwsim: fix PS debugfs file locking
The functions called within the iterators must be called with
tasklets disabled, so use atomic iteration like the rest of
the code and disable tasklets around the whole operation.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/mac80211_hwsim.c')
-rw-r--r-- | drivers/net/wireless/mac80211_hwsim.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 057a99e01637..74f4e1c18322 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c @@ -626,22 +626,22 @@ static int hwsim_fops_ps_write(void *dat, u64 val) old_ps = data->ps; data->ps = val; + local_bh_disable(); if (val == PS_MANUAL_POLL) { - ieee80211_iterate_active_interfaces(data->hw, - IEEE80211_IFACE_ITER_NORMAL, - hwsim_send_ps_poll, data); + ieee80211_iterate_active_interfaces_atomic( + data->hw, IEEE80211_IFACE_ITER_NORMAL, + hwsim_send_ps_poll, data); data->ps_poll_pending = true; } else if (old_ps == PS_DISABLED && val != PS_DISABLED) { - ieee80211_iterate_active_interfaces(data->hw, - IEEE80211_IFACE_ITER_NORMAL, - hwsim_send_nullfunc_ps, - data); + ieee80211_iterate_active_interfaces_atomic( + data->hw, IEEE80211_IFACE_ITER_NORMAL, + hwsim_send_nullfunc_ps, data); } else if (old_ps != PS_DISABLED && val == PS_DISABLED) { - ieee80211_iterate_active_interfaces(data->hw, - IEEE80211_IFACE_ITER_NORMAL, - hwsim_send_nullfunc_no_ps, - data); + ieee80211_iterate_active_interfaces_atomic( + data->hw, IEEE80211_IFACE_ITER_NORMAL, + hwsim_send_nullfunc_no_ps, data); } + local_bh_enable(); return 0; } |