public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libertas: Remove carrier signaling from the scan code
@ 2009-12-18 10:36 Samuel Ortiz
  2009-12-19  8:41 ` Dan Williams
  0 siblings, 1 reply; 4+ messages in thread
From: Samuel Ortiz @ 2009-12-18 10:36 UTC (permalink / raw)
  To: linux-wireless, John W. Linville; +Cc: Dan Williams, Holger Schurig

    
There is no reason to signal a carrier off when doing a 802.11 scan.

Cc: Dan Williams <dcbw@redhat.com>
Cc: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
---
 drivers/net/wireless/libertas/scan.c |   22 ++++++++--------------
 1 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c
index c6a6c04..b0b1c78 100644
--- a/drivers/net/wireless/libertas/scan.c
+++ b/drivers/net/wireless/libertas/scan.c
@@ -567,11 +567,8 @@ int lbs_scan_networks(struct lbs_private *priv, int full_scan)
 	chan_count = lbs_scan_create_channel_list(priv, chan_list);
 
 	netif_stop_queue(priv->dev);
-	netif_carrier_off(priv->dev);
-	if (priv->mesh_dev) {
+	if (priv->mesh_dev)
 		netif_stop_queue(priv->mesh_dev);
-		netif_carrier_off(priv->mesh_dev);
-	}
 
 	/* Prepare to continue an interrupted scan */
 	lbs_deb_scan("chan_count %d, scan_channel %d\n",
@@ -635,16 +632,13 @@ out2:
 	priv->scan_channel = 0;
 
 out:
-	if (priv->connect_status == LBS_CONNECTED) {
-		netif_carrier_on(priv->dev);
-		if (!priv->tx_pending_len)
-			netif_wake_queue(priv->dev);
-	}
-	if (priv->mesh_dev && (priv->mesh_connect_status == LBS_CONNECTED)) {
-		netif_carrier_on(priv->mesh_dev);
-		if (!priv->tx_pending_len)
-			netif_wake_queue(priv->mesh_dev);
-	}
+	if (priv->connect_status == LBS_CONNECTED && !priv->tx_pending_len)
+		netif_wake_queue(priv->dev);
+
+	if (priv->mesh_dev && (priv->mesh_connect_status == LBS_CONNECTED) &&
+	    !priv->tx_pending_len)
+		netif_wake_queue(priv->mesh_dev);
+
 	kfree(chan_list);
 
 	lbs_deb_leave_args(LBS_DEB_SCAN, "ret %d", ret);
-- 
1.6.3.3

Intel Open Source Technology Centre
http://oss.intel.com/

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

* Re: [PATCH] libertas: Remove carrier signaling from the scan code
  2009-12-18 10:36 [PATCH] libertas: Remove carrier signaling from the scan code Samuel Ortiz
@ 2009-12-19  8:41 ` Dan Williams
  2009-12-28  1:41   ` Marcel Holtmann
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Williams @ 2009-12-19  8:41 UTC (permalink / raw)
  To: Samuel Ortiz; +Cc: linux-wireless, John W. Linville, Holger Schurig

On Fri, 2009-12-18 at 11:36 +0100, Samuel Ortiz wrote:
> There is no reason to signal a carrier off when doing a 802.11 scan.
> 
> Cc: Dan Williams <dcbw@redhat.com>
> Cc: Holger Schurig <holgerschurig@gmail.com>
> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>

Acked-by: Dan Williams <dcbw@redhat.com>

> ---
>  drivers/net/wireless/libertas/scan.c |   22 ++++++++--------------
>  1 files changed, 8 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c
> index c6a6c04..b0b1c78 100644
> --- a/drivers/net/wireless/libertas/scan.c
> +++ b/drivers/net/wireless/libertas/scan.c
> @@ -567,11 +567,8 @@ int lbs_scan_networks(struct lbs_private *priv, int full_scan)
>  	chan_count = lbs_scan_create_channel_list(priv, chan_list);
>  
>  	netif_stop_queue(priv->dev);
> -	netif_carrier_off(priv->dev);
> -	if (priv->mesh_dev) {
> +	if (priv->mesh_dev)
>  		netif_stop_queue(priv->mesh_dev);
> -		netif_carrier_off(priv->mesh_dev);
> -	}
>  
>  	/* Prepare to continue an interrupted scan */
>  	lbs_deb_scan("chan_count %d, scan_channel %d\n",
> @@ -635,16 +632,13 @@ out2:
>  	priv->scan_channel = 0;
>  
>  out:
> -	if (priv->connect_status == LBS_CONNECTED) {
> -		netif_carrier_on(priv->dev);
> -		if (!priv->tx_pending_len)
> -			netif_wake_queue(priv->dev);
> -	}
> -	if (priv->mesh_dev && (priv->mesh_connect_status == LBS_CONNECTED)) {
> -		netif_carrier_on(priv->mesh_dev);
> -		if (!priv->tx_pending_len)
> -			netif_wake_queue(priv->mesh_dev);
> -	}
> +	if (priv->connect_status == LBS_CONNECTED && !priv->tx_pending_len)
> +		netif_wake_queue(priv->dev);
> +
> +	if (priv->mesh_dev && (priv->mesh_connect_status == LBS_CONNECTED) &&
> +	    !priv->tx_pending_len)
> +		netif_wake_queue(priv->mesh_dev);
> +
>  	kfree(chan_list);
>  
>  	lbs_deb_leave_args(LBS_DEB_SCAN, "ret %d", ret);


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

* Re: [PATCH] libertas: Remove carrier signaling from the scan code
  2009-12-19  8:41 ` Dan Williams
