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

* Re: [PATCH] iwlwifi: avoid "Error sending TX power (-5)"
  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
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2010-11-24 10:44 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: Wey-Yi Guy, Intel Linux Wireless, linux-wireless

On Wed, 2010-11-24 at 11:37 +0100, Stanislaw Gruszka wrote:
> 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



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

* Re: [PATCH] iwlwifi: avoid "Error sending TX power (-5)"
  2010-11-24 10:44 ` Johannes Berg
@ 2010-11-24 13:04   ` Stanislaw Gruszka
  2010-11-24 14:11     ` Stanislaw Gruszka
  0 siblings, 1 reply; 6+ messages in thread
From: Stanislaw Gruszka @ 2010-11-24 13:04 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Wey-Yi Guy, Intel Linux Wireless, linux-wireless

On Wed, Nov 24, 2010 at 11:44:12AM +0100, Johannes Berg wrote:
> On Wed, 2010-11-24 at 11:37 +0100, Stanislaw Gruszka wrote:
> > 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 

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

* Re: [PATCH] iwlwifi: avoid "Error sending TX power (-5)"
  2010-11-24 13:04   ` Stanislaw Gruszka
@ 2010-11-24 14:11     ` Stanislaw Gruszka
  2010-11-24 15:41       ` Guy, Wey-Yi
  0 siblings, 1 reply; 6+ messages in thread
From: Stanislaw Gruszka @ 2010-11-24 14:11 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Wey-Yi Guy, Intel Linux Wireless, linux-wireless

On Wed, Nov 24, 2010 at 02:04:03PM +0100, Stanislaw Gruszka wrote:
> On Wed, Nov 24, 2010 at 11:44:12AM +0100, Johannes Berg wrote:
> > On Wed, 2010-11-24 at 11:37 +0100, Stanislaw Gruszka wrote:
> > > 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.

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

Stanislaw 

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

* Re: [PATCH] iwlwifi: avoid "Error sending TX power (-5)"
  2010-11-24 14:11     ` Stanislaw Gruszka
@ 2010-11-24 15:41       ` Guy, Wey-Yi
  2010-11-25 12:00         ` Stanislaw Gruszka
  0 siblings, 1 reply; 6+ messages in thread
From: Guy, Wey-Yi @ 2010-11-24 15:41 UTC (permalink / raw)
  To: Stanislaw Gruszka
  Cc: Johannes Berg, Intel Linux Wireless,
	linux-wireless@vger.kernel.org

Hi Stanislaw,

On Wed, 2010-11-24 at 06:11 -0800, Stanislaw Gruszka wrote:
> On Wed, Nov 24, 2010 at 02:04:03PM +0100, Stanislaw Gruszka wrote:
> > On Wed, Nov 24, 2010 at 11:44:12AM +0100, Johannes Berg wrote:
> > > On Wed, 2010-11-24 at 11:37 +0100, Stanislaw Gruszka wrote:
> > > > 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.
> 
> 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


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

* Re: [PATCH] iwlwifi: avoid "Error sending TX power (-5)"
  2010-11-24 15:41       ` Guy, Wey-Yi
@ 2010-11-25 12:00         ` Stanislaw Gruszka
  0 siblings, 0 replies; 6+ messages in thread
From: Stanislaw Gruszka @ 2010-11-25 12:00 UTC (permalink / raw)
  To: Guy, Wey-Yi
  Cc: Johannes Berg, Intel Linux Wireless,
	linux-wireless@vger.kernel.org

Hi

On Wed, Nov 24, 2010 at 07:41:20AM -0800, Guy, Wey-Yi wrote:
> > 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

^ permalink raw reply	[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).