aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-tx.c
diff options
context:
space:
mode:
authorWey-Yi Guy <wey-yi.w.guy@intel.com>2011-07-08 11:46:27 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-07-11 15:02:09 -0400
commiteedb6e357a4b1bd3d7e4544e77fbd71718492547 (patch)
tree7ccacd314958b6b6a0140e4080b5bd71d9e98c4a /drivers/net/wireless/iwlwifi/iwl-tx.c
parente98a1939a2d75354631487328339fe8d2117fce9 (diff)
iwlagn: block regular host commands if driver don't own uCode
The only host command allow to send to uCode is the one initiated from testmode if testmode is the owner of uCode 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-tx.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-tx.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c
index b62d03235b8c..9b07e07f1689 100644
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
@@ -328,6 +328,12 @@ int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
328 return -EIO; 328 return -EIO;
329 } 329 }
330 330
331 if ((priv->ucode_owner == IWL_OWNERSHIP_TM) &&
332 !(cmd->flags & CMD_ON_DEMAND)) {
333 IWL_DEBUG_HC(priv, "tm own the uCode, no regular hcmd send\n");
334 return -EIO;
335 }
336
331 copy_size = sizeof(out_cmd->hdr); 337 copy_size = sizeof(out_cmd->hdr);
332 cmd_size = sizeof(out_cmd->hdr); 338 cmd_size = sizeof(out_cmd->hdr);
333 339