diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-03-06 22:30:59 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-03-07 19:56:33 +0100 |
commit | 947a9407e34e7c8d44a0f4d95bbb1e5eae5459c0 (patch) | |
tree | 3df6cc1bc2d19090604200945ad3f9f915f45b04 /drivers/net/wireless/iwlwifi/iwl-agn-lib.c | |
parent | iwlwifi: abstract out notification wait support (diff) | |
download | linux-947a9407e34e7c8d44a0f4d95bbb1e5eae5459c0.tar.xz linux-947a9407e34e7c8d44a0f4d95bbb1e5eae5459c0.zip |
iwlwifi: move ucode_owner to priv
The transport doesn't really need to know as
we can enforce it in the command wrapper.
Move the ucode_owner variable into priv and
do all enforcing there.
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-agn-lib.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c index 90f1f8a506f2..dec2693c8cba 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c @@ -1306,6 +1306,12 @@ int iwl_dvm_send_cmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd) if (cmd->flags & CMD_SYNC) lockdep_assert_held(&priv->mutex); + if (priv->ucode_owner == IWL_OWNERSHIP_TM && + !(cmd->flags & CMD_ON_DEMAND)) { + IWL_DEBUG_HC(priv, "tm own the uCode, no regular hcmd send\n"); + return -EIO; + } + return iwl_trans_send_cmd(trans(priv), cmd); } |