diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-02-19 20:42:32 +0100 |
---|---|---|
committer | Reinette Chatre <reinette.chatre@intel.com> | 2010-03-10 01:12:08 +0100 |
commit | 72e15d71b02a21fd7b94ee1af4ba3a41f722b1f3 (patch) | |
tree | 9e0435e3fba955ea598b637ac53fe8f0b879d22f /drivers/net/wireless/iwlwifi/iwl-agn.c | |
parent | iwlwifi: remove un-necessary parameters (diff) | |
download | linux-72e15d71b02a21fd7b94ee1af4ba3a41f722b1f3.tar.xz linux-72e15d71b02a21fd7b94ee1af4ba3a41f722b1f3.zip |
iwlwifi: change WEP key protection to use mutex
For later station notification support we would like WEP key setting to be
done synchronously always. Currently all places from which WEP key is set
can sleep, but the usage of sta_lock prevents it to do so. Modify the
locking to use priv->mutex instead and thus enable this call to sleep.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index bc84fd4a8d29..d6e1a059b9b0 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c @@ -2869,7 +2869,6 @@ static int iwl_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, mutex_lock(&priv->mutex); iwl_scan_cancel_timeout(priv, 100); - mutex_unlock(&priv->mutex); /* If we are getting WEP group key and we didn't receive any key mapping * so far, we are in legacy wep mode (group key only), otherwise we are @@ -2905,6 +2904,7 @@ static int iwl_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, ret = -EINVAL; } + mutex_unlock(&priv->mutex); IWL_DEBUG_MAC80211(priv, "leave\n"); return ret; |