]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
iwlwifi: Don't send host commands on rfkill
authorGregory Greenman <gregory.greenman@intel.com>
Wed, 6 Feb 2008 19:20:40 +0000 (11:20 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 15 Feb 2008 18:44:18 +0000 (13:44 -0500)
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>
drivers/net/wireless/iwlwifi/iwl3945-base.c
drivers/net/wireless/iwlwifi/iwl4965-base.c

index b6f19a52b78332e0a7c8a9d86b97b1d10116d62c..66520e85e79cbc95c91f80c28c276309361666e5 100644 (file)
@@ -687,6 +687,12 @@ static int iwl3945_enqueue_hcmd(struct iwl3945_priv *priv, struct iwl3945_host_c
        BUG_ON((fix_size > TFD_MAX_PAYLOAD_SIZE) &&
               !(cmd->meta.flags & CMD_SIZE_HUGE));
 
+
+       if (iwl3945_is_rfkill(priv)) {
+               IWL_DEBUG_INFO("Not sending command - RF KILL");
+               return -EIO;
+       }
+
        if (iwl3945_queue_space(q) < ((cmd->meta.flags & CMD_ASYNC) ? 2 : 1)) {
                IWL_ERROR("No space for Tx\n");
                return -ENOSPC;
index 8bedc0c311fbf4d9638992b77cd93e913d39fefd..855cc97d04a843f5a73bee2de53dbe164ca0341a 100644 (file)
@@ -692,6 +692,11 @@ static int iwl4965_enqueue_hcmd(struct iwl4965_priv *priv, struct iwl4965_host_c
        BUG_ON((fix_size > TFD_MAX_PAYLOAD_SIZE) &&
               !(cmd->meta.flags & CMD_SIZE_HUGE));
 
+       if (iwl4965_is_rfkill(priv)) {
+               IWL_DEBUG_INFO("Not sending command - RF KILL");
+               return -EIO;
+       }
+
        if (iwl4965_queue_space(q) < ((cmd->meta.flags & CMD_ASYNC) ? 2 : 1)) {
                IWL_ERROR("No space for Tx\n");
                return -ENOSPC;