aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/mvm
diff options
context:
space:
mode:
authorChaya Rachel Ivgi <chaya.rachel.ivgi@intel.com>2016-03-13 05:39:53 -0400
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2016-03-30 09:21:20 -0400
commitec77a33ee59723613d1e3ed6f02e5f9a1c898ce1 (patch)
tree1d84eca17a9c5e3b3a9c3f3adc806bf00c9a4c33 /drivers/net/wireless/intel/iwlwifi/mvm
parent5d93f3a278b387e3a2ec568c1f03d236bfdbef81 (diff)
iwlwifi: mvm: handle async temperature notification with unlocked mutex
Use RX_HANDLER_ASYNC_UNLOCKED instead of unlock and re-lock the mutex independently. Signed-off-by: Chaya Rachel Ivgi <chaya.rachel.ivgi@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/ops.c2
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/tt.c9
2 files changed, 1 insertions, 10 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
index 46a22fd9f0d6..6153c8e86c53 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
@@ -292,7 +292,7 @@ static const struct iwl_rx_handlers iwl_mvm_rx_handlers[] = {
292 RX_HANDLER(DTS_MEASUREMENT_NOTIFICATION, iwl_mvm_temp_notif, 292 RX_HANDLER(DTS_MEASUREMENT_NOTIFICATION, iwl_mvm_temp_notif,
293 RX_HANDLER_ASYNC_LOCKED), 293 RX_HANDLER_ASYNC_LOCKED),
294 RX_HANDLER_GRP(PHY_OPS_GROUP, DTS_MEASUREMENT_NOTIF_WIDE, 294 RX_HANDLER_GRP(PHY_OPS_GROUP, DTS_MEASUREMENT_NOTIF_WIDE,
295 iwl_mvm_temp_notif, RX_HANDLER_ASYNC_LOCKED), 295 iwl_mvm_temp_notif, RX_HANDLER_ASYNC_UNLOCKED),
296 RX_HANDLER_GRP(PHY_OPS_GROUP, CT_KILL_NOTIFICATION, 296 RX_HANDLER_GRP(PHY_OPS_GROUP, CT_KILL_NOTIFICATION,
297 iwl_mvm_ct_kill_notif, RX_HANDLER_SYNC), 297 iwl_mvm_ct_kill_notif, RX_HANDLER_SYNC),
298 298
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
index f1f28255a3a6..8d27137a9284 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
@@ -204,20 +204,11 @@ void iwl_mvm_temp_notif(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb)
204 if (WARN_ON(ths_crossed >= IWL_MAX_DTS_TRIPS)) 204 if (WARN_ON(ths_crossed >= IWL_MAX_DTS_TRIPS))
205 return; 205 return;
206 206
207 /*
208 * We are now handling a temperature notification from the firmware
209 * in ASYNC and hold the mutex. thermal_notify_framework will call
210 * us back through get_temp() which ought to send a SYNC command to
211 * the firmware and hence to take the mutex.
212 * Avoid the deadlock by unlocking the mutex here.
213 */
214 if (mvm->tz_device.tzone) { 207 if (mvm->tz_device.tzone) {
215 struct iwl_mvm_thermal_device *tz_dev = &mvm->tz_device; 208 struct iwl_mvm_thermal_device *tz_dev = &mvm->tz_device;
216 209
217 mutex_unlock(&mvm->mutex);
218 thermal_notify_framework(tz_dev->tzone, 210 thermal_notify_framework(tz_dev->tzone,
219 tz_dev->fw_trips_index[ths_crossed]); 211 tz_dev->fw_trips_index[ths_crossed]);
220 mutex_lock(&mvm->mutex);
221 } 212 }
222#endif /* CONFIG_THERMAL */ 213#endif /* CONFIG_THERMAL */
223} 214}