linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC/RFT] iwl3945: use software scanning by default
@ 2011-02-08 13:36 Stanislaw Gruszka
  2011-02-08 15:50 ` wwguy
  2011-02-14 12:08 ` Johannes Berg
  0 siblings, 2 replies; 5+ messages in thread
From: Stanislaw Gruszka @ 2011-02-08 13:36 UTC (permalink / raw)
  To: Wey-Yi Guy, Intel Linux Wireless; +Cc: linux-wireless, Stanislaw Gruszka

Looking for some more testing and opinions.

Patch fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=671366
and probably some other "very poor performance" bugs reported
elsewhere.

Sometimes after hardware scanning device is unable to receive frames
at higher rate, what cause that very slow speed is observed by the users.

To workaround problem we can use software scanning. Patch remove
"deprecated" warning and make sw scan be used by default on 3945.

On older kernels, in particular 2.6.35, software scanning does not
fix problem. On my setup, not affected by bug, I can see slow speed
with software scans on 2.6.35 as well. I'm not quite sure why. Anyway
on upstream patch works good for me and bug reporter.

---
 drivers/net/wireless/iwlwifi/iwl-core.h     |    4 ++--
 drivers/net/wireless/iwlwifi/iwl3945-base.c |   14 +++-----------
 2 files changed, 5 insertions(+), 13 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index 6e14a7b..9e7a6d1 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -254,8 +254,8 @@ struct iwl_ops {
 };
 
 struct iwl_mod_params {
-	int sw_crypto;		/* def: 0 = using hardware encryption */
-	int disable_hw_scan;	/* def: 0 = use h/w scan */
+	int sw_crypto;		/* def: HW dependent */
+	int disable_hw_scan;	/* def: HW dependent */
 	int num_of_queues;	/* def: HW dependent */
 	int disable_11n;	/* def: 0 = 11n capabilities enabled */
 	int amsdu_size_8K;	/* def: 1 = enable 8K amsdu size */
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 10e8034..7d9e234 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -94,6 +94,7 @@ MODULE_LICENSE("GPL");
 struct iwl_mod_params iwl3945_mod_params = {
 	.sw_crypto = 1,
 	.restart_fw = 1,
+	.disable_hw_scan = 1,
 	/* the rest are 0 by default */
 };
 
@@ -3996,16 +3997,8 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
 	priv->contexts[IWL_RXON_CTX_BSS].station_devtype = RXON_DEV_TYPE_ESS;
 	priv->contexts[IWL_RXON_CTX_BSS].unused_devtype = RXON_DEV_TYPE_ESS;
 
-	/*
-	 * Disabling hardware scan means that mac80211 will perform scans
-	 * "the hard way", rather than using device's scan.
-	 */
-	if (iwl3945_mod_params.disable_hw_scan) {
-		dev_printk(KERN_DEBUG, &(pdev->dev),
-			"sw scan support is deprecated\n");
+	if (iwl3945_mod_params.disable_hw_scan)
 		iwl3945_hw_ops.hw_scan = NULL;
-	}
-
 
 	IWL_DEBUG_INFO(priv, "*** LOAD DRIVER ***\n");
 	priv->cfg = cfg;
@@ -4326,8 +4319,7 @@ MODULE_PARM_DESC(debug, "debug output mask");
 #endif
 module_param_named(disable_hw_scan, iwl3945_mod_params.disable_hw_scan,
 		   int, S_IRUGO);
-MODULE_PARM_DESC(disable_hw_scan,
-		 "disable hardware scanning (default 0) (deprecated)");
+MODULE_PARM_DESC(disable_hw_scan, "disable hardware scanning (default 1)");
 module_param_named(fw_restart3945, iwl3945_mod_params.restart_fw, int, S_IRUGO);
 MODULE_PARM_DESC(fw_restart3945, "restart firmware in case of error");
 
-- 
1.7.1


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

* Re: [RFC/RFT] iwl3945: use software scanning by default
  2011-02-08 13:36 [RFC/RFT] iwl3945: use software scanning by default Stanislaw Gruszka
@ 2011-02-08 15:50 ` wwguy
  2011-02-09  6:45   ` Stanislaw Gruszka
  2011-02-14 12:08 ` Johannes Berg
  1 sibling, 1 reply; 5+ messages in thread
From: wwguy @ 2011-02-08 15:50 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: Intel Linux Wireless, linux-wireless@vger.kernel.org

Hi Stanislaw,

On Tue, 2011-02-08 at 05:36 -0800, Stanislaw Gruszka wrote:
> Looking for some more testing and opinions.
> 
> Patch fixes:
> https://bugzilla.redhat.com/show_bug.cgi?id=671366
> and probably some other "very poor performance" bugs reported
> elsewhere.
> 
> Sometimes after hardware scanning device is unable to receive frames
> at higher rate, what cause that very slow speed is observed by the users.
> 
> To workaround problem we can use software scanning. Patch remove
> "deprecated" warning and make sw scan be used by default on 3945.
> 
> On older kernels, in particular 2.6.35, software scanning does not
> fix problem. On my setup, not affected by bug, I can see slow speed
> with software scans on 2.6.35 as well. I'm not quite sure why. Anyway
> on upstream patch works good for me and bug reporter.
> 
> ---
>  drivers/net/wireless/iwlwifi/iwl-core.h     |    4 ++--
>  drivers/net/wireless/iwlwifi/iwl3945-base.c |   14 +++-----------
>  2 files changed, 5 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
> index 6e14a7b..9e7a6d1 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-core.h
> +++ b/drivers/net/wireless/iwlwifi/iwl-core.h
> @@ -254,8 +254,8 @@ struct iwl_ops {
>  };
>  
>  struct iwl_mod_params {
> -	int sw_crypto;		/* def: 0 = using hardware encryption */
> -	int disable_hw_scan;	/* def: 0 = use h/w scan */
> +	int sw_crypto;		/* def: HW dependent */
> +	int disable_hw_scan;	/* def: HW dependent */
>  	int num_of_queues;	/* def: HW dependent */
>  	int disable_11n;	/* def: 0 = 11n capabilities enabled */
>  	int amsdu_size_8K;	/* def: 1 = enable 8K amsdu size */
> diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
> index 10e8034..7d9e234 100644
> --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
> +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
> @@ -94,6 +94,7 @@ MODULE_LICENSE("GPL");
>  struct iwl_mod_params iwl3945_mod_params = {
>  	.sw_crypto = 1,
>  	.restart_fw = 1,
> +	.disable_hw_scan = 1,
>  	/* the rest are 0 by default */
>  };
>  
> @@ -3996,16 +3997,8 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
>  	priv->contexts[IWL_RXON_CTX_BSS].station_devtype = RXON_DEV_TYPE_ESS;
>  	priv->contexts[IWL_RXON_CTX_BSS].unused_devtype = RXON_DEV_TYPE_ESS;
>  
> -	/*
> -	 * Disabling hardware scan means that mac80211 will perform scans
> -	 * "the hard way", rather than using device's scan.
> -	 */
> -	if (iwl3945_mod_params.disable_hw_scan) {
> -		dev_printk(KERN_DEBUG, &(pdev->dev),
> -			"sw scan support is deprecated\n");
> +	if (iwl3945_mod_params.disable_hw_scan)
>  		iwl3945_hw_ops.hw_scan = NULL;
> -	}
> -
>  
>  	IWL_DEBUG_INFO(priv, "*** LOAD DRIVER ***\n");
>  	priv->cfg = cfg;
> @@ -4326,8 +4319,7 @@ MODULE_PARM_DESC(debug, "debug output mask");
>  #endif
>  module_param_named(disable_hw_scan, iwl3945_mod_params.disable_hw_scan,
>  		   int, S_IRUGO);
> -MODULE_PARM_DESC(disable_hw_scan,
> -		 "disable hardware scanning (default 0) (deprecated)");
> +MODULE_PARM_DESC(disable_hw_scan, "disable hardware scanning (default 1)");
>  module_param_named(fw_restart3945, iwl3945_mod_params.restart_fw, int, S_IRUGO);
>  MODULE_PARM_DESC(fw_restart3945, "restart firmware in case of error");
>  

don't have much experience with 3945, but not sure setting sw scan by
default is the right choice?

Wey


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

* Re: [RFC/RFT] iwl3945: use software scanning by default
  2011-02-08 15:50 ` wwguy
@ 2011-02-09  6:45   ` Stanislaw Gruszka
  0 siblings, 0 replies; 5+ messages in thread
From: Stanislaw Gruszka @ 2011-02-09  6:45 UTC (permalink / raw)
  To: wwguy; +Cc: Intel Linux Wireless, linux-wireless@vger.kernel.org

On Tue, Feb 08, 2011 at 07:50:07AM -0800, wwguy wrote:
> On Tue, 2011-02-08 at 05:36 -0800, Stanislaw Gruszka wrote:
> > Looking for some more testing and opinions.
> > 
> > Patch fixes:
> > https://bugzilla.redhat.com/show_bug.cgi?id=671366
> > and probably some other "very poor performance" bugs reported
> > elsewhere.
> > 
> > Sometimes after hardware scanning device is unable to receive frames
> > at higher rate, what cause that very slow speed is observed by the users.
> > 
> > To workaround problem we can use software scanning. Patch remove
> > "deprecated" warning and make sw scan be used by default on 3945.
> > 
> > On older kernels, in particular 2.6.35, software scanning does not
> > fix problem. On my setup, not affected by bug, I can see slow speed
> > with software scans on 2.6.35 as well. I'm not quite sure why. Anyway
> > on upstream patch works good for me and bug reporter.

[snip]

> > -MODULE_PARM_DESC(disable_hw_scan,
> > -		 "disable hardware scanning (default 0) (deprecated)");
> > +MODULE_PARM_DESC(disable_hw_scan, "disable hardware scanning (default 1)");
> >  module_param_named(fw_restart3945, iwl3945_mod_params.restart_fw, int, S_IRUGO);
> >  MODULE_PARM_DESC(fw_restart3945, "restart firmware in case of error");
> >  
> 
> don't have much experience with 3945, but not sure setting sw scan by
> default is the right choice?

Definitely hw scan is bad choice for some users.

I'll will provide patch for some more users to test, to see if
it not causing regression. On my laptop with iwl3945 it works
well with upstream kernel and bad with 2.6.35.

I'm not quite sure, why sw scaning improved currently.
I thought commit df13cce53a7b28a81460e6bfc4857e9df4956141
"mac80211: Improve software scan timing" fix things, but that
commit is also on 2.6.35 .

Stanislaw


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

* Re: [RFC/RFT] iwl3945: use software scanning by default
  2011-02-08 13:36 [RFC/RFT] iwl3945: use software scanning by default Stanislaw Gruszka
  2011-02-08 15:50 ` wwguy
@ 2011-02-14 12:08 ` Johannes Berg
  2011-02-14 12:40   ` Stanislaw Gruszka
  1 sibling, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2011-02-14 12:08 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: Wey-Yi Guy, Intel Linux Wireless, linux-wireless

On Tue, 2011-02-08 at 14:36 +0100, Stanislaw Gruszka wrote:
> Looking for some more testing and opinions.
> 
> Patch fixes:
> https://bugzilla.redhat.com/show_bug.cgi?id=671366
> and probably some other "very poor performance" bugs reported
> elsewhere.
> 
> Sometimes after hardware scanning device is unable to receive frames
> at higher rate, what cause that very slow speed is observed by the users.

Is there any more information about this problem?

My experience is limited to newer devices, but SW scan is typically not
really good because the device treats it as a disassoc/assoc. It may not
be as bad on 3945 as on newer devices though (where it's really not a
good idea due to dual-mode etc.)

johannes


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

* Re: [RFC/RFT] iwl3945: use software scanning by default
  2011-02-14 12:08 ` Johannes Berg
@ 2011-02-14 12:40   ` Stanislaw Gruszka
  0 siblings, 0 replies; 5+ messages in thread
From: Stanislaw Gruszka @ 2011-02-14 12:40 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Wey-Yi Guy, Intel Linux Wireless, linux-wireless

On Mon, Feb 14, 2011 at 01:08:19PM +0100, Johannes Berg wrote:
> On Tue, 2011-02-08 at 14:36 +0100, Stanislaw Gruszka wrote:
> > Looking for some more testing and opinions.
> > 
> > Patch fixes:
> > https://bugzilla.redhat.com/show_bug.cgi?id=671366
> > and probably some other "very poor performance" bugs reported
> > elsewhere.
> > 
> > Sometimes after hardware scanning device is unable to receive frames
> > at higher rate, what cause that very slow speed is observed by the users.
> 
> Is there any more information about this problem?

Only valuable data we have is on above bugzilla report:
- messages with IWL_DEBUG_SCAN and some other flags:
  https://bugzilla.redhat.com/attachment.cgi?id=476229
- wireshark capture:
  https://bugzilla.redhat.com/attachment.cgi?id=476614

There is lots of ubuntu users discussion here:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/621265?comments=all 
Most important information there is that removing plcp check
and/or not using NetworkManager helps (both triggers scans).

Stanislaw


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

end of thread, other threads:[~2011-02-14 12:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-08 13:36 [RFC/RFT] iwl3945: use software scanning by default Stanislaw Gruszka
2011-02-08 15:50 ` wwguy
2011-02-09  6:45   ` Stanislaw Gruszka
2011-02-14 12:08 ` Johannes Berg
2011-02-14 12:40   ` 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).