Search Linux Wireless

[PATCH] iwlwifi: avoid "Error sending TX power (-5)"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We can have this error message when loading or unloading module, when
device is not marked as ready, but we want to set tx power from
commit_rxon. Perhaps something better should be done like call
lib->send_tx_power() directly from commit_rxon, but for now just
do not return error.

Signed-off-by: Stanislaw Gruszka <sgruszka@xxxxxxxxxx>
---
 drivers/net/wireless/iwlwifi/iwl-core.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index c884ed3..3f826e5 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -1169,8 +1169,13 @@ int iwl_set_tx_power(struct iwl_priv *priv, s8 tx_power, bool force)
 		return -EINVAL;
 	}
 
+	/*
+	 * (FIXME ?) Do not report error, we can be called through commit_rxon
+	 * from iwl_set_mode() and iwl_bg_alive_start() when device is not
+	 * marked as ready
+	 */
 	if (!iwl_is_ready_rf(priv))
-		return -EIO;
+		return 0;
 
 	/* scan complete use tx_power_next, need to be updated */
 	priv->tx_power_next = tx_power;
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux