summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-debugfs.c
diff options
context:
space:
mode:
authorReinette Chatre <reinette.chatre@intel.com>2010-01-21 11:52:28 -0800
committerReinette Chatre <reinette.chatre@intel.com>2010-01-29 11:13:59 -0800
commitd3a571971e5af241074947fc80f6284677f6e014 (patch)
treed01bb4af20ecfadf36626fb57f3d0918b9653d14 /drivers/net/wireless/iwlwifi/iwl-debugfs.c
parent7ae810776a51dc4dc6580013b0f6ba0f34d2b165 (diff)
downloadlinux-stable-d3a571971e5af241074947fc80f6284677f6e014.tar.gz
linux-stable-d3a571971e5af241074947fc80f6284677f6e014.tar.bz2
linux-stable-d3a571971e5af241074947fc80f6284677f6e014.zip
iwlwifi: iwl_power_update_mode always hold mutex
iwl_power_update_mode expects to be called with mutex held, for example to protect priv->vif. Only one caller currently does not do this, fix this. Also, add a comment to iwl_power_update_mode to indicate this requirement. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-debugfs.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-debugfs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
index 5c8377b9ad9b..d134301b553c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
@@ -815,7 +815,9 @@ static ssize_t iwl_dbgfs_sleep_level_override_write(struct file *file,
priv->power_data.debug_sleep_level_override = value;
+ mutex_lock(&priv->mutex);
iwl_power_update_mode(priv, true);
+ mutex_unlock(&priv->mutex);
return count;
}