]> git.karo-electronics.de Git - linux-beck.git/commit
iwlwifi: mvm/trans: abort d0i3_enter in case of held ref
authorEliad Peller <eliad@wizery.com>
Tue, 4 Nov 2014 14:57:06 +0000 (16:57 +0200)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Tue, 11 Nov 2014 15:15:04 +0000 (17:15 +0200)
commitf4cf8680dfa42c80476a9cc5b90f933b12cf6d29
tree7e9301164e06fd69d7e3d1c6de74d8472d661155
parent1507fb757a0a706a9aae002d45ea7c12b076a482
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>
drivers/net/wireless/iwlwifi/iwl-op-mode.h
drivers/net/wireless/iwlwifi/mvm/mac80211.c
drivers/net/wireless/iwlwifi/mvm/mvm.h
drivers/net/wireless/iwlwifi/mvm/ops.c