diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-03-06 16:30:42 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-03-07 13:51:49 -0500 |
commit | b1eea297d6b522b801c95b60b1e64fb61228c6c7 (patch) | |
tree | 20004f65acf9d342029900936fd04d67d90cb5ec /drivers/net/wireless/iwlwifi | |
parent | 2cc39c94c15ba1d5f6f71ab73f3369f9c17856ad (diff) |
iwlwifi: move mutex out of shared
Now the mutex no longer needs to be
shared, so move it into iwl_priv.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 20 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 20 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-sta.c | 18 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-tt.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 32 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debugfs.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-mac80211.c | 82 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-power.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-scan.c | 32 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-shared.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-testmode.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-ucode.c | 2 |
14 files changed, 122 insertions, 124 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c index 238f824c2f3e..90f1f8a506f2 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c | |||
@@ -246,7 +246,7 @@ int iwlagn_txfifo_flush(struct iwl_priv *priv, u16 flush_control) | |||
246 | 246 | ||
247 | void iwlagn_dev_txfifo_flush(struct iwl_priv *priv, u16 flush_control) | 247 | void iwlagn_dev_txfifo_flush(struct iwl_priv *priv, u16 flush_control) |
248 | { | 248 | { |
249 | mutex_lock(&priv->shrd->mutex); | 249 | mutex_lock(&priv->mutex); |
250 | ieee80211_stop_queues(priv->hw); | 250 | ieee80211_stop_queues(priv->hw); |
251 | if (iwlagn_txfifo_flush(priv, IWL_DROP_ALL)) { | 251 | if (iwlagn_txfifo_flush(priv, IWL_DROP_ALL)) { |
252 | IWL_ERR(priv, "flush request fail\n"); | 252 | IWL_ERR(priv, "flush request fail\n"); |
@@ -256,7 +256,7 @@ void iwlagn_dev_txfifo_flush(struct iwl_priv *priv, u16 flush_control) | |||
256 | iwl_trans_wait_tx_queue_empty(trans(priv)); | 256 | iwl_trans_wait_tx_queue_empty(trans(priv)); |
257 | done: | 257 | done: |
258 | ieee80211_wake_queues(priv->hw); | 258 | ieee80211_wake_queues(priv->hw); |
259 | mutex_unlock(&priv->shrd->mutex); | 259 | mutex_unlock(&priv->mutex); |
260 | } | 260 | } |
261 | 261 | ||
262 | /* | 262 | /* |
@@ -453,7 +453,7 @@ void iwlagn_bt_adjust_rssi_monitor(struct iwl_priv *priv, bool rssi_ena) | |||
453 | struct iwl_rxon_context *ctx, *found_ctx = NULL; | 453 | struct iwl_rxon_context *ctx, *found_ctx = NULL; |
454 | bool found_ap = false; | 454 | bool found_ap = false; |
455 | 455 | ||
456 | lockdep_assert_held(&priv->shrd->mutex); | 456 | lockdep_assert_held(&priv->mutex); |
457 | 457 | ||
458 | /* Check whether AP or GO mode is active. */ | 458 | /* Check whether AP or GO mode is active. */ |
459 | if (rssi_ena) { | 459 | if (rssi_ena) { |
@@ -566,7 +566,7 @@ static void iwlagn_bt_traffic_change_work(struct work_struct *work) | |||
566 | break; | 566 | break; |
567 | } | 567 | } |
568 | 568 | ||
569 | mutex_lock(&priv->shrd->mutex); | 569 | mutex_lock(&priv->mutex); |
570 | 570 | ||
571 | /* | 571 | /* |
572 | * We can not send command to firmware while scanning. When the scan | 572 | * We can not send command to firmware while scanning. When the scan |
@@ -594,7 +594,7 @@ static void iwlagn_bt_traffic_change_work(struct work_struct *work) | |||
594 | */ | 594 | */ |
595 | iwlagn_bt_coex_rssi_monitor(priv); | 595 | iwlagn_bt_coex_rssi_monitor(priv); |
596 | out: | 596 | out: |
597 | mutex_unlock(&priv->shrd->mutex); | 597 | mutex_unlock(&priv->mutex); |
598 | } | 598 | } |
599 | 599 | ||
600 | /* | 600 | /* |
@@ -969,7 +969,7 @@ static void iwlagn_wowlan_program_keys(struct ieee80211_hw *hw, | |||
969 | u16 p1k[IWLAGN_P1K_SIZE]; | 969 | u16 p1k[IWLAGN_P1K_SIZE]; |
970 | int ret, i; | 970 | int ret, i; |
971 | 971 | ||
972 | mutex_lock(&priv->shrd->mutex); | 972 | mutex_lock(&priv->mutex); |
973 | 973 | ||
974 | if ((key->cipher == WLAN_CIPHER_SUITE_WEP40 || | 974 | if ((key->cipher == WLAN_CIPHER_SUITE_WEP40 || |
975 | key->cipher == WLAN_CIPHER_SUITE_WEP104) && | 975 | key->cipher == WLAN_CIPHER_SUITE_WEP104) && |
@@ -1075,7 +1075,7 @@ static void iwlagn_wowlan_program_keys(struct ieee80211_hw *hw, | |||
1075 | break; | 1075 | break; |
1076 | } | 1076 | } |
1077 | 1077 | ||
1078 | mutex_unlock(&priv->shrd->mutex); | 1078 | mutex_unlock(&priv->mutex); |
1079 | } | 1079 | } |
1080 | 1080 | ||
1081 | int iwlagn_send_patterns(struct iwl_priv *priv, | 1081 | int iwlagn_send_patterns(struct iwl_priv *priv, |
@@ -1222,11 +1222,11 @@ int iwlagn_suspend(struct iwl_priv *priv, | |||
1222 | * constraints. Since we're in the suspend path | 1222 | * constraints. Since we're in the suspend path |
1223 | * that isn't really a problem though. | 1223 | * that isn't really a problem though. |
1224 | */ | 1224 | */ |
1225 | mutex_unlock(&priv->shrd->mutex); | 1225 | mutex_unlock(&priv->mutex); |
1226 | ieee80211_iter_keys(priv->hw, ctx->vif, | 1226 | ieee80211_iter_keys(priv->hw, ctx->vif, |
1227 | iwlagn_wowlan_program_keys, | 1227 | iwlagn_wowlan_program_keys, |
1228 | &key_data); | 1228 | &key_data); |
1229 | mutex_lock(&priv->shrd->mutex); | 1229 | mutex_lock(&priv->mutex); |
1230 | if (key_data.error) { | 1230 | if (key_data.error) { |
1231 | ret = -EIO; | 1231 | ret = -EIO; |
1232 | goto out; | 1232 | goto out; |
@@ -1304,7 +1304,7 @@ int iwl_dvm_send_cmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd) | |||
1304 | * (or more) synchronous commands at a time. | 1304 | * (or more) synchronous commands at a time. |
1305 | */ | 1305 | */ |
1306 | if (cmd->flags & CMD_SYNC) | 1306 | if (cmd->flags & CMD_SYNC) |
1307 | lockdep_assert_held(&priv->shrd->mutex); | 1307 | lockdep_assert_held(&priv->mutex); |
1308 | 1308 | ||
1309 | return iwl_trans_send_cmd(trans(priv), cmd); | 1309 | return iwl_trans_send_cmd(trans(priv), cmd); |
1310 | } | 1310 | } |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c index 53114db9c9c3..2c5e7ec697e9 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | |||
@@ -131,7 +131,7 @@ static void iwlagn_update_qos(struct iwl_priv *priv, | |||
131 | static int iwlagn_update_beacon(struct iwl_priv *priv, | 131 | static int iwlagn_update_beacon(struct iwl_priv *priv, |
132 | struct ieee80211_vif *vif) | 132 | struct ieee80211_vif *vif) |
133 | { | 133 | { |
134 | lockdep_assert_held(&priv->shrd->mutex); | 134 | lockdep_assert_held(&priv->mutex); |
135 | 135 | ||
136 | dev_kfree_skb(priv->beacon_skb); | 136 | dev_kfree_skb(priv->beacon_skb); |
137 | priv->beacon_skb = ieee80211_beacon_get(priv->hw, vif); | 137 | priv->beacon_skb = ieee80211_beacon_get(priv->hw, vif); |
@@ -313,7 +313,7 @@ int iwlagn_set_pan_params(struct iwl_priv *priv) | |||
313 | 313 | ||
314 | BUILD_BUG_ON(NUM_IWL_RXON_CTX != 2); | 314 | BUILD_BUG_ON(NUM_IWL_RXON_CTX != 2); |
315 | 315 | ||
316 | lockdep_assert_held(&priv->shrd->mutex); | 316 | lockdep_assert_held(&priv->mutex); |
317 | 317 | ||
318 | ctx_bss = &priv->contexts[IWL_RXON_CTX_BSS]; | 318 | ctx_bss = &priv->contexts[IWL_RXON_CTX_BSS]; |
319 | ctx_pan = &priv->contexts[IWL_RXON_CTX_PAN]; | 319 | ctx_pan = &priv->contexts[IWL_RXON_CTX_PAN]; |
@@ -418,7 +418,7 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx) | |||
418 | bool new_assoc = !!(ctx->staging.filter_flags & RXON_FILTER_ASSOC_MSK); | 418 | bool new_assoc = !!(ctx->staging.filter_flags & RXON_FILTER_ASSOC_MSK); |
419 | int ret; | 419 | int ret; |
420 | 420 | ||
421 | lockdep_assert_held(&priv->shrd->mutex); | 421 | lockdep_assert_held(&priv->mutex); |
422 | 422 | ||
423 | if (!iwl_is_alive(priv->shrd)) | 423 | if (!iwl_is_alive(priv->shrd)) |
424 | return -EBUSY; | 424 | return -EBUSY; |
@@ -549,7 +549,7 @@ int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
549 | 549 | ||
550 | IWL_DEBUG_MAC80211(priv, "enter: changed %#x", changed); | 550 | IWL_DEBUG_MAC80211(priv, "enter: changed %#x", changed); |
551 | 551 | ||
552 | mutex_lock(&priv->shrd->mutex); | 552 | mutex_lock(&priv->mutex); |
553 | 553 | ||
554 | if (unlikely(test_bit(STATUS_SCANNING, &priv->shrd->status))) { | 554 | if (unlikely(test_bit(STATUS_SCANNING, &priv->shrd->status))) { |
555 | IWL_DEBUG_MAC80211(priv, "leave - scanning\n"); | 555 | IWL_DEBUG_MAC80211(priv, "leave - scanning\n"); |
@@ -650,7 +650,7 @@ int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
650 | iwlagn_commit_rxon(priv, ctx); | 650 | iwlagn_commit_rxon(priv, ctx); |
651 | } | 651 | } |
652 | out: | 652 | out: |
653 | mutex_unlock(&priv->shrd->mutex); | 653 | mutex_unlock(&priv->mutex); |
654 | IWL_DEBUG_MAC80211(priv, "leave\n"); | 654 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
655 | 655 | ||
656 | return ret; | 656 | return ret; |
@@ -667,7 +667,7 @@ static void iwlagn_check_needed_chains(struct iwl_priv *priv, | |||
667 | struct ieee80211_sta_ht_cap *ht_cap; | 667 | struct ieee80211_sta_ht_cap *ht_cap; |
668 | bool need_multiple; | 668 | bool need_multiple; |
669 | 669 | ||
670 | lockdep_assert_held(&priv->shrd->mutex); | 670 | lockdep_assert_held(&priv->mutex); |
671 | 671 | ||
672 | switch (vif->type) { | 672 | switch (vif->type) { |
673 | case NL80211_IFTYPE_STATION: | 673 | case NL80211_IFTYPE_STATION: |
@@ -792,17 +792,17 @@ void iwlagn_bss_info_changed(struct ieee80211_hw *hw, | |||
792 | int ret; | 792 | int ret; |
793 | bool force = false; | 793 | bool force = false; |
794 | 794 | ||
795 | mutex_lock(&priv->shrd->mutex); | 795 | mutex_lock(&priv->mutex); |
796 | 796 | ||
797 | if (unlikely(!iwl_is_ready(priv->shrd))) { | 797 | if (unlikely(!iwl_is_ready(priv->shrd))) { |
798 | IWL_DEBUG_MAC80211(priv, "leave - not ready\n"); | 798 | IWL_DEBUG_MAC80211(priv, "leave - not ready\n"); |
799 | mutex_unlock(&priv->shrd->mutex); | 799 | mutex_unlock(&priv->mutex); |
800 | return; | 800 | return; |
801 | } | 801 | } |
802 | 802 | ||
803 | if (unlikely(!ctx->vif)) { | 803 | if (unlikely(!ctx->vif)) { |
804 | IWL_DEBUG_MAC80211(priv, "leave - vif is NULL\n"); | 804 | IWL_DEBUG_MAC80211(priv, "leave - vif is NULL\n"); |
805 | mutex_unlock(&priv->shrd->mutex); | 805 | mutex_unlock(&priv->mutex); |
806 | return; | 806 | return; |
807 | } | 807 | } |
808 | 808 | ||
@@ -931,7 +931,7 @@ void iwlagn_bss_info_changed(struct ieee80211_hw *hw, | |||
931 | IWL_ERR(priv, "Error sending IBSS beacon\n"); | 931 | IWL_ERR(priv, "Error sending IBSS beacon\n"); |
932 | } | 932 | } |
933 | 933 | ||
934 | mutex_unlock(&priv->shrd->mutex); | 934 | mutex_unlock(&priv->mutex); |
935 | } | 935 | } |
936 | 936 | ||
937 | void iwlagn_post_scan(struct iwl_priv *priv) | 937 | void iwlagn_post_scan(struct iwl_priv *priv) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c index 73a25f48cd53..14fbdecccd26 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c | |||
@@ -811,7 +811,7 @@ void iwl_sta_fill_lq(struct iwl_priv *priv, struct iwl_rxon_context *ctx, | |||
811 | u32 rate_flags = 0; | 811 | u32 rate_flags = 0; |
812 | __le32 rate_n_flags; | 812 | __le32 rate_n_flags; |
813 | 813 | ||
814 | lockdep_assert_held(&priv->shrd->mutex); | 814 | lockdep_assert_held(&priv->mutex); |
815 | 815 | ||
816 | memset(link_cmd, 0, sizeof(*link_cmd)); | 816 | memset(link_cmd, 0, sizeof(*link_cmd)); |
817 | 817 | ||
@@ -978,7 +978,7 @@ static int iwl_send_static_wepkey_cmd(struct iwl_priv *priv, | |||
978 | int iwl_restore_default_wep_keys(struct iwl_priv *priv, | 978 | int iwl_restore_default_wep_keys(struct iwl_priv *priv, |
979 | struct iwl_rxon_context *ctx) | 979 | struct iwl_rxon_context *ctx) |
980 | { | 980 | { |
981 | lockdep_assert_held(&priv->shrd->mutex); | 981 | lockdep_assert_held(&priv->mutex); |
982 | 982 | ||
983 | return iwl_send_static_wepkey_cmd(priv, ctx, false); | 983 | return iwl_send_static_wepkey_cmd(priv, ctx, false); |
984 | } | 984 | } |
@@ -989,7 +989,7 @@ int iwl_remove_default_wep_key(struct iwl_priv *priv, | |||
989 | { | 989 | { |
990 | int ret; | 990 | int ret; |
991 | 991 | ||
992 | lockdep_assert_held(&priv->shrd->mutex); | 992 | lockdep_assert_held(&priv->mutex); |
993 | 993 | ||
994 | IWL_DEBUG_WEP(priv, "Removing default WEP key: idx=%d\n", | 994 | IWL_DEBUG_WEP(priv, "Removing default WEP key: idx=%d\n", |
995 | keyconf->keyidx); | 995 | keyconf->keyidx); |
@@ -1014,7 +1014,7 @@ int iwl_set_default_wep_key(struct iwl_priv *priv, | |||
1014 | { | 1014 | { |
1015 | int ret; | 1015 | int ret; |
1016 | 1016 | ||
1017 | lockdep_assert_held(&priv->shrd->mutex); | 1017 | lockdep_assert_held(&priv->mutex); |
1018 | 1018 | ||
1019 | if (keyconf->keylen != WEP_KEY_LEN_128 && | 1019 | if (keyconf->keylen != WEP_KEY_LEN_128 && |
1020 | keyconf->keylen != WEP_KEY_LEN_64) { | 1020 | keyconf->keylen != WEP_KEY_LEN_64) { |
@@ -1166,7 +1166,7 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv, | |||
1166 | if (sta_id == IWL_INVALID_STATION) | 1166 | if (sta_id == IWL_INVALID_STATION) |
1167 | return 0; | 1167 | return 0; |
1168 | 1168 | ||
1169 | lockdep_assert_held(&priv->shrd->mutex); | 1169 | lockdep_assert_held(&priv->mutex); |
1170 | 1170 | ||
1171 | ctx->key_mapping_keys--; | 1171 | ctx->key_mapping_keys--; |
1172 | 1172 | ||
@@ -1206,7 +1206,7 @@ int iwl_set_dynamic_key(struct iwl_priv *priv, | |||
1206 | if (sta_id == IWL_INVALID_STATION) | 1206 | if (sta_id == IWL_INVALID_STATION) |
1207 | return -EINVAL; | 1207 | return -EINVAL; |
1208 | 1208 | ||
1209 | lockdep_assert_held(&priv->shrd->mutex); | 1209 | lockdep_assert_held(&priv->mutex); |
1210 | 1210 | ||
1211 | keyconf->hw_key_idx = iwl_get_free_ucode_key_offset(priv); | 1211 | keyconf->hw_key_idx = iwl_get_free_ucode_key_offset(priv); |
1212 | if (keyconf->hw_key_idx == WEP_INVALID_OFFSET) | 1212 | if (keyconf->hw_key_idx == WEP_INVALID_OFFSET) |
@@ -1340,7 +1340,7 @@ int iwl_sta_tx_modify_enable_tid(struct iwl_priv *priv, int sta_id, int tid) | |||
1340 | { | 1340 | { |
1341 | struct iwl_addsta_cmd sta_cmd; | 1341 | struct iwl_addsta_cmd sta_cmd; |
1342 | 1342 | ||
1343 | lockdep_assert_held(&priv->shrd->mutex); | 1343 | lockdep_assert_held(&priv->mutex); |
1344 | 1344 | ||
1345 | /* Remove "disable" flag, to enable Tx for this TID */ | 1345 | /* Remove "disable" flag, to enable Tx for this TID */ |
1346 | spin_lock_bh(&priv->sta_lock); | 1346 | spin_lock_bh(&priv->sta_lock); |
@@ -1359,7 +1359,7 @@ int iwl_sta_rx_agg_start(struct iwl_priv *priv, struct ieee80211_sta *sta, | |||
1359 | int sta_id; | 1359 | int sta_id; |
1360 | struct iwl_addsta_cmd sta_cmd; | 1360 | struct iwl_addsta_cmd sta_cmd; |
1361 | 1361 | ||
1362 | lockdep_assert_held(&priv->shrd->mutex); | 1362 | lockdep_assert_held(&priv->mutex); |
1363 | 1363 | ||
1364 | sta_id = iwl_sta_id(sta); | 1364 | sta_id = iwl_sta_id(sta); |
1365 | if (sta_id == IWL_INVALID_STATION) | 1365 | if (sta_id == IWL_INVALID_STATION) |
@@ -1383,7 +1383,7 @@ int iwl_sta_rx_agg_stop(struct iwl_priv *priv, struct ieee80211_sta *sta, | |||
1383 | int sta_id; | 1383 | int sta_id; |
1384 | struct iwl_addsta_cmd sta_cmd; | 1384 | struct iwl_addsta_cmd sta_cmd; |
1385 | 1385 | ||
1386 | lockdep_assert_held(&priv->shrd->mutex); | 1386 | lockdep_assert_held(&priv->mutex); |
1387 | 1387 | ||
1388 | sta_id = iwl_sta_id(sta); | 1388 | sta_id = iwl_sta_id(sta); |
1389 | if (sta_id == IWL_INVALID_STATION) { | 1389 | if (sta_id == IWL_INVALID_STATION) { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tt.c b/drivers/net/wireless/iwlwifi/iwl-agn-tt.c index 56d7c0e38163..85fe590ee721 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-tt.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-tt.c | |||
@@ -310,7 +310,7 @@ static void iwl_legacy_tt_handler(struct iwl_priv *priv, s32 temp, bool force) | |||
310 | tt->tt_power_mode = IWL_POWER_INDEX_5; | 310 | tt->tt_power_mode = IWL_POWER_INDEX_5; |
311 | break; | 311 | break; |
312 | } | 312 | } |
313 | mutex_lock(&priv->shrd->mutex); | 313 | mutex_lock(&priv->mutex); |
314 | if (old_state == IWL_TI_CT_KILL) | 314 | if (old_state == IWL_TI_CT_KILL) |
315 | clear_bit(STATUS_CT_KILL, &priv->shrd->status); | 315 | clear_bit(STATUS_CT_KILL, &priv->shrd->status); |
316 | if (tt->state != IWL_TI_CT_KILL && | 316 | if (tt->state != IWL_TI_CT_KILL && |
@@ -341,7 +341,7 @@ static void iwl_legacy_tt_handler(struct iwl_priv *priv, s32 temp, bool force) | |||
341 | IWL_DEBUG_TEMP(priv, "Power Index change to %u\n", | 341 | IWL_DEBUG_TEMP(priv, "Power Index change to %u\n", |
342 | tt->tt_power_mode); | 342 | tt->tt_power_mode); |
343 | } | 343 | } |
344 | mutex_unlock(&priv->shrd->mutex); | 344 | mutex_unlock(&priv->mutex); |
345 | } | 345 | } |
346 | } | 346 | } |
347 | 347 | ||
@@ -451,7 +451,7 @@ static void iwl_advance_tt_handler(struct iwl_priv *priv, s32 temp, bool force) | |||
451 | * in case get disabled before */ | 451 | * in case get disabled before */ |
452 | iwl_set_rxon_ht(priv, &priv->current_ht_config); | 452 | iwl_set_rxon_ht(priv, &priv->current_ht_config); |
453 | } | 453 | } |
454 | mutex_lock(&priv->shrd->mutex); | 454 | mutex_lock(&priv->mutex); |
455 | if (old_state == IWL_TI_CT_KILL) | 455 | if (old_state == IWL_TI_CT_KILL) |
456 | clear_bit(STATUS_CT_KILL, &priv->shrd->status); | 456 | clear_bit(STATUS_CT_KILL, &priv->shrd->status); |
457 | if (tt->state != IWL_TI_CT_KILL && | 457 | if (tt->state != IWL_TI_CT_KILL && |
@@ -486,7 +486,7 @@ static void iwl_advance_tt_handler(struct iwl_priv *priv, s32 temp, bool force) | |||
486 | iwl_perform_ct_kill_task(priv, false); | 486 | iwl_perform_ct_kill_task(priv, false); |
487 | } | 487 | } |
488 | } | 488 | } |
489 | mutex_unlock(&priv->shrd->mutex); | 489 | mutex_unlock(&priv->mutex); |
490 | } | 490 | } |
491 | } | 491 | } |
492 | 492 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 3f59a773b3e0..863c27e20dbc 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -132,7 +132,7 @@ int iwlagn_send_beacon_cmd(struct iwl_priv *priv) | |||
132 | * beacon contents. | 132 | * beacon contents. |
133 | */ | 133 | */ |
134 | 134 | ||
135 | lockdep_assert_held(&priv->shrd->mutex); | 135 | lockdep_assert_held(&priv->mutex); |
136 | 136 | ||
137 | if (!priv->beacon_ctx) { | 137 | if (!priv->beacon_ctx) { |
138 | IWL_ERR(priv, "trying to build beacon w/o beacon context!\n"); | 138 | IWL_ERR(priv, "trying to build beacon w/o beacon context!\n"); |
@@ -206,7 +206,7 @@ static void iwl_bg_beacon_update(struct work_struct *work) | |||
206 | container_of(work, struct iwl_priv, beacon_update); | 206 | container_of(work, struct iwl_priv, beacon_update); |
207 | struct sk_buff *beacon; | 207 | struct sk_buff *beacon; |
208 | 208 | ||
209 | mutex_lock(&priv->shrd->mutex); | 209 | mutex_lock(&priv->mutex); |
210 | if (!priv->beacon_ctx) { | 210 | if (!priv->beacon_ctx) { |
211 | IWL_ERR(priv, "updating beacon w/o beacon context!\n"); | 211 | IWL_ERR(priv, "updating beacon w/o beacon context!\n"); |
212 | goto out; | 212 | goto out; |
@@ -236,7 +236,7 @@ static void iwl_bg_beacon_update(struct work_struct *work) | |||
236 | 236 | ||
237 | iwlagn_send_beacon_cmd(priv); | 237 | iwlagn_send_beacon_cmd(priv); |
238 | out: | 238 | out: |
239 | mutex_unlock(&priv->shrd->mutex); | 239 | mutex_unlock(&priv->mutex); |
240 | } | 240 | } |
241 | 241 | ||
242 | static void iwl_bg_bt_runtime_config(struct work_struct *work) | 242 | static void iwl_bg_bt_runtime_config(struct work_struct *work) |
@@ -259,7 +259,7 @@ static void iwl_bg_bt_full_concurrency(struct work_struct *work) | |||
259 | container_of(work, struct iwl_priv, bt_full_concurrency); | 259 | container_of(work, struct iwl_priv, bt_full_concurrency); |
260 | struct iwl_rxon_context *ctx; | 260 | struct iwl_rxon_context *ctx; |
261 | 261 | ||
262 | mutex_lock(&priv->shrd->mutex); | 262 | mutex_lock(&priv->mutex); |
263 | 263 | ||
264 | if (test_bit(STATUS_EXIT_PENDING, &priv->shrd->status)) | 264 | if (test_bit(STATUS_EXIT_PENDING, &priv->shrd->status)) |
265 | goto out; | 265 | goto out; |
@@ -283,7 +283,7 @@ static void iwl_bg_bt_full_concurrency(struct work_struct *work) | |||
283 | 283 | ||
284 | iwlagn_send_advance_bt_config(priv); | 284 | iwlagn_send_advance_bt_config(priv); |
285 | out: | 285 | out: |
286 | mutex_unlock(&priv->shrd->mutex); | 286 | mutex_unlock(&priv->mutex); |
287 | } | 287 | } |
288 | 288 | ||
289 | /** | 289 | /** |
@@ -774,7 +774,7 @@ void iwl_down(struct iwl_priv *priv) | |||
774 | 774 | ||
775 | IWL_DEBUG_INFO(priv, DRV_NAME " is going down\n"); | 775 | IWL_DEBUG_INFO(priv, DRV_NAME " is going down\n"); |
776 | 776 | ||
777 | lockdep_assert_held(&priv->shrd->mutex); | 777 | lockdep_assert_held(&priv->mutex); |
778 | 778 | ||
779 | iwl_scan_cancel_timeout(priv, 200); | 779 | iwl_scan_cancel_timeout(priv, 200); |
780 | 780 | ||
@@ -844,11 +844,11 @@ static void iwl_bg_run_time_calib_work(struct work_struct *work) | |||
844 | struct iwl_priv *priv = container_of(work, struct iwl_priv, | 844 | struct iwl_priv *priv = container_of(work, struct iwl_priv, |
845 | run_time_calib_work); | 845 | run_time_calib_work); |
846 | 846 | ||
847 | mutex_lock(&priv->shrd->mutex); | 847 | mutex_lock(&priv->mutex); |
848 | 848 | ||
849 | if (test_bit(STATUS_EXIT_PENDING, &priv->shrd->status) || | 849 | if (test_bit(STATUS_EXIT_PENDING, &priv->shrd->status) || |
850 | test_bit(STATUS_SCANNING, &priv->shrd->status)) { | 850 | test_bit(STATUS_SCANNING, &priv->shrd->status)) { |
851 | mutex_unlock(&priv->shrd->mutex); | 851 | mutex_unlock(&priv->mutex); |
852 | return; | 852 | return; |
853 | } | 853 | } |
854 | 854 | ||
@@ -857,7 +857,7 @@ static void iwl_bg_run_time_calib_work(struct work_struct *work) | |||
857 | iwl_sensitivity_calibration(priv); | 857 | iwl_sensitivity_calibration(priv); |
858 | } | 858 | } |
859 | 859 | ||
860 | mutex_unlock(&priv->shrd->mutex); | 860 | mutex_unlock(&priv->mutex); |
861 | } | 861 | } |
862 | 862 | ||
863 | void iwlagn_prepare_restart(struct iwl_priv *priv) | 863 | void iwlagn_prepare_restart(struct iwl_priv *priv) |
@@ -869,7 +869,7 @@ void iwlagn_prepare_restart(struct iwl_priv *priv) | |||
869 | u8 bt_status; | 869 | u8 bt_status; |
870 | bool bt_is_sco; | 870 | bool bt_is_sco; |
871 | 871 | ||
872 | lockdep_assert_held(&priv->shrd->mutex); | 872 | lockdep_assert_held(&priv->mutex); |
873 | 873 | ||
874 | for_each_context(priv, ctx) | 874 | for_each_context(priv, ctx) |
875 | ctx->vif = NULL; | 875 | ctx->vif = NULL; |
@@ -907,9 +907,9 @@ static void iwl_bg_restart(struct work_struct *data) | |||
907 | return; | 907 | return; |
908 | 908 | ||
909 | if (test_and_clear_bit(STATUS_FW_ERROR, &priv->shrd->status)) { | 909 | if (test_and_clear_bit(STATUS_FW_ERROR, &priv->shrd->status)) { |
910 | mutex_lock(&priv->shrd->mutex); | 910 | mutex_lock(&priv->mutex); |
911 | iwlagn_prepare_restart(priv); | 911 | iwlagn_prepare_restart(priv); |
912 | mutex_unlock(&priv->shrd->mutex); | 912 | mutex_unlock(&priv->mutex); |
913 | iwl_cancel_deferred_work(priv); | 913 | iwl_cancel_deferred_work(priv); |
914 | ieee80211_restart_hw(priv->hw); | 914 | ieee80211_restart_hw(priv->hw); |
915 | } else { | 915 | } else { |
@@ -924,7 +924,7 @@ void iwlagn_disable_roc(struct iwl_priv *priv) | |||
924 | { | 924 | { |
925 | struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_PAN]; | 925 | struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_PAN]; |
926 | 926 | ||
927 | lockdep_assert_held(&priv->shrd->mutex); | 927 | lockdep_assert_held(&priv->mutex); |
928 | 928 | ||
929 | if (!priv->hw_roc_setup) | 929 | if (!priv->hw_roc_setup) |
930 | return; | 930 | return; |
@@ -947,9 +947,9 @@ static void iwlagn_disable_roc_work(struct work_struct *work) | |||
947 | struct iwl_priv *priv = container_of(work, struct iwl_priv, | 947 | struct iwl_priv *priv = container_of(work, struct iwl_priv, |
948 | hw_roc_disable_work.work); | 948 | hw_roc_disable_work.work); |
949 | 949 | ||
950 | mutex_lock(&priv->shrd->mutex); | 950 | mutex_lock(&priv->mutex); |
951 | iwlagn_disable_roc(priv); | 951 | iwlagn_disable_roc(priv); |
952 | mutex_unlock(&priv->shrd->mutex); | 952 | mutex_unlock(&priv->mutex); |
953 | } | 953 | } |
954 | 954 | ||
955 | /***************************************************************************** | 955 | /***************************************************************************** |
@@ -1036,7 +1036,7 @@ static int iwl_init_drv(struct iwl_priv *priv) | |||
1036 | 1036 | ||
1037 | spin_lock_init(&priv->sta_lock); | 1037 | spin_lock_init(&priv->sta_lock); |
1038 | 1038 | ||
1039 | mutex_init(&priv->shrd->mutex); | 1039 | mutex_init(&priv->mutex); |
1040 | 1040 | ||
1041 | INIT_LIST_HEAD(&priv->calib_results); | 1041 | INIT_LIST_HEAD(&priv->calib_results); |
1042 | 1042 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index aaea51ee4185..387eeeedb41d 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -316,7 +316,7 @@ int iwl_send_rxon_timing(struct iwl_priv *priv, struct iwl_rxon_context *ctx) | |||
316 | 316 | ||
317 | conf = &priv->hw->conf; | 317 | conf = &priv->hw->conf; |
318 | 318 | ||
319 | lockdep_assert_held(&priv->shrd->mutex); | 319 | lockdep_assert_held(&priv->mutex); |
320 | 320 | ||
321 | memset(&ctx->timing, 0, sizeof(struct iwl_rxon_time_cmd)); | 321 | memset(&ctx->timing, 0, sizeof(struct iwl_rxon_time_cmd)); |
322 | 322 | ||
@@ -892,7 +892,7 @@ int iwl_set_tx_power(struct iwl_priv *priv, s8 tx_power, bool force) | |||
892 | bool defer; | 892 | bool defer; |
893 | struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS]; | 893 | struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS]; |
894 | 894 | ||
895 | lockdep_assert_held(&priv->shrd->mutex); | 895 | lockdep_assert_held(&priv->mutex); |
896 | 896 | ||
897 | if (priv->tx_power_user_lmt == tx_power && !force) | 897 | if (priv->tx_power_user_lmt == tx_power && !force) |
898 | return 0; | 898 | return 0; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c index bc3e267ed4c0..b9b6d628f59a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c +++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c | |||
@@ -761,9 +761,9 @@ static ssize_t iwl_dbgfs_sleep_level_override_write(struct file *file, | |||
761 | 761 | ||
762 | priv->power_data.debug_sleep_level_override = value; | 762 | priv->power_data.debug_sleep_level_override = value; |
763 | 763 | ||
764 | mutex_lock(&priv->shrd->mutex); | 764 | mutex_lock(&priv->mutex); |
765 | iwl_power_update_mode(priv, true); | 765 | iwl_power_update_mode(priv, true); |
766 | mutex_unlock(&priv->shrd->mutex); | 766 | mutex_unlock(&priv->mutex); |
767 | 767 | ||
768 | return count; | 768 | return count; |
769 | } | 769 | } |
@@ -1708,9 +1708,9 @@ static ssize_t iwl_dbgfs_ucode_bt_stats_read(struct file *file, | |||
1708 | return -EINVAL; | 1708 | return -EINVAL; |
1709 | 1709 | ||
1710 | /* make request to uCode to retrieve statistics information */ | 1710 | /* make request to uCode to retrieve statistics information */ |
1711 | mutex_lock(&priv->shrd->mutex); | 1711 | mutex_lock(&priv->mutex); |
1712 | ret = iwl_send_statistics_request(priv, CMD_SYNC, false); | 1712 | ret = iwl_send_statistics_request(priv, CMD_SYNC, false); |
1713 | mutex_unlock(&priv->shrd->mutex); | 1713 | mutex_unlock(&priv->mutex); |
1714 | 1714 | ||
1715 | if (ret) { | 1715 | if (ret) { |
1716 | IWL_ERR(priv, | 1716 | IWL_ERR(priv, |
@@ -2106,9 +2106,9 @@ static ssize_t iwl_dbgfs_clear_ucode_statistics_write(struct file *file, | |||
2106 | return -EFAULT; | 2106 | return -EFAULT; |
2107 | 2107 | ||
2108 | /* make request to uCode to retrieve statistics information */ | 2108 | /* make request to uCode to retrieve statistics information */ |
2109 | mutex_lock(&priv->shrd->mutex); | 2109 | mutex_lock(&priv->mutex); |
2110 | iwl_send_statistics_request(priv, CMD_SYNC, true); | 2110 | iwl_send_statistics_request(priv, CMD_SYNC, true); |
2111 | mutex_unlock(&priv->shrd->mutex); | 2111 | mutex_unlock(&priv->mutex); |
2112 | 2112 | ||
2113 | return count; | 2113 | return count; |
2114 | } | 2114 | } |
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index 4def9f961891..73acbab6c248 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/wait.h> | 36 | #include <linux/wait.h> |
37 | #include <linux/leds.h> | 37 | #include <linux/leds.h> |
38 | #include <linux/slab.h> | 38 | #include <linux/slab.h> |
39 | #include <linux/mutex.h> | ||
39 | #include <net/ieee80211_radiotap.h> | 40 | #include <net/ieee80211_radiotap.h> |
40 | 41 | ||
41 | #include "iwl-eeprom.h" | 42 | #include "iwl-eeprom.h" |
@@ -718,6 +719,7 @@ struct iwl_priv { | |||
718 | const struct iwl_fw *fw; | 719 | const struct iwl_fw *fw; |
719 | 720 | ||
720 | spinlock_t sta_lock; | 721 | spinlock_t sta_lock; |
722 | struct mutex mutex; | ||
721 | 723 | ||
722 | /* ieee device used by generic ieee processing code */ | 724 | /* ieee device used by generic ieee processing code */ |
723 | struct ieee80211_hw *hw; | 725 | struct ieee80211_hw *hw; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-mac80211.c b/drivers/net/wireless/iwlwifi/iwl-mac80211.c index 3c9a8faba4e6..30861765b512 100644 --- a/drivers/net/wireless/iwlwifi/iwl-mac80211.c +++ b/drivers/net/wireless/iwlwifi/iwl-mac80211.c | |||
@@ -261,7 +261,7 @@ static int __iwl_up(struct iwl_priv *priv) | |||
261 | struct iwl_rxon_context *ctx; | 261 | struct iwl_rxon_context *ctx; |
262 | int ret; | 262 | int ret; |
263 | 263 | ||
264 | lockdep_assert_held(&priv->shrd->mutex); | 264 | lockdep_assert_held(&priv->mutex); |
265 | 265 | ||
266 | if (test_bit(STATUS_EXIT_PENDING, &priv->shrd->status)) { | 266 | if (test_bit(STATUS_EXIT_PENDING, &priv->shrd->status)) { |
267 | IWL_WARN(priv, "Exit pending; will not bring the NIC up\n"); | 267 | IWL_WARN(priv, "Exit pending; will not bring the NIC up\n"); |
@@ -310,9 +310,9 @@ static int iwlagn_mac_start(struct ieee80211_hw *hw) | |||
310 | IWL_DEBUG_MAC80211(priv, "enter\n"); | 310 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
311 | 311 | ||
312 | /* we should be verifying the device is ready to be opened */ | 312 | /* we should be verifying the device is ready to be opened */ |
313 | mutex_lock(&priv->shrd->mutex); | 313 | mutex_lock(&priv->mutex); |
314 | ret = __iwl_up(priv); | 314 | ret = __iwl_up(priv); |
315 | mutex_unlock(&priv->shrd->mutex); | 315 | mutex_unlock(&priv->mutex); |
316 | if (ret) | 316 | if (ret) |
317 | return ret; | 317 | return ret; |
318 | 318 | ||
@@ -340,9 +340,9 @@ static void iwlagn_mac_stop(struct ieee80211_hw *hw) | |||
340 | 340 | ||
341 | priv->is_open = 0; | 341 | priv->is_open = 0; |
342 | 342 | ||
343 | mutex_lock(&priv->shrd->mutex); | 343 | mutex_lock(&priv->mutex); |
344 | iwl_down(priv); | 344 | iwl_down(priv); |
345 | mutex_unlock(&priv->shrd->mutex); | 345 | mutex_unlock(&priv->mutex); |
346 | 346 | ||
347 | iwl_cancel_deferred_work(priv); | 347 | iwl_cancel_deferred_work(priv); |
348 | 348 | ||
@@ -367,7 +367,7 @@ static void iwlagn_mac_set_rekey_data(struct ieee80211_hw *hw, | |||
367 | return; | 367 | return; |
368 | 368 | ||
369 | IWL_DEBUG_MAC80211(priv, "enter\n"); | 369 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
370 | mutex_lock(&priv->shrd->mutex); | 370 | mutex_lock(&priv->mutex); |
371 | 371 | ||
372 | if (priv->contexts[IWL_RXON_CTX_BSS].vif != vif) | 372 | if (priv->contexts[IWL_RXON_CTX_BSS].vif != vif) |
373 | goto out; | 373 | goto out; |
@@ -379,7 +379,7 @@ static void iwlagn_mac_set_rekey_data(struct ieee80211_hw *hw, | |||
379 | priv->have_rekey_data = true; | 379 | priv->have_rekey_data = true; |
380 | 380 | ||
381 | out: | 381 | out: |
382 | mutex_unlock(&priv->shrd->mutex); | 382 | mutex_unlock(&priv->mutex); |
383 | IWL_DEBUG_MAC80211(priv, "leave\n"); | 383 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
384 | } | 384 | } |
385 | 385 | ||
@@ -396,7 +396,7 @@ static int iwlagn_mac_suspend(struct ieee80211_hw *hw, | |||
396 | return -EINVAL; | 396 | return -EINVAL; |
397 | 397 | ||
398 | IWL_DEBUG_MAC80211(priv, "enter\n"); | 398 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
399 | mutex_lock(&priv->shrd->mutex); | 399 | mutex_lock(&priv->mutex); |
400 | 400 | ||
401 | /* Don't attempt WoWLAN when not associated, tear down instead. */ | 401 | /* Don't attempt WoWLAN when not associated, tear down instead. */ |
402 | if (!ctx->vif || ctx->vif->type != NL80211_IFTYPE_STATION || | 402 | if (!ctx->vif || ctx->vif->type != NL80211_IFTYPE_STATION || |
@@ -420,7 +420,7 @@ static int iwlagn_mac_suspend(struct ieee80211_hw *hw, | |||
420 | iwlagn_prepare_restart(priv); | 420 | iwlagn_prepare_restart(priv); |
421 | ieee80211_restart_hw(priv->hw); | 421 | ieee80211_restart_hw(priv->hw); |
422 | out: | 422 | out: |
423 | mutex_unlock(&priv->shrd->mutex); | 423 | mutex_unlock(&priv->mutex); |
424 | IWL_DEBUG_MAC80211(priv, "leave\n"); | 424 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
425 | 425 | ||
426 | return ret; | 426 | return ret; |
@@ -436,7 +436,7 @@ static int iwlagn_mac_resume(struct ieee80211_hw *hw) | |||
436 | int ret = -EIO; | 436 | int ret = -EIO; |
437 | 437 | ||
438 | IWL_DEBUG_MAC80211(priv, "enter\n"); | 438 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
439 | mutex_lock(&priv->shrd->mutex); | 439 | mutex_lock(&priv->mutex); |
440 | 440 | ||
441 | iwl_write32(trans(priv), CSR_UCODE_DRV_GP1_CLR, | 441 | iwl_write32(trans(priv), CSR_UCODE_DRV_GP1_CLR, |
442 | CSR_UCODE_DRV_GP1_BIT_D3_CFG_COMPLETE); | 442 | CSR_UCODE_DRV_GP1_BIT_D3_CFG_COMPLETE); |
@@ -481,7 +481,7 @@ static int iwlagn_mac_resume(struct ieee80211_hw *hw) | |||
481 | iwl_connection_init_rx_config(priv, ctx); | 481 | iwl_connection_init_rx_config(priv, ctx); |
482 | iwlagn_set_rxon_chain(priv, ctx); | 482 | iwlagn_set_rxon_chain(priv, ctx); |
483 | 483 | ||
484 | mutex_unlock(&priv->shrd->mutex); | 484 | mutex_unlock(&priv->mutex); |
485 | IWL_DEBUG_MAC80211(priv, "leave\n"); | 485 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
486 | 486 | ||
487 | ieee80211_resume_disconnect(vif); | 487 | ieee80211_resume_disconnect(vif); |
@@ -559,7 +559,7 @@ static int iwlagn_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
559 | if (cmd == DISABLE_KEY && key->hw_key_idx == WEP_INVALID_OFFSET) | 559 | if (cmd == DISABLE_KEY && key->hw_key_idx == WEP_INVALID_OFFSET) |
560 | return 0; | 560 | return 0; |
561 | 561 | ||
562 | mutex_lock(&priv->shrd->mutex); | 562 | mutex_lock(&priv->mutex); |
563 | iwl_scan_cancel_timeout(priv, 100); | 563 | iwl_scan_cancel_timeout(priv, 100); |
564 | 564 | ||
565 | BUILD_BUG_ON(WEP_INVALID_OFFSET == IWLAGN_HW_KEY_DEFAULT); | 565 | BUILD_BUG_ON(WEP_INVALID_OFFSET == IWLAGN_HW_KEY_DEFAULT); |
@@ -610,7 +610,7 @@ static int iwlagn_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
610 | ret = -EINVAL; | 610 | ret = -EINVAL; |
611 | } | 611 | } |
612 | 612 | ||
613 | mutex_unlock(&priv->shrd->mutex); | 613 | mutex_unlock(&priv->mutex); |
614 | IWL_DEBUG_MAC80211(priv, "leave\n"); | 614 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
615 | 615 | ||
616 | return ret; | 616 | return ret; |
@@ -633,7 +633,7 @@ static int iwlagn_mac_ampdu_action(struct ieee80211_hw *hw, | |||
633 | return -EACCES; | 633 | return -EACCES; |
634 | 634 | ||
635 | IWL_DEBUG_MAC80211(priv, "enter\n"); | 635 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
636 | mutex_lock(&priv->shrd->mutex); | 636 | mutex_lock(&priv->mutex); |
637 | 637 | ||
638 | switch (action) { | 638 | switch (action) { |
639 | case IEEE80211_AMPDU_RX_START: | 639 | case IEEE80211_AMPDU_RX_START: |
@@ -675,7 +675,7 @@ static int iwlagn_mac_ampdu_action(struct ieee80211_hw *hw, | |||
675 | ret = iwlagn_tx_agg_oper(priv, vif, sta, tid, buf_size); | 675 | ret = iwlagn_tx_agg_oper(priv, vif, sta, tid, buf_size); |
676 | break; | 676 | break; |
677 | } | 677 | } |
678 | mutex_unlock(&priv->shrd->mutex); | 678 | mutex_unlock(&priv->mutex); |
679 | IWL_DEBUG_MAC80211(priv, "leave\n"); | 679 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
680 | return ret; | 680 | return ret; |
681 | } | 681 | } |
@@ -746,7 +746,7 @@ static int iwlagn_mac_sta_state(struct ieee80211_hw *hw, | |||
746 | IWL_DEBUG_MAC80211(priv, "station %pM state change %d->%d\n", | 746 | IWL_DEBUG_MAC80211(priv, "station %pM state change %d->%d\n", |
747 | sta->addr, old_state, new_state); | 747 | sta->addr, old_state, new_state); |
748 | 748 | ||
749 | mutex_lock(&priv->shrd->mutex); | 749 | mutex_lock(&priv->mutex); |
750 | if (vif->type == NL80211_IFTYPE_STATION) { | 750 | if (vif->type == NL80211_IFTYPE_STATION) { |
751 | if (old_state == IEEE80211_STA_NOTEXIST && | 751 | if (old_state == IEEE80211_STA_NOTEXIST && |
752 | new_state == IEEE80211_STA_NONE) | 752 | new_state == IEEE80211_STA_NONE) |
@@ -807,7 +807,7 @@ static int iwlagn_mac_sta_state(struct ieee80211_hw *hw, | |||
807 | if (iwl_is_rfkill(priv->shrd)) | 807 | if (iwl_is_rfkill(priv->shrd)) |
808 | ret = 0; | 808 | ret = 0; |
809 | 809 | ||
810 | mutex_unlock(&priv->shrd->mutex); | 810 | mutex_unlock(&priv->mutex); |
811 | IWL_DEBUG_MAC80211(priv, "leave\n"); | 811 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
812 | 812 | ||
813 | return ret; | 813 | return ret; |
@@ -834,7 +834,7 @@ static void iwlagn_mac_channel_switch(struct ieee80211_hw *hw, | |||
834 | 834 | ||
835 | IWL_DEBUG_MAC80211(priv, "enter\n"); | 835 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
836 | 836 | ||
837 | mutex_lock(&priv->shrd->mutex); | 837 | mutex_lock(&priv->mutex); |
838 | 838 | ||
839 | if (iwl_is_rfkill(priv->shrd)) | 839 | if (iwl_is_rfkill(priv->shrd)) |
840 | goto out; | 840 | goto out; |
@@ -890,7 +890,7 @@ static void iwlagn_mac_channel_switch(struct ieee80211_hw *hw, | |||
890 | } | 890 | } |
891 | 891 | ||
892 | out: | 892 | out: |
893 | mutex_unlock(&priv->shrd->mutex); | 893 | mutex_unlock(&priv->mutex); |
894 | IWL_DEBUG_MAC80211(priv, "leave\n"); | 894 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
895 | } | 895 | } |
896 | 896 | ||
@@ -920,7 +920,7 @@ static void iwlagn_configure_filter(struct ieee80211_hw *hw, | |||
920 | 920 | ||
921 | #undef CHK | 921 | #undef CHK |
922 | 922 | ||
923 | mutex_lock(&priv->shrd->mutex); | 923 | mutex_lock(&priv->mutex); |
924 | 924 | ||
925 | for_each_context(priv, ctx) { | 925 | for_each_context(priv, ctx) { |
926 | ctx->staging.filter_flags &= ~filter_nand; | 926 | ctx->staging.filter_flags &= ~filter_nand; |
@@ -932,7 +932,7 @@ static void iwlagn_configure_filter(struct ieee80211_hw *hw, | |||
932 | */ | 932 | */ |
933 | } | 933 | } |
934 | 934 | ||
935 | mutex_unlock(&priv->shrd->mutex); | 935 | mutex_unlock(&priv->mutex); |
936 | 936 | ||
937 | /* | 937 | /* |
938 | * Receiving all multicast frames is always enabled by the | 938 | * Receiving all multicast frames is always enabled by the |
@@ -948,7 +948,7 @@ static void iwlagn_mac_flush(struct ieee80211_hw *hw, bool drop) | |||
948 | { | 948 | { |
949 | struct iwl_priv *priv = IWL_MAC80211_GET_DVM(hw); | 949 | struct iwl_priv *priv = IWL_MAC80211_GET_DVM(hw); |
950 | 950 | ||
951 | mutex_lock(&priv->shrd->mutex); | 951 | mutex_lock(&priv->mutex); |
952 | IWL_DEBUG_MAC80211(priv, "enter\n"); | 952 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
953 | 953 | ||
954 | if (test_bit(STATUS_EXIT_PENDING, &priv->shrd->status)) { | 954 | if (test_bit(STATUS_EXIT_PENDING, &priv->shrd->status)) { |
@@ -974,7 +974,7 @@ static void iwlagn_mac_flush(struct ieee80211_hw *hw, bool drop) | |||
974 | IWL_DEBUG_MAC80211(priv, "wait transmit/flush all frames\n"); | 974 | IWL_DEBUG_MAC80211(priv, "wait transmit/flush all frames\n"); |
975 | iwl_trans_wait_tx_queue_empty(trans(priv)); | 975 | iwl_trans_wait_tx_queue_empty(trans(priv)); |
976 | done: | 976 | done: |
977 | mutex_unlock(&priv->shrd->mutex); | 977 | mutex_unlock(&priv->mutex); |
978 | IWL_DEBUG_MAC80211(priv, "leave\n"); | 978 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
979 | } | 979 | } |
980 | 980 | ||
@@ -994,7 +994,7 @@ static int iwlagn_mac_remain_on_channel(struct ieee80211_hw *hw, | |||
994 | return -EOPNOTSUPP; | 994 | return -EOPNOTSUPP; |
995 | 995 | ||
996 | IWL_DEBUG_MAC80211(priv, "enter\n"); | 996 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
997 | mutex_lock(&priv->shrd->mutex); | 997 | mutex_lock(&priv->mutex); |
998 | 998 | ||
999 | if (test_bit(STATUS_SCAN_HW, &priv->shrd->status)) { | 999 | if (test_bit(STATUS_SCAN_HW, &priv->shrd->status)) { |
1000 | err = -EBUSY; | 1000 | err = -EBUSY; |
@@ -1065,7 +1065,7 @@ static int iwlagn_mac_remain_on_channel(struct ieee80211_hw *hw, | |||
1065 | iwlagn_disable_roc(priv); | 1065 | iwlagn_disable_roc(priv); |
1066 | 1066 | ||
1067 | out: | 1067 | out: |
1068 | mutex_unlock(&priv->shrd->mutex); | 1068 | mutex_unlock(&priv->mutex); |
1069 | IWL_DEBUG_MAC80211(priv, "leave\n"); | 1069 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
1070 | 1070 | ||
1071 | return err; | 1071 | return err; |
@@ -1079,10 +1079,10 @@ static int iwlagn_mac_cancel_remain_on_channel(struct ieee80211_hw *hw) | |||
1079 | return -EOPNOTSUPP; | 1079 | return -EOPNOTSUPP; |
1080 | 1080 | ||
1081 | IWL_DEBUG_MAC80211(priv, "enter\n"); | 1081 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
1082 | mutex_lock(&priv->shrd->mutex); | 1082 | mutex_lock(&priv->mutex); |
1083 | iwl_scan_cancel_timeout(priv, priv->hw_roc_duration); | 1083 | iwl_scan_cancel_timeout(priv, priv->hw_roc_duration); |
1084 | iwlagn_disable_roc(priv); | 1084 | iwlagn_disable_roc(priv); |
1085 | mutex_unlock(&priv->shrd->mutex); | 1085 | mutex_unlock(&priv->mutex); |
1086 | IWL_DEBUG_MAC80211(priv, "leave\n"); | 1086 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
1087 | 1087 | ||
1088 | return 0; | 1088 | return 0; |
@@ -1094,7 +1094,7 @@ static void iwlagn_mac_rssi_callback(struct ieee80211_hw *hw, | |||
1094 | struct iwl_priv *priv = IWL_MAC80211_GET_DVM(hw); | 1094 | struct iwl_priv *priv = IWL_MAC80211_GET_DVM(hw); |
1095 | 1095 | ||
1096 | IWL_DEBUG_MAC80211(priv, "enter\n"); | 1096 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
1097 | mutex_lock(&priv->shrd->mutex); | 1097 | mutex_lock(&priv->mutex); |
1098 | 1098 | ||
1099 | if (cfg(priv)->bt_params && | 1099 | if (cfg(priv)->bt_params && |
1100 | cfg(priv)->bt_params->advanced_bt_coexist) { | 1100 | cfg(priv)->bt_params->advanced_bt_coexist) { |
@@ -1109,7 +1109,7 @@ static void iwlagn_mac_rssi_callback(struct ieee80211_hw *hw, | |||
1109 | "ignoring RSSI callback\n"); | 1109 | "ignoring RSSI callback\n"); |
1110 | } | 1110 | } |
1111 | 1111 | ||
1112 | mutex_unlock(&priv->shrd->mutex); | 1112 | mutex_unlock(&priv->mutex); |
1113 | IWL_DEBUG_MAC80211(priv, "leave\n"); | 1113 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
1114 | } | 1114 | } |
1115 | 1115 | ||
@@ -1149,7 +1149,7 @@ static int iwlagn_mac_conf_tx(struct ieee80211_hw *hw, | |||
1149 | 1149 | ||
1150 | q = AC_NUM - 1 - queue; | 1150 | q = AC_NUM - 1 - queue; |
1151 | 1151 | ||
1152 | mutex_lock(&priv->shrd->mutex); | 1152 | mutex_lock(&priv->mutex); |
1153 | 1153 | ||
1154 | ctx->qos_data.def_qos_parm.ac[q].cw_min = | 1154 | ctx->qos_data.def_qos_parm.ac[q].cw_min = |
1155 | cpu_to_le16(params->cw_min); | 1155 | cpu_to_le16(params->cw_min); |
@@ -1161,7 +1161,7 @@ static int iwlagn_mac_conf_tx(struct ieee80211_hw *hw, | |||
1161 | 1161 | ||
1162 | ctx->qos_data.def_qos_parm.ac[q].reserved1 = 0; | 1162 | ctx->qos_data.def_qos_parm.ac[q].reserved1 = 0; |
1163 | 1163 | ||
1164 | mutex_unlock(&priv->shrd->mutex); | 1164 | mutex_unlock(&priv->mutex); |
1165 | 1165 | ||
1166 | IWL_DEBUG_MAC80211(priv, "leave\n"); | 1166 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
1167 | return 0; | 1167 | return 0; |
@@ -1189,7 +1189,7 @@ static int iwl_setup_interface(struct iwl_priv *priv, | |||
1189 | struct ieee80211_vif *vif = ctx->vif; | 1189 | struct ieee80211_vif *vif = ctx->vif; |
1190 | int err; | 1190 | int err; |
1191 | 1191 | ||
1192 | lockdep_assert_held(&priv->shrd->mutex); | 1192 | lockdep_assert_held(&priv->mutex); |
1193 | 1193 | ||
1194 | /* | 1194 | /* |
1195 | * This variable will be correct only when there's just | 1195 | * This variable will be correct only when there's just |
@@ -1234,7 +1234,7 @@ static int iwlagn_mac_add_interface(struct ieee80211_hw *hw, | |||
1234 | 1234 | ||
1235 | cancel_delayed_work_sync(&priv->hw_roc_disable_work); | 1235 | cancel_delayed_work_sync(&priv->hw_roc_disable_work); |
1236 | 1236 | ||
1237 | mutex_lock(&priv->shrd->mutex); | 1237 | mutex_lock(&priv->mutex); |
1238 | 1238 | ||
1239 | iwlagn_disable_roc(priv); | 1239 | iwlagn_disable_roc(priv); |
1240 | 1240 | ||
@@ -1281,7 +1281,7 @@ static int iwlagn_mac_add_interface(struct ieee80211_hw *hw, | |||
1281 | ctx->vif = NULL; | 1281 | ctx->vif = NULL; |
1282 | priv->iw_mode = NL80211_IFTYPE_STATION; | 1282 | priv->iw_mode = NL80211_IFTYPE_STATION; |
1283 | out: | 1283 | out: |
1284 | mutex_unlock(&priv->shrd->mutex); | 1284 | mutex_unlock(&priv->mutex); |
1285 | 1285 | ||
1286 | IWL_DEBUG_MAC80211(priv, "leave\n"); | 1286 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
1287 | return err; | 1287 | return err; |
@@ -1293,7 +1293,7 @@ static void iwl_teardown_interface(struct iwl_priv *priv, | |||
1293 | { | 1293 | { |
1294 | struct iwl_rxon_context *ctx = iwl_rxon_ctx_from_vif(vif); | 1294 | struct iwl_rxon_context *ctx = iwl_rxon_ctx_from_vif(vif); |
1295 | 1295 | ||
1296 | lockdep_assert_held(&priv->shrd->mutex); | 1296 | lockdep_assert_held(&priv->mutex); |
1297 | 1297 | ||
1298 | if (priv->scan_vif == vif) { | 1298 | if (priv->scan_vif == vif) { |
1299 | iwl_scan_cancel_timeout(priv, 200); | 1299 | iwl_scan_cancel_timeout(priv, 200); |
@@ -1325,7 +1325,7 @@ static void iwlagn_mac_remove_interface(struct ieee80211_hw *hw, | |||
1325 | 1325 | ||
1326 | IWL_DEBUG_MAC80211(priv, "enter\n"); | 1326 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
1327 | 1327 | ||
1328 | mutex_lock(&priv->shrd->mutex); | 1328 | mutex_lock(&priv->mutex); |
1329 | 1329 | ||
1330 | if (WARN_ON(ctx->vif != vif)) { | 1330 | if (WARN_ON(ctx->vif != vif)) { |
1331 | struct iwl_rxon_context *tmp; | 1331 | struct iwl_rxon_context *tmp; |
@@ -1338,7 +1338,7 @@ static void iwlagn_mac_remove_interface(struct ieee80211_hw *hw, | |||
1338 | 1338 | ||
1339 | iwl_teardown_interface(priv, vif, false); | 1339 | iwl_teardown_interface(priv, vif, false); |
1340 | 1340 | ||
1341 | mutex_unlock(&priv->shrd->mutex); | 1341 | mutex_unlock(&priv->mutex); |
1342 | 1342 | ||
1343 | IWL_DEBUG_MAC80211(priv, "leave\n"); | 1343 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
1344 | 1344 | ||
@@ -1360,7 +1360,7 @@ static int iwlagn_mac_change_interface(struct ieee80211_hw *hw, | |||
1360 | 1360 | ||
1361 | newtype = ieee80211_iftype_p2p(newtype, newp2p); | 1361 | newtype = ieee80211_iftype_p2p(newtype, newp2p); |
1362 | 1362 | ||
1363 | mutex_lock(&priv->shrd->mutex); | 1363 | mutex_lock(&priv->mutex); |
1364 | 1364 | ||
1365 | if (!ctx->vif || !iwl_is_ready_rf(priv->shrd)) { | 1365 | if (!ctx->vif || !iwl_is_ready_rf(priv->shrd)) { |
1366 | /* | 1366 | /* |
@@ -1424,7 +1424,7 @@ static int iwlagn_mac_change_interface(struct ieee80211_hw *hw, | |||
1424 | err = 0; | 1424 | err = 0; |
1425 | 1425 | ||
1426 | out: | 1426 | out: |
1427 | mutex_unlock(&priv->shrd->mutex); | 1427 | mutex_unlock(&priv->mutex); |
1428 | IWL_DEBUG_MAC80211(priv, "leave\n"); | 1428 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
1429 | 1429 | ||
1430 | return err; | 1430 | return err; |
@@ -1442,7 +1442,7 @@ static int iwlagn_mac_hw_scan(struct ieee80211_hw *hw, | |||
1442 | if (req->n_channels == 0) | 1442 | if (req->n_channels == 0) |
1443 | return -EINVAL; | 1443 | return -EINVAL; |
1444 | 1444 | ||
1445 | mutex_lock(&priv->shrd->mutex); | 1445 | mutex_lock(&priv->mutex); |
1446 | 1446 | ||
1447 | /* | 1447 | /* |
1448 | * If an internal scan is in progress, just set | 1448 | * If an internal scan is in progress, just set |
@@ -1471,7 +1471,7 @@ static int iwlagn_mac_hw_scan(struct ieee80211_hw *hw, | |||
1471 | 1471 | ||
1472 | IWL_DEBUG_MAC80211(priv, "leave\n"); | 1472 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
1473 | 1473 | ||
1474 | mutex_unlock(&priv->shrd->mutex); | 1474 | mutex_unlock(&priv->mutex); |
1475 | 1475 | ||
1476 | return ret; | 1476 | return ret; |
1477 | } | 1477 | } |
diff --git a/drivers/net/wireless/iwlwifi/iwl-power.c b/drivers/net/wireless/iwlwifi/iwl-power.c index 46ca82062c2e..d76ff239d5f1 100644 --- a/drivers/net/wireless/iwlwifi/iwl-power.c +++ b/drivers/net/wireless/iwlwifi/iwl-power.c | |||
@@ -383,7 +383,7 @@ int iwl_power_set_mode(struct iwl_priv *priv, struct iwl_powertable_cmd *cmd, | |||
383 | int ret; | 383 | int ret; |
384 | bool update_chains; | 384 | bool update_chains; |
385 | 385 | ||
386 | lockdep_assert_held(&priv->shrd->mutex); | 386 | lockdep_assert_held(&priv->mutex); |
387 | 387 | ||
388 | /* Don't update the RX chain when chain noise calibration is running */ | 388 | /* Don't update the RX chain when chain noise calibration is running */ |
389 | update_chains = priv->chain_noise_data.state == IWL_CHAIN_NOISE_DONE || | 389 | update_chains = priv->chain_noise_data.state == IWL_CHAIN_NOISE_DONE || |
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c index dcba74883307..6cf2cb318882 100644 --- a/drivers/net/wireless/iwlwifi/iwl-scan.c +++ b/drivers/net/wireless/iwlwifi/iwl-scan.c | |||
@@ -115,7 +115,7 @@ static void iwl_process_scan_complete(struct iwl_priv *priv) | |||
115 | { | 115 | { |
116 | bool aborted; | 116 | bool aborted; |
117 | 117 | ||
118 | lockdep_assert_held(&priv->shrd->mutex); | 118 | lockdep_assert_held(&priv->mutex); |
119 | 119 | ||
120 | if (!test_and_clear_bit(STATUS_SCAN_COMPLETE, &priv->shrd->status)) | 120 | if (!test_and_clear_bit(STATUS_SCAN_COMPLETE, &priv->shrd->status)) |
121 | return; | 121 | return; |
@@ -172,7 +172,7 @@ out_settings: | |||
172 | 172 | ||
173 | void iwl_force_scan_end(struct iwl_priv *priv) | 173 | void iwl_force_scan_end(struct iwl_priv *priv) |
174 | { | 174 | { |
175 | lockdep_assert_held(&priv->shrd->mutex); | 175 | lockdep_assert_held(&priv->mutex); |
176 | 176 | ||
177 | if (!test_bit(STATUS_SCANNING, &priv->shrd->status)) { | 177 | if (!test_bit(STATUS_SCANNING, &priv->shrd->status)) { |
178 | IWL_DEBUG_SCAN(priv, "Forcing scan end while not scanning\n"); | 178 | IWL_DEBUG_SCAN(priv, "Forcing scan end while not scanning\n"); |
@@ -191,7 +191,7 @@ static void iwl_do_scan_abort(struct iwl_priv *priv) | |||
191 | { | 191 | { |
192 | int ret; | 192 | int ret; |
193 | 193 | ||
194 | lockdep_assert_held(&priv->shrd->mutex); | 194 | lockdep_assert_held(&priv->mutex); |
195 | 195 | ||
196 | if (!test_bit(STATUS_SCANNING, &priv->shrd->status)) { | 196 | if (!test_bit(STATUS_SCANNING, &priv->shrd->status)) { |
197 | IWL_DEBUG_SCAN(priv, "Not performing scan to abort\n"); | 197 | IWL_DEBUG_SCAN(priv, "Not performing scan to abort\n"); |
@@ -230,7 +230,7 @@ void iwl_scan_cancel_timeout(struct iwl_priv *priv, unsigned long ms) | |||
230 | { | 230 | { |
231 | unsigned long timeout = jiffies + msecs_to_jiffies(ms); | 231 | unsigned long timeout = jiffies + msecs_to_jiffies(ms); |
232 | 232 | ||
233 | lockdep_assert_held(&priv->shrd->mutex); | 233 | lockdep_assert_held(&priv->mutex); |
234 | 234 | ||
235 | IWL_DEBUG_SCAN(priv, "Scan cancel timeout\n"); | 235 | IWL_DEBUG_SCAN(priv, "Scan cancel timeout\n"); |
236 | 236 | ||
@@ -595,7 +595,7 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) | |||
595 | u8 scan_tx_antennas = hw_params(priv).valid_tx_ant; | 595 | u8 scan_tx_antennas = hw_params(priv).valid_tx_ant; |
596 | int ret; | 596 | int ret; |
597 | 597 | ||
598 | lockdep_assert_held(&priv->shrd->mutex); | 598 | lockdep_assert_held(&priv->mutex); |
599 | 599 | ||
600 | if (vif) | 600 | if (vif) |
601 | ctx = iwl_rxon_ctx_from_vif(vif); | 601 | ctx = iwl_rxon_ctx_from_vif(vif); |
@@ -912,7 +912,7 @@ int __must_check iwl_scan_initiate(struct iwl_priv *priv, | |||
912 | { | 912 | { |
913 | int ret; | 913 | int ret; |
914 | 914 | ||
915 | lockdep_assert_held(&priv->shrd->mutex); | 915 | lockdep_assert_held(&priv->mutex); |
916 | 916 | ||
917 | cancel_delayed_work(&priv->scan_check); | 917 | cancel_delayed_work(&priv->scan_check); |
918 | 918 | ||
@@ -972,7 +972,7 @@ static void iwl_bg_start_internal_scan(struct work_struct *work) | |||
972 | 972 | ||
973 | IWL_DEBUG_SCAN(priv, "Start internal scan\n"); | 973 | IWL_DEBUG_SCAN(priv, "Start internal scan\n"); |
974 | 974 | ||
975 | mutex_lock(&priv->shrd->mutex); | 975 | mutex_lock(&priv->mutex); |
976 | 976 | ||
977 | if (priv->scan_type == IWL_SCAN_RADIO_RESET) { | 977 | if (priv->scan_type == IWL_SCAN_RADIO_RESET) { |
978 | IWL_DEBUG_SCAN(priv, "Internal scan already in progress\n"); | 978 | IWL_DEBUG_SCAN(priv, "Internal scan already in progress\n"); |
@@ -987,7 +987,7 @@ static void iwl_bg_start_internal_scan(struct work_struct *work) | |||
987 | if (iwl_scan_initiate(priv, NULL, IWL_SCAN_RADIO_RESET, priv->band)) | 987 | if (iwl_scan_initiate(priv, NULL, IWL_SCAN_RADIO_RESET, priv->band)) |
988 | IWL_DEBUG_SCAN(priv, "failed to start internal short scan\n"); | 988 | IWL_DEBUG_SCAN(priv, "failed to start internal short scan\n"); |
989 | unlock: | 989 | unlock: |
990 | mutex_unlock(&priv->shrd->mutex); | 990 | mutex_unlock(&priv->mutex); |
991 | } | 991 | } |
992 | 992 | ||
993 | static void iwl_bg_scan_check(struct work_struct *data) | 993 | static void iwl_bg_scan_check(struct work_struct *data) |
@@ -1000,9 +1000,9 @@ static void iwl_bg_scan_check(struct work_struct *data) | |||
1000 | /* Since we are here firmware does not finish scan and | 1000 | /* Since we are here firmware does not finish scan and |
1001 | * most likely is in bad shape, so we don't bother to | 1001 | * most likely is in bad shape, so we don't bother to |
1002 | * send abort command, just force scan complete to mac80211 */ | 1002 | * send abort command, just force scan complete to mac80211 */ |
1003 | mutex_lock(&priv->shrd->mutex); | 1003 | mutex_lock(&priv->mutex); |
1004 | iwl_force_scan_end(priv); | 1004 | iwl_force_scan_end(priv); |
1005 | mutex_unlock(&priv->shrd->mutex); | 1005 | mutex_unlock(&priv->mutex); |
1006 | } | 1006 | } |
1007 | 1007 | ||
1008 | /** | 1008 | /** |
@@ -1060,9 +1060,9 @@ static void iwl_bg_abort_scan(struct work_struct *work) | |||
1060 | 1060 | ||
1061 | /* We keep scan_check work queued in case when firmware will not | 1061 | /* We keep scan_check work queued in case when firmware will not |
1062 | * report back scan completed notification */ | 1062 | * report back scan completed notification */ |
1063 | mutex_lock(&priv->shrd->mutex); | 1063 | mutex_lock(&priv->mutex); |
1064 | iwl_scan_cancel_timeout(priv, 200); | 1064 | iwl_scan_cancel_timeout(priv, 200); |
1065 | mutex_unlock(&priv->shrd->mutex); | 1065 | mutex_unlock(&priv->mutex); |
1066 | } | 1066 | } |
1067 | 1067 | ||
1068 | static void iwl_bg_scan_completed(struct work_struct *work) | 1068 | static void iwl_bg_scan_completed(struct work_struct *work) |
@@ -1070,9 +1070,9 @@ static void iwl_bg_scan_completed(struct work_struct *work) | |||
1070 | struct iwl_priv *priv = | 1070 | struct iwl_priv *priv = |
1071 | container_of(work, struct iwl_priv, scan_completed); | 1071 | container_of(work, struct iwl_priv, scan_completed); |
1072 | 1072 | ||
1073 | mutex_lock(&priv->shrd->mutex); | 1073 | mutex_lock(&priv->mutex); |
1074 | iwl_process_scan_complete(priv); | 1074 | iwl_process_scan_complete(priv); |
1075 | mutex_unlock(&priv->shrd->mutex); | 1075 | mutex_unlock(&priv->mutex); |
1076 | } | 1076 | } |
1077 | 1077 | ||
1078 | void iwl_setup_scan_deferred_work(struct iwl_priv *priv) | 1078 | void iwl_setup_scan_deferred_work(struct iwl_priv *priv) |
@@ -1090,8 +1090,8 @@ void iwl_cancel_scan_deferred_work(struct iwl_priv *priv) | |||
1090 | cancel_work_sync(&priv->scan_completed); | 1090 | cancel_work_sync(&priv->scan_completed); |
1091 | 1091 | ||
1092 | if (cancel_delayed_work_sync(&priv->scan_check)) { | 1092 | if (cancel_delayed_work_sync(&priv->scan_check)) { |
1093 | mutex_lock(&priv->shrd->mutex); | 1093 | mutex_lock(&priv->mutex); |
1094 | iwl_force_scan_end(priv); | 1094 | iwl_force_scan_end(priv); |
1095 | mutex_unlock(&priv->shrd->mutex); | 1095 | mutex_unlock(&priv->mutex); |
1096 | } | 1096 | } |
1097 | } | 1097 | } |
diff --git a/drivers/net/wireless/iwlwifi/iwl-shared.h b/drivers/net/wireless/iwlwifi/iwl-shared.h index bb34766609db..30b942f77814 100644 --- a/drivers/net/wireless/iwlwifi/iwl-shared.h +++ b/drivers/net/wireless/iwlwifi/iwl-shared.h | |||
@@ -65,7 +65,6 @@ | |||
65 | 65 | ||
66 | #include <linux/types.h> | 66 | #include <linux/types.h> |
67 | #include <linux/spinlock.h> | 67 | #include <linux/spinlock.h> |
68 | #include <linux/mutex.h> | ||
69 | #include <linux/gfp.h> | 68 | #include <linux/gfp.h> |
70 | #include <net/mac80211.h> | 69 | #include <net/mac80211.h> |
71 | 70 | ||
@@ -399,7 +398,6 @@ struct iwl_cfg { | |||
399 | * @nic: pointer to the nic data | 398 | * @nic: pointer to the nic data |
400 | * @hw_params: see struct iwl_hw_params | 399 | * @hw_params: see struct iwl_hw_params |
401 | * @lock: protect general shared data | 400 | * @lock: protect general shared data |
402 | * @mutex: | ||
403 | * @wait_command_queue: the wait_queue for SYNC host command nad uCode load | 401 | * @wait_command_queue: the wait_queue for SYNC host command nad uCode load |
404 | * @eeprom: pointer to the eeprom/OTP image | 402 | * @eeprom: pointer to the eeprom/OTP image |
405 | * @ucode_type: indicator of loaded ucode image | 403 | * @ucode_type: indicator of loaded ucode image |
@@ -423,8 +421,6 @@ struct iwl_shared { | |||
423 | struct iwl_hw_params hw_params; | 421 | struct iwl_hw_params hw_params; |
424 | const struct iwl_fw *fw; | 422 | const struct iwl_fw *fw; |
425 | 423 | ||
426 | struct mutex mutex; | ||
427 | |||
428 | wait_queue_head_t wait_command_queue; | 424 | wait_queue_head_t wait_command_queue; |
429 | 425 | ||
430 | /* eeprom -- this is in the card's little endian byte order */ | 426 | /* eeprom -- this is in the card's little endian byte order */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-testmode.c b/drivers/net/wireless/iwlwifi/iwl-testmode.c index f26765b3a661..095d71dc99c4 100644 --- a/drivers/net/wireless/iwlwifi/iwl-testmode.c +++ b/drivers/net/wireless/iwlwifi/iwl-testmode.c | |||
@@ -975,7 +975,7 @@ int iwlagn_mac_testmode_cmd(struct ieee80211_hw *hw, void *data, int len) | |||
975 | return -ENOMSG; | 975 | return -ENOMSG; |
976 | } | 976 | } |
977 | /* in case multiple accesses to the device happens */ | 977 | /* in case multiple accesses to the device happens */ |
978 | mutex_lock(&priv->shrd->mutex); | 978 | mutex_lock(&priv->mutex); |
979 | 979 | ||
980 | switch (nla_get_u32(tb[IWL_TM_ATTR_COMMAND])) { | 980 | switch (nla_get_u32(tb[IWL_TM_ATTR_COMMAND])) { |
981 | case IWL_TM_CMD_APP2DEV_UCODE: | 981 | case IWL_TM_CMD_APP2DEV_UCODE: |
@@ -1027,7 +1027,7 @@ int iwlagn_mac_testmode_cmd(struct ieee80211_hw *hw, void *data, int len) | |||
1027 | break; | 1027 | break; |
1028 | } | 1028 | } |
1029 | 1029 | ||
1030 | mutex_unlock(&priv->shrd->mutex); | 1030 | mutex_unlock(&priv->mutex); |
1031 | return result; | 1031 | return result; |
1032 | } | 1032 | } |
1033 | 1033 | ||
@@ -1062,7 +1062,7 @@ int iwlagn_mac_testmode_dump(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
1062 | } | 1062 | } |
1063 | 1063 | ||
1064 | /* in case multiple accesses to the device happens */ | 1064 | /* in case multiple accesses to the device happens */ |
1065 | mutex_lock(&priv->shrd->mutex); | 1065 | mutex_lock(&priv->mutex); |
1066 | switch (cmd) { | 1066 | switch (cmd) { |
1067 | case IWL_TM_CMD_APP2DEV_READ_TRACE: | 1067 | case IWL_TM_CMD_APP2DEV_READ_TRACE: |
1068 | IWL_DEBUG_INFO(priv, "uCode trace cmd to driver\n"); | 1068 | IWL_DEBUG_INFO(priv, "uCode trace cmd to driver\n"); |
@@ -1077,6 +1077,6 @@ int iwlagn_mac_testmode_dump(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
1077 | break; | 1077 | break; |
1078 | } | 1078 | } |
1079 | 1079 | ||
1080 | mutex_unlock(&priv->shrd->mutex); | 1080 | mutex_unlock(&priv->mutex); |
1081 | return result; | 1081 | return result; |
1082 | } | 1082 | } |
diff --git a/drivers/net/wireless/iwlwifi/iwl-ucode.c b/drivers/net/wireless/iwlwifi/iwl-ucode.c index 1cbe8e9926f1..c1c5e1f2223a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-ucode.c +++ b/drivers/net/wireless/iwlwifi/iwl-ucode.c | |||
@@ -599,7 +599,7 @@ int iwl_run_init_ucode(struct iwl_priv *priv) | |||
599 | struct iwl_notification_wait calib_wait; | 599 | struct iwl_notification_wait calib_wait; |
600 | int ret; | 600 | int ret; |
601 | 601 | ||
602 | lockdep_assert_held(&priv->shrd->mutex); | 602 | lockdep_assert_held(&priv->mutex); |
603 | 603 | ||
604 | /* No init ucode required? Curious, but maybe ok */ | 604 | /* No init ucode required? Curious, but maybe ok */ |
605 | if (!priv->fw->ucode_init.code.len) | 605 | if (!priv->fw->ucode_init.code.len) |