@ 2009-12-28  1:41   ` Marcel Holtmann
  2010-01-07  6:25     ` Dan Williams
  0 siblings, 1 reply; 4+ messages in thread
From: Marcel Holtmann @ 2009-12-28  1:41 UTC (permalink / raw)
  To: Dan Williams, John W. Linville
  Cc: Samuel Ortiz, linux-wireless, John W. Linville, Holger Schurig

Hi John,

> > There is no reason to signal a carrier off when doing a 802.11 scan.
> > 
> > Cc: Dan Williams <dcbw@redhat.com>
> > Cc: Holger Schurig <holgerschurig@gmail.com>
> > Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
> 
> Acked-by: Dan Williams <dcbw@redhat.com>

can we get this driver merged since no wireless driver should play with
carrier on/off settings during scanning.

I would actually go that far that we should fix it in 2.6.33 and also
backport it to -stable.

Regards

Marcel



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

* Re: [PATCH] libertas: Remove carrier signaling from the scan code
  2009-12-28  1:41   ` Marcel Holtmann
@ 2010-01-07  6:25     ` Dan Williams
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Williams @ 2010-01-07  6:25 UTC (permalink / raw)
  To: Marcel Holtmann
  Cc: John W. Linville, Samuel Ortiz, linux-wireless, Holger Schurig

On Sun, 2009-12-27 at 17:41 -0800, Marcel Holtmann wrote:
> Hi John,
> 
> > > There is no reason to signal a carrier off when doing a 802.11 scan.
> > > 
> > > Cc: Dan Williams <dcbw@redhat.com>
> > > Cc: Holger Schurig <holgerschurig@gmail.com>
> > > Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
> > 
> > Acked-by: Dan Williams <dcbw@redhat.com>
> 
> can we get this driver merged since no wireless driver should play with
> carrier on/off settings during scanning.
> 
> I would actually go that far that we should fix it in 2.6.33 and also
> backport it to -stable.

Well likewise even if it *did* play with carrier, nothing should be
listening to the carrier signal for wifi devices anyway.  So it
shouldn't really be a problem.

Dan



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

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

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-18 10:36 [PATCH] libertas: Remove carrier signaling from the scan code Samuel Ortiz
2009-12-19  8:41 ` Dan Williams
2009-12-28  1:41   ` Marcel Holtmann
2010-01-07  6:25     ` Dan Williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox