Skip to contentSkip to conversation

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

PATCH In review Stanislaw Gruszka 3 participants 6 messages Nov 24, 2010 – Nov 25, 2010 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iwlwifi: avoid "Error sending TX power (-5)"

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.

---
 drivers/net/wireless/iwlwifi/iwl-core.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
drivers/net/wireless/iwlwifi/iwl-core.c +6 -1
index c884ed3..3f826e5 100644
@@ -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;
Signature · 1 line
1.7.1
maintainer
#1 lore raw
Quoted 5 lines · 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.

I think this actually fixes it, as opposed to hiding it:

http://git.kernel.org/?p=linux/kernel/git/iwlwifi/iwlwifi-2.6.git;a=commitdiff;h=9e2e7422d059f9b98c3a0810df92a1ff660ade2f

johannes

#2 lore raw
Quoted 10 lines · Johannes Berg
Quoted 5 lines · 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.

I think this actually fixes it, as opposed to hiding it:

http://git.kernel.org/?p=linux/kernel/git/iwlwifi/iwlwifi-2.6.git;a=commitdiff;h=9e2e7422d059f9b98c3a0810df92a1ff660ade2f

Yes.

Thanks
Stanislaw

#3 lore raw
Quoted 8 lines · Stanislaw Gruszka
Quoted 7 lines · Johannes Berg
Quoted 5 lines · 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.

Quoted 5 lines
Quoted 3 lines

I think this actually fixes it, as opposed to hiding it:

http://git.kernel.org/?p=linux/kernel/git/iwlwifi/iwlwifi-2.6.git;a=commitdiff;h=9e2e7422d059f9b98c3a0810df92a1ff660ade2f

Yes.

Not fully, message disappears at start, but not when module is unloaded.

Stanislaw

#4 lore raw

Hi Stanislaw,

Quoted 9 lines · Stanislaw Gruszka
Quoted 8 lines · Stanislaw Gruszka
Quoted 7 lines · Johannes Berg
Quoted 5 lines · 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.

Quoted 9 lines
Quoted 5 lines
Quoted 3 lines

I think this actually fixes it, as opposed to hiding it:

http://git.kernel.org/?p=linux/kernel/git/iwlwifi/iwlwifi-2.6.git;a=commitdiff;h=9e2e7422d059f9b98c3a0810df92a1ff660ade2f

Yes.

Not fully, message disappears at start, but not when module is unloaded.

you are correct, I miss that. Would you like to address that? or I can fix it

Thanks
Wey

#5 lore raw

Hi

Quoted 5 lines · Wey-Yi
Quoted 3 lines

Not fully, message disappears at start, but not when module is unloaded.

you are correct, I miss that. Would you like to address that? or I can fix it

Please fix it, I could again do some crappy workaround instead of proper fix.

Stanislaw