linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iwlwifi: avoid "Error sending TX power (-5)"
@ 2010-11-24 10:37 Stanislaw Gruszka
  2010-11-24 10:44 ` Johannes Berg
  0 siblings, 1 reply; 6+ messages in thread
From: Stanislaw Gruszka @ 2010-11-24 10:37 UTC (permalink / raw)
  To: Wey-Yi Guy, Intel Linux Wireless; +Cc: linux-wireless, Stanislaw Gruszka

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@redhat.com>
---
 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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-11-25 12:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-24 10:37 [PATCH] iwlwifi: avoid "Error sending TX power (-5)" Stanislaw Gruszka
2010-11-24 10:44 ` Johannes Berg
2010-11-24 13:04   ` Stanislaw Gruszka
2010-11-24 14:11     ` Stanislaw Gruszka
2010-11-24 15:41       ` Guy, Wey-Yi
2010-11-25 12:00         ` Stanislaw Gruszka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).