Skip to content

Commit 6ba40cd

Browse files
committed
wifi: iwlwifi: mvm: d3: avoid intermediate/early mutex unlock
Now with the mac80211 locking model changed, we no longer can cause any bad dependencies here between mvm->mutex and other mutexes in mac80211, so we no longer need to drop the mutex early or even temporarily. Clean this up. Signed-off-by: Johannes Berg <[email protected]> Reviewed-by: Gregory Greenman <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20231219215605.1f2f5289ecc6.I7e3b8e806b6d50e88ba0c26767da8261806eb9c7@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent 2afc3da commit 6ba40cd

File tree

1 file changed

+2
-15
lines changed
  • drivers/net/wireless/intel/iwlwifi/mvm

1 file changed

+2
-15
lines changed

drivers/net/wireless/intel/iwlwifi/mvm/d3.c

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,14 +1130,7 @@ iwl_mvm_wowlan_config(struct iwl_mvm *mvm,
11301130
return ret;
11311131
}
11321132

1133-
/*
1134-
* This needs to be unlocked due to lock ordering
1135-
* constraints. Since we're in the suspend path
1136-
* that isn't really a problem though.
1137-
*/
1138-
mutex_unlock(&mvm->mutex);
11391133
ret = iwl_mvm_wowlan_config_key_params(mvm, vif);
1140-
mutex_lock(&mvm->mutex);
11411134
if (ret)
11421135
return ret;
11431136

@@ -2497,7 +2490,7 @@ static bool iwl_mvm_query_wakeup_reasons(struct iwl_mvm *mvm,
24972490
struct iwl_wowlan_status_data *status)
24982491
{
24992492
int i;
2500-
bool keep;
2493+
bool keep = false;
25012494
struct iwl_mvm_sta *mvm_ap_sta;
25022495

25032496
if (!status)
@@ -2525,18 +2518,12 @@ static bool iwl_mvm_query_wakeup_reasons(struct iwl_mvm *mvm,
25252518
mvm_ap_sta->tid_data[i].seq_number >> 4);
25262519
}
25272520

2528-
/* now we have all the data we need, unlock to avoid mac80211 issues */
2529-
mutex_unlock(&mvm->mutex);
2530-
25312521
iwl_mvm_report_wakeup_reasons(mvm, vif, status);
25322522

25332523
keep = iwl_mvm_setup_connection_keep(mvm, vif, status);
2534-
2535-
return keep;
2536-
25372524
out_unlock:
25382525
mutex_unlock(&mvm->mutex);
2539-
return false;
2526+
return keep;
25402527
}
25412528

25422529
#define ND_QUERY_BUF_LEN (sizeof(struct iwl_scan_offload_profile_match) * \

0 commit comments

Comments
 (0)