aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-op-mode.h
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2014-11-04 09:57:06 -0500
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-11-11 10:15:04 -0500
commitf4cf8680dfa42c80476a9cc5b90f933b12cf6d29 (patch)
tree7e9301164e06fd69d7e3d1c6de74d8472d661155 /drivers/net/wireless/iwlwifi/iwl-op-mode.h
parent1507fb757a0a706a9aae002d45ea7c12b076a482 (diff)
iwlwifi: mvm/trans: abort d0i3_enter in case of held ref
Other contexts might call iwl_mvm_ref_sync() right before we set IWL_MVM_STATUS_IN_D0I3, and then assume the fw/bus is not in d0i3 state. However, since we currently don't check for held references in the d0i3_enter flow, we might enter d0i3 although there is an active reference. Solve it by aborting the d0i3 enter flow if there is an active reference. Since users are assumed to use iwl_mvm_ref_sync, which takes a ref before checking the flag, we don't need further locking. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-op-mode.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-op-mode.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-op-mode.h b/drivers/net/wireless/iwlwifi/iwl-op-mode.h
index b6d666ee8359..17de6d46222a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-op-mode.h
+++ b/drivers/net/wireless/iwlwifi/iwl-op-mode.h
@@ -138,7 +138,8 @@ struct iwl_cfg;
138 * @nic_config: configure NIC, called before firmware is started. 138 * @nic_config: configure NIC, called before firmware is started.
139 * May sleep 139 * May sleep
140 * @wimax_active: invoked when WiMax becomes active. May sleep 140 * @wimax_active: invoked when WiMax becomes active. May sleep
141 * @enter_d0i3: configure the fw to enter d0i3. May sleep. 141 * @enter_d0i3: configure the fw to enter d0i3. return 1 to indicate d0i3
142 * entrance is aborted (e.g. due to held reference). May sleep.
142 * @exit_d0i3: configure the fw to exit d0i3. May sleep. 143 * @exit_d0i3: configure the fw to exit d0i3. May sleep.
143 */ 144 */
144struct iwl_op_mode_ops { 145struct iwl_op_mode_ops {