From 1094fa2646385a3bdbcdac5f2f270836d998b255 Mon Sep 17 00:00:00 2001 From: Eran Harary Date: Sun, 2 Jun 2013 12:40:34 +0300 Subject: [PATCH] iwlwifi: don't return -ERFKILL if SEND_IF_RFKILL is set When CMD_SEND_IN_RFKILL is set, it is perfectly legitimate to send a host command while RFKILL is asserted. In this case, the host command sending functions should return 0 even if RFKILL is asserted. Signed-off-by: Eran Harary Reviewed-by: Emmanuel Grumbach Signed-off-by: Johannes Berg --- drivers/net/wireless/iwlwifi/pcie/tx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/iwlwifi/pcie/tx.c b/drivers/net/wireless/iwlwifi/pcie/tx.c index a35c6aefbc3e..f65da1984d91 100644 --- a/drivers/net/wireless/iwlwifi/pcie/tx.c +++ b/drivers/net/wireless/iwlwifi/pcie/tx.c @@ -1527,7 +1527,8 @@ static int iwl_pcie_send_hcmd_sync(struct iwl_trans *trans, goto cancel; } - if (test_bit(STATUS_RFKILL, &trans_pcie->status)) { + if (!(cmd->flags & CMD_SEND_IN_RFKILL) && + test_bit(STATUS_RFKILL, &trans_pcie->status)) { IWL_DEBUG_RF_KILL(trans, "RFKILL in SYNC CMD... no rsp\n"); ret = -ERFKILL; goto cancel; -- 2.20.1