diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-03-07 01:30:40 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-03-07 22:51:49 +0400 |
commit | 721c32f72d8007dc0148ee88c046a4ade794a7b7 (patch) | |
tree | 1914738c9506d958b75c3823702b4f77b858e248 /drivers/net/wireless/iwlwifi/iwl-agn-lib.c | |
parent | e10a0533a9172471b52bd9512838d766420a3baf (diff) | |
download | linux-721c32f72d8007dc0148ee88c046a4ade794a7b7.tar.xz |
iwlwifi: move RF/CT kill check to command wrapper
Currently, we cannot send any commands when the
uCode is in RF or CT kill, but that will not be
true for all new uCode versions, so we need to
move the check into the uCode specific code.
Also remove the duplicate rfkill check.
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 4c777dfc0db0..11f24110d3fe 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c @@ -1292,6 +1292,12 @@ int iwlagn_suspend(struct iwl_priv *priv, int iwl_dvm_send_cmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd) { + if (iwl_is_rfkill(priv->shrd) || iwl_is_ctkill(priv->shrd)) { + IWL_WARN(priv, "Not sending command - %s KILL\n", + iwl_is_rfkill(priv->shrd) ? "RF" : "CT"); + return -EIO; + } + return iwl_trans_send_cmd(trans(priv), cmd); } |