linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 09/29] mwl8k: remove usage of deprecated radio_enabled
@ 2009-08-18  3:52 Lennert Buytenhek
  2009-08-18  7:27 ` Johannes Berg
  2009-08-18  7:28 ` Johannes Berg
  0 siblings, 2 replies; 7+ messages in thread
From: Lennert Buytenhek @ 2009-08-18  3:52 UTC (permalink / raw)
  To: linville, linux-wireless

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
---
 drivers/net/wireless/mwl8k.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index 9f54204..3a201a2 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -2935,7 +2935,7 @@ static int mwl8k_config_wt(struct work_struct *wt)
 	struct mwl8k_priv *priv = hw->priv;
 	int rc = 0;
 
-	if (!conf->radio_enabled) {
+	if (conf->flags & IEEE80211_CONF_IDLE) {
 		mwl8k_cmd_802_11_radio_disable(hw);
 		priv->current_channel = NULL;
 		rc = 0;
-- 
1.5.6.4

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

* Re: [PATCH 09/29] mwl8k: remove usage of deprecated radio_enabled
  2009-08-18  3:52 [PATCH 09/29] mwl8k: remove usage of deprecated radio_enabled Lennert Buytenhek
@ 2009-08-18  7:27 ` Johannes Berg
  2009-08-18  8:24   ` Lennert Buytenhek
  2009-08-18  7:28 ` Johannes Berg
  1 sibling, 1 reply; 7+ messages in thread
From: Johannes Berg @ 2009-08-18  7:27 UTC (permalink / raw)
  To: Lennert Buytenhek; +Cc: linville, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 895 bytes --]

On Tue, 2009-08-18 at 05:52 +0200, Lennert Buytenhek wrote:
> Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
> ---
>  drivers/net/wireless/mwl8k.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
> index 9f54204..3a201a2 100644
> --- a/drivers/net/wireless/mwl8k.c
> +++ b/drivers/net/wireless/mwl8k.c
> @@ -2935,7 +2935,7 @@ static int mwl8k_config_wt(struct work_struct *wt)
>  	struct mwl8k_priv *priv = hw->priv;
>  	int rc = 0;
>  
> -	if (!conf->radio_enabled) {
> +	if (conf->flags & IEEE80211_CONF_IDLE) {

Ok, I thought about doing this but wasn't sure it would work -- you can
still accept channel changing commands while the radio is off, for
instance?

Anyway, this clashes with the removal of this chunk of code, which
should then just not happen.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

* Re: [PATCH 09/29] mwl8k: remove usage of deprecated radio_enabled
  2009-08-18  3:52 [PATCH 09/29] mwl8k: remove usage of deprecated radio_enabled Lennert Buytenhek
  2009-08-18  7:27 ` Johannes Berg
@ 2009-08-18  7:28 ` Johannes Berg
  2009-08-18  8:25   ` Lennert Buytenhek
  1 sibling, 1 reply; 7+ messages in thread
From: Johannes Berg @ 2009-08-18  7:28 UTC (permalink / raw)
  To: Lennert Buytenhek; +Cc: linville, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 942 bytes --]

On Tue, 2009-08-18 at 05:52 +0200, Lennert Buytenhek wrote:
> Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
> ---
>  drivers/net/wireless/mwl8k.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
> index 9f54204..3a201a2 100644
> --- a/drivers/net/wireless/mwl8k.c
> +++ b/drivers/net/wireless/mwl8k.c
> @@ -2935,7 +2935,7 @@ static int mwl8k_config_wt(struct work_struct *wt)
>  	struct mwl8k_priv *priv = hw->priv;
>  	int rc = 0;
>  
> -	if (!conf->radio_enabled) {
> +	if (conf->flags & IEEE80211_CONF_IDLE) {
>  		mwl8k_cmd_802_11_radio_disable(hw);
>  		priv->current_channel = NULL;
>  		rc = 0;

So I think the return; a little below needs to be removed to allow doing
other things while the radio is off? I'm not sure which actually happen
but I never audited the code to make sure nothing happens.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

* Re: [PATCH 09/29] mwl8k: remove usage of deprecated radio_enabled
  2009-08-18  7:27 ` Johannes Berg
@ 2009-08-18  8:24   ` Lennert Buytenhek
  0 siblings, 0 replies; 7+ messages in thread
From: Lennert Buytenhek @ 2009-08-18  8:24 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linville, linux-wireless

On Tue, Aug 18, 2009 at 09:27:46AM +0200, Johannes Berg wrote:

> > Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
> > ---
> >  drivers/net/wireless/mwl8k.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
> > index 9f54204..3a201a2 100644
> > --- a/drivers/net/wireless/mwl8k.c
> > +++ b/drivers/net/wireless/mwl8k.c
> > @@ -2935,7 +2935,7 @@ static int mwl8k_config_wt(struct work_struct *wt)
> >  	struct mwl8k_priv *priv = hw->priv;
> >  	int rc = 0;
> >  
> > -	if (!conf->radio_enabled) {
> > +	if (conf->flags & IEEE80211_CONF_IDLE) {
> 
> Ok, I thought about doing this but wasn't sure it would work -- you can
> still accept channel changing commands while the radio is off, for
> instance?

The hardware would accept those commands, but they wouldn't have any
effect, since the radio is off.  If/when we then go out of idle later,
the channel set and power set and antenna config commands will be run,
so we'll end up with the right parameters.

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

* Re: [PATCH 09/29] mwl8k: remove usage of deprecated radio_enabled
  2009-08-18  7:28 ` Johannes Berg
@ 2009-08-18  8:25   ` Lennert Buytenhek
  2009-08-18  8:26     ` Johannes Berg
  0 siblings, 1 reply; 7+ messages in thread
From: Lennert Buytenhek @ 2009-08-18  8:25 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linville, linux-wireless

On Tue, Aug 18, 2009 at 09:28:29AM +0200, Johannes Berg wrote:

> > Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
> > ---
> >  drivers/net/wireless/mwl8k.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
> > index 9f54204..3a201a2 100644
> > --- a/drivers/net/wireless/mwl8k.c
> > +++ b/drivers/net/wireless/mwl8k.c
> > @@ -2935,7 +2935,7 @@ static int mwl8k_config_wt(struct work_struct *wt)
> >  	struct mwl8k_priv *priv = hw->priv;
> >  	int rc = 0;
> >  
> > -	if (!conf->radio_enabled) {
> > +	if (conf->flags & IEEE80211_CONF_IDLE) {
> >  		mwl8k_cmd_802_11_radio_disable(hw);
> >  		priv->current_channel = NULL;
> >  		rc = 0;
> 
> So I think the return; a little below needs to be removed to allow doing
> other things while the radio is off? I'm not sure which actually happen
> but I never audited the code to make sure nothing happens.

The logic is just:

	if (idle) {
		issue "radio disable" command
	} else {
		issue "radio enable" command
		set channel
		set tx power
		set antenna config
	}

So if a channel change hapens while we are idle, that event won't get
lost -- it'll just happen later.

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

* Re: [PATCH 09/29] mwl8k: remove usage of deprecated radio_enabled
  2009-08-18  8:25   ` Lennert Buytenhek
@ 2009-08-18  8:26     ` Johannes Berg
  2009-08-18  9:52       ` Lennert Buytenhek
  0 siblings, 1 reply; 7+ messages in thread
From: Johannes Berg @ 2009-08-18  8:26 UTC (permalink / raw)
  To: Lennert Buytenhek; +Cc: linville, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 407 bytes --]

On Tue, 2009-08-18 at 10:25 +0200, Lennert Buytenhek wrote:

> The logic is just:
> 
> 	if (idle) {
> 		issue "radio disable" command
> 	} else {
> 		issue "radio enable" command
> 		set channel
> 		set tx power
> 		set antenna config
> 	}
> 
> So if a channel change hapens while we are idle, that event won't get
> lost -- it'll just happen later.

Ok, yeah, that looks fine.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

* Re: [PATCH 09/29] mwl8k: remove usage of deprecated radio_enabled
  2009-08-18  8:26     ` Johannes Berg
@ 2009-08-18  9:52       ` Lennert Buytenhek
  0 siblings, 0 replies; 7+ messages in thread
From: Lennert Buytenhek @ 2009-08-18  9:52 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linville, linux-wireless

On Tue, Aug 18, 2009 at 10:26:33AM +0200, Johannes Berg wrote:

> > The logic is just:
> > 
> > 	if (idle) {
> > 		issue "radio disable" command
> > 	} else {
> > 		issue "radio enable" command
> > 		set channel
> > 		set tx power
> > 		set antenna config
> > 	}
> > 
> > So if a channel change hapens while we are idle, that event won't get
> > lost -- it'll just happen later.
> 
> Ok, yeah, that looks fine.

OK, thanks.

Since your patch is already in, I've replaced this patch by:


>From 1af73ff8d1309b924f6f4accd61245b57374dd78 Mon Sep 17 00:00:00 2001
From: Lennert Buytenhek <buytenh@wantstofly.org>
Date: Mon, 17 Aug 2009 23:59:40 +0200
Subject: [PATCH 15/29] mwl8k: implement rfkill

By checking IEEE80211_CONF_CHANGE_IDLE in mwl8k_config().

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
---
 drivers/net/wireless/mwl8k.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index 177d92f..65eefe8 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -2854,6 +2854,12 @@ static int mwl8k_config_wt(struct work_struct *wt)
 	struct mwl8k_priv *priv = hw->priv;
 	int rc = 0;
 
+	if (conf->flags & IEEE80211_CONF_IDLE) {
+		mwl8k_cmd_802_11_radio_disable(hw);
+		priv->current_channel = NULL;
+		goto mwl8k_config_exit;
+	}
+
 	if (mwl8k_cmd_802_11_radio_enable(hw)) {
 		rc = -EINVAL;
 		goto mwl8k_config_exit;
-- 
1.5.6.4

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

end of thread, other threads:[~2009-08-18  9:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-18  3:52 [PATCH 09/29] mwl8k: remove usage of deprecated radio_enabled Lennert Buytenhek
2009-08-18  7:27 ` Johannes Berg
2009-08-18  8:24   ` Lennert Buytenhek
2009-08-18  7:28 ` Johannes Berg
2009-08-18  8:25   ` Lennert Buytenhek
2009-08-18  8:26     ` Johannes Berg
2009-08-18  9:52       ` Lennert Buytenhek

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).