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/iwl-mac80211.c | |
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/iwl-mac80211.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-mac80211.c | 82 |
1 files changed, 41 insertions, 41 deletions
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 | } |