diff options
author | Gregory Greenman <gregory.greenman@intel.com> | 2008-02-06 14:20:40 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-02-15 13:44:18 -0500 |
commit | c342a1b91f6ccd317c68defd3b4c7bb75397d967 (patch) | |
tree | 7bcf7a6a1cf2ea50cf92aead6059115b7c019428 | |
parent | 9788864e2169ed3611e61c097efe4944c23fe7e9 (diff) |
iwlwifi: Don't send host commands on rfkill
This patch prevents sending host commands when rfkill is on
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl4965-base.c | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index b6f19a52b783..66520e85e79c 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -687,6 +687,12 @@ static int iwl3945_enqueue_hcmd(struct iwl3945_priv *priv, struct iwl3945_host_c | |||
687 | BUG_ON((fix_size > TFD_MAX_PAYLOAD_SIZE) && | 687 | BUG_ON((fix_size > TFD_MAX_PAYLOAD_SIZE) && |
688 | !(cmd->meta.flags & CMD_SIZE_HUGE)); | 688 | !(cmd->meta.flags & CMD_SIZE_HUGE)); |
689 | 689 | ||
690 | |||
691 | if (iwl3945_is_rfkill(priv)) { | ||
692 | IWL_DEBUG_INFO("Not sending command - RF KILL"); | ||
693 | return -EIO; | ||
694 | } | ||
695 | |||
690 | if (iwl3945_queue_space(q) < ((cmd->meta.flags & CMD_ASYNC) ? 2 : 1)) { | 696 | if (iwl3945_queue_space(q) < ((cmd->meta.flags & CMD_ASYNC) ? 2 : 1)) { |
691 | IWL_ERROR("No space for Tx\n"); | 697 | IWL_ERROR("No space for Tx\n"); |
692 | return -ENOSPC; | 698 | return -ENOSPC; |
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index 8bedc0c311fb..855cc97d04a8 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c | |||
@@ -692,6 +692,11 @@ static int iwl4965_enqueue_hcmd(struct iwl4965_priv *priv, struct iwl4965_host_c | |||
692 | BUG_ON((fix_size > TFD_MAX_PAYLOAD_SIZE) && | 692 | BUG_ON((fix_size > TFD_MAX_PAYLOAD_SIZE) && |
693 | !(cmd->meta.flags & CMD_SIZE_HUGE)); | 693 | !(cmd->meta.flags & CMD_SIZE_HUGE)); |
694 | 694 | ||
695 | if (iwl4965_is_rfkill(priv)) { | ||
696 | IWL_DEBUG_INFO("Not sending command - RF KILL"); | ||
697 | return -EIO; | ||
698 | } | ||
699 | |||
695 | if (iwl4965_queue_space(q) < ((cmd->meta.flags & CMD_ASYNC) ? 2 : 1)) { | 700 | if (iwl4965_queue_space(q) < ((cmd->meta.flags & CMD_ASYNC) ? 2 : 1)) { |
696 | IWL_ERROR("No space for Tx\n"); | 701 | IWL_ERROR("No space for Tx\n"); |
697 | return -ENOSPC; | 702 | return -ENOSPC; |