netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH] bcm43xx: set channel when the interface is brought up
@ 2007-01-25  6:50 Pavel Roskin
  2007-01-25  9:30 ` Jiri Benc
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Pavel Roskin @ 2007-01-25  6:50 UTC (permalink / raw)
  To: bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w, netdev-u79uwXL29TY76Z2rM5mHXA

Hello!

I have discovered that while I can indeed associate without
wpa_supplicant using bcm43xx_d80211 driver, I have to set the channel
every time the interface is brought down and up.

It turns out d80211 uses the "config" method of the hardware drivers
very sparingly.  It's only used for scanning and in ioctl commands.  It
is not called after the interface has been brought up with the "open"
method.

I don't know whose responsibility it should be to apply the
configuration when the interface is brought up.  I'm not familiar with
d80211 design principles.

If the hardware drivers are supposed to do it, here's my patch.  It is
working fine for me and ready to be applied.  The changelog is in the
subject.

Signed-off-by: Pavel Roskin <proski-mXXj517/zsQ@public.gmane.org>
---

 drivers/net/wireless/d80211/bcm43xx/bcm43xx_main.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/d80211/bcm43xx/bcm43xx_main.c b/drivers/net/wireless/d80211/bcm43xx/bcm43xx_main.c
index 9f4d51d..d408e38 100644
--- a/drivers/net/wireless/d80211/bcm43xx/bcm43xx_main.c
+++ b/drivers/net/wireless/d80211/bcm43xx/bcm43xx_main.c
@@ -2809,6 +2809,9 @@ static int bcm43xx_dev_open(struct ieee80211_hw *hw)
 	}
 	mutex_unlock(&wl->mutex);
 
+	if (!err)
+		err = bcm43xx_dev_config(hw, &hw->conf);
+
 	return err;
 }
 


-- 
Regards,
Pavel Roskin

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

* Re: [RFC PATCH] bcm43xx: set channel when the interface is brought up
  2007-01-25  6:50 [RFC PATCH] bcm43xx: set channel when the interface is brought up Pavel Roskin
@ 2007-01-25  9:30 ` Jiri Benc
  2007-01-25 11:47 ` Ivo Van Doorn
  2007-01-25 16:51 ` Michael Wu
  2 siblings, 0 replies; 13+ messages in thread
From: Jiri Benc @ 2007-01-25  9:30 UTC (permalink / raw)
  To: Pavel Roskin; +Cc: bcm43xx-dev, netdev, Michael Buesch

On Thu, 25 Jan 2007 01:50:54 -0500, Pavel Roskin wrote:
> It turns out d80211 uses the "config" method of the hardware drivers
> very sparingly.  It's only used for scanning and in ioctl commands.  It
> is not called after the interface has been brought up with the "open"
> method.
> 
> I don't know whose responsibility it should be to apply the
> configuration when the interface is brought up.  I'm not familiar with
> d80211 design principles.

I think it should be done in the stack (actually, it's on todo list for
quite some time). However, I don't consider this as a big problem -
just do it in a driver (like your patch does) for now.

 Jiri

-- 
Jiri Benc
SUSE Labs

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

* Re: [RFC PATCH] bcm43xx: set channel when the interface is brought up
  2007-01-25  6:50 [RFC PATCH] bcm43xx: set channel when the interface is brought up Pavel Roskin
  2007-01-25  9:30 ` Jiri Benc
@ 2007-01-25 11:47 ` Ivo Van Doorn
  2007-01-25 12:50   ` Jiri Benc
  2007-01-25 16:51 ` Michael Wu
  2 siblings, 1 reply; 13+ messages in thread
From: Ivo Van Doorn @ 2007-01-25 11:47 UTC (permalink / raw)
  To: Pavel Roskin; +Cc: bcm43xx-dev, netdev

Hi,

> I have discovered that while I can indeed associate without
> wpa_supplicant using bcm43xx_d80211 driver, I have to set the channel
> every time the interface is brought down and up.
>
> It turns out d80211 uses the "config" method of the hardware drivers
> very sparingly.  It's only used for scanning and in ioctl commands.  It
> is not called after the interface has been brought up with the "open"
> method.

Correct, similar problems have been detected in rt2x00. The temporary
solution in there is to demand a scanning operation after the interface
has been brought up.

> I don't know whose responsibility it should be to apply the
> configuration when the interface is brought up.  I'm not familiar with
> d80211 design principles.

Well my personal preference would be if the dscape stack handles it,
unless the stack guarentees the conf structure has been initialized
and contains valid data when the interface is being brought up.

Ivo

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

* Re: [RFC PATCH] bcm43xx: set channel when the interface is brought up
  2007-01-25 11:47 ` Ivo Van Doorn
@ 2007-01-25 12:50   ` Jiri Benc
  2007-01-25 12:57     ` Ivo Van Doorn
       [not found]     ` <20070125135033.7d7d7baf-IhiK2ZEFs2oCVLCxKZUutA@public.gmane.org>
  0 siblings, 2 replies; 13+ messages in thread
From: Jiri Benc @ 2007-01-25 12:50 UTC (permalink / raw)
  To: Ivo Van Doorn; +Cc: Pavel Roskin, bcm43xx-dev, netdev

On Thu, 25 Jan 2007 12:47:08 +0100, Ivo Van Doorn wrote:
> Correct, similar problems have been detected in rt2x00. The temporary
> solution in there is to demand a scanning operation after the interface
> has been brought up.

Scanning? No no no, please! That would be a clear bug and misbehaviour.

 Jiri

-- 
Jiri Benc
SUSE Labs

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

* Re: [RFC PATCH] bcm43xx: set channel when the interface is brought up
  2007-01-25 12:50   ` Jiri Benc
@ 2007-01-25 12:57     ` Ivo Van Doorn
       [not found]     ` <20070125135033.7d7d7baf-IhiK2ZEFs2oCVLCxKZUutA@public.gmane.org>
  1 sibling, 0 replies; 13+ messages in thread
From: Ivo Van Doorn @ 2007-01-25 12:57 UTC (permalink / raw)
  To: Jiri Benc; +Cc: Pavel Roskin, bcm43xx-dev, netdev

Hi,

> > Correct, similar problems have been detected in rt2x00. The temporary
> > solution in there is to demand a scanning operation after the interface
> > has been brought up.
>
> Scanning? No no no, please! That would be a clear bug and misbehaviour.

Hmm, I think I forgot to add one little thing in my comment.
The scanning operation is demanded in the rt2x00 README, so the driver
doesn't start the scanning automatically and just awaits the user commands.
The user is also free to change the channel to make the configuration active.
But a scanning command will also display if it has at least found some AP,
so without scanning results attempting to scan will very likely fail. ;)

Ivo

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

* Re: [RFC PATCH] bcm43xx: set channel when the interface is brought up
       [not found]     ` <20070125135033.7d7d7baf-IhiK2ZEFs2oCVLCxKZUutA@public.gmane.org>
@ 2007-01-25 14:05       ` Gene Heskett
  2007-01-25 14:23         ` Jiri Benc
  2007-01-25 15:36         ` Larry Finger
  0 siblings, 2 replies; 13+ messages in thread
From: Gene Heskett @ 2007-01-25 14:05 UTC (permalink / raw)
  To: bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w
  Cc: Jiri Benc, netdev-u79uwXL29TY76Z2rM5mHXA, Ivo Van Doorn

On Thursday 25 January 2007 07:50, Jiri Benc wrote:
>On Thu, 25 Jan 2007 12:47:08 +0100, Ivo Van Doorn wrote:
>> Correct, similar problems have been detected in rt2x00. The temporary
>> solution in there is to demand a scanning operation after the
>> interface has been brought up.
>
>Scanning? No no no, please! That would be a clear bug and misbehaviour.
>
> Jiri

Oh?  I'm sitting here watching the tty0 screen of my lappy after x has 
been started, and I have established a connection, but SoftMAC is still 
logging its scan activity, starting with channel 1 and scanning 14 
channels.  Its doing this at approximately 2 minute intervals.  So I 
think we have your definition of a clear bug and misbehaviour.

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Yahoo.com and AOL/TW attorneys please note, additions to the above
message by Gene Heskett are:
Copyright 2007 by Maurice Eugene Heskett, all rights reserved.

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

* Re: [RFC PATCH] bcm43xx: set channel when the interface is brought up
  2007-01-25 14:05       ` Gene Heskett
@ 2007-01-25 14:23         ` Jiri Benc
       [not found]           ` <20070125152321.434bb17c-IhiK2ZEFs2oCVLCxKZUutA@public.gmane.org>
  2007-01-25 15:36         ` Larry Finger
  1 sibling, 1 reply; 13+ messages in thread
From: Jiri Benc @ 2007-01-25 14:23 UTC (permalink / raw)
  To: Gene Heskett; +Cc: bcm43xx-dev, Ivo Van Doorn, netdev

On Thu, 25 Jan 2007 09:05:32 -0500, Gene Heskett wrote:
> Oh?  I'm sitting here watching the tty0 screen of my lappy after x has 
> been started, and I have established a connection, but SoftMAC is still 
> logging its scan activity, starting with channel 1 and scanning 14 
> channels.  Its doing this at approximately 2 minute intervals.  So I 
> think we have your definition of a clear bug and misbehaviour.

Yes. As well as some other wireless drivers. But that's not worth
fixing.

Also, please note that softmac isn't going to do user space MLME so
it is not relevant at all.

 Jiri

-- 
Jiri Benc
SUSE Labs

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

* Re: [RFC PATCH] bcm43xx: set channel when the interface is brought up
       [not found]           ` <20070125152321.434bb17c-IhiK2ZEFs2oCVLCxKZUutA@public.gmane.org>
@ 2007-01-25 14:34             ` Gene Heskett
  2007-01-26 13:45               ` Johannes Berg
  0 siblings, 1 reply; 13+ messages in thread
From: Gene Heskett @ 2007-01-25 14:34 UTC (permalink / raw)
  To: Jiri Benc
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, Ivo Van Doorn,
	bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w

On Thursday 25 January 2007 09:23, Jiri Benc wrote:
>On Thu, 25 Jan 2007 09:05:32 -0500, Gene Heskett wrote:
>> Oh?  I'm sitting here watching the tty0 screen of my lappy after x has
>> been started, and I have established a connection, but SoftMAC is
>> still logging its scan activity, starting with channel 1 and scanning
>> 14 channels.  Its doing this at approximately 2 minute intervals.  So
>> I think we have your definition of a clear bug and misbehaviour.
>
>Yes. As well as some other wireless drivers. But that's not worth
>fixing.
>
>Also, please note that softmac isn't going to do user space MLME so
>it is not relevant at all.

MLME?  More acronyms I've not put in my wet dictionary.. :)

> Jiri

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Yahoo.com and AOL/TW attorneys please note, additions to the above
message by Gene Heskett are:
Copyright 2007 by Maurice Eugene Heskett, all rights reserved.

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

* Re: [RFC PATCH] bcm43xx: set channel when the interface is brought up
  2007-01-25 14:05       ` Gene Heskett
  2007-01-25 14:23         ` Jiri Benc
@ 2007-01-25 15:36         ` Larry Finger
  2007-01-25 16:26           ` Dan Williams
  1 sibling, 1 reply; 13+ messages in thread
From: Larry Finger @ 2007-01-25 15:36 UTC (permalink / raw)
  To: Gene Heskett; +Cc: bcm43xx-dev, Jiri Benc, netdev, Ivo Van Doorn

Gene Heskett wrote:
> On Thursday 25 January 2007 07:50, Jiri Benc wrote:
>> On Thu, 25 Jan 2007 12:47:08 +0100, Ivo Van Doorn wrote:
>>> Correct, similar problems have been detected in rt2x00. The temporary
>>> solution in there is to demand a scanning operation after the
>>> interface has been brought up.
>> Scanning? No no no, please! That would be a clear bug and misbehaviour.
>>
>> Jiri
> 
> Oh?  I'm sitting here watching the tty0 screen of my lappy after x has 
> been started, and I have established a connection, but SoftMAC is still 
> logging its scan activity, starting with channel 1 and scanning 14 
> channels.  Its doing this at approximately 2 minute intervals.  So I 
> think we have your definition of a clear bug and misbehaviour.
> 

Are you running NetworkManager? If so, that is the source of the scanning.

Larry


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

* Re: [RFC PATCH] bcm43xx: set channel when the interface is brought up
  2007-01-25 15:36         ` Larry Finger
@ 2007-01-25 16:26           ` Dan Williams
  0 siblings, 0 replies; 13+ messages in thread
From: Dan Williams @ 2007-01-25 16:26 UTC (permalink / raw)
  To: Larry Finger; +Cc: Gene Heskett, bcm43xx-dev, Jiri Benc, netdev, Ivo Van Doorn

On Thu, 2007-01-25 at 09:36 -0600, Larry Finger wrote:
> Gene Heskett wrote:
> > On Thursday 25 January 2007 07:50, Jiri Benc wrote:
> >> On Thu, 25 Jan 2007 12:47:08 +0100, Ivo Van Doorn wrote:
> >>> Correct, similar problems have been detected in rt2x00. The temporary
> >>> solution in there is to demand a scanning operation after the
> >>> interface has been brought up.
> >> Scanning? No no no, please! That would be a clear bug and misbehaviour.
> >>
> >> Jiri
> > 
> > Oh?  I'm sitting here watching the tty0 screen of my lappy after x has 
> > been started, and I have established a connection, but SoftMAC is still 
> > logging its scan activity, starting with channel 1 and scanning 14 
> > channels.  Its doing this at approximately 2 minute intervals.  So I 
> > think we have your definition of a clear bug and misbehaviour.
> > 
> 
> Are you running NetworkManager? If so, that is the source of the scanning.

Right; and NM scans at 2m intervals by default, unless you've clicked
the menu (or a few other instances) where it will jump up to 20s and
then back off to 2m again.

dan


> Larry
> 
> -
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

* Re: [RFC PATCH] bcm43xx: set channel when the interface is brought up
  2007-01-25  6:50 [RFC PATCH] bcm43xx: set channel when the interface is brought up Pavel Roskin
  2007-01-25  9:30 ` Jiri Benc
  2007-01-25 11:47 ` Ivo Van Doorn
@ 2007-01-25 16:51 ` Michael Wu
  2007-01-25 20:12   ` John W. Linville
  2 siblings, 1 reply; 13+ messages in thread
From: Michael Wu @ 2007-01-25 16:51 UTC (permalink / raw)
  To: Pavel Roskin; +Cc: bcm43xx-dev, netdev

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

On Thursday 25 January 2007 01:50, Pavel Roskin wrote:
> If the hardware drivers are supposed to do it, here's my patch.  It is
> working fine for me and ready to be applied.  The changelog is in the
> subject.
Let's fix this in the stack. This problem will be fixed for most users once 
auto channel selection is implemented, and fixing it for users manually 
setting the channel should be trivial.

-Michael Wu

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [RFC PATCH] bcm43xx: set channel when the interface is brought up
  2007-01-25 16:51 ` Michael Wu
@ 2007-01-25 20:12   ` John W. Linville
  0 siblings, 0 replies; 13+ messages in thread
From: John W. Linville @ 2007-01-25 20:12 UTC (permalink / raw)
  To: Michael Wu; +Cc: Pavel Roskin, bcm43xx-dev, netdev

On Thu, Jan 25, 2007 at 11:51:27AM -0500, Michael Wu wrote:
> On Thursday 25 January 2007 01:50, Pavel Roskin wrote:
> > If the hardware drivers are supposed to do it, here's my patch.  It is
> > working fine for me and ready to be applied.  The changelog is in the
> > subject.
> Let's fix this in the stack. This problem will be fixed for most users once 
> auto channel selection is implemented, and fixing it for users manually 
> setting the channel should be trivial.

ACK...fixing the stack makes the most sense.

-- 
John W. Linville
linville@tuxdriver.com

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

* Re: [RFC PATCH] bcm43xx: set channel when the interface is brought up
  2007-01-25 14:34             ` Gene Heskett
@ 2007-01-26 13:45               ` Johannes Berg
  0 siblings, 0 replies; 13+ messages in thread
From: Johannes Berg @ 2007-01-26 13:45 UTC (permalink / raw)
  To: Gene Heskett; +Cc: Jiri Benc, netdev, Ivo Van Doorn, bcm43xx-dev

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

On Thu, 2007-01-25 at 09:34 -0500, Gene Heskett wrote:

> MLME?  More acronyms I've not put in my wet dictionary.. :)

The 802.11 specs have a huge list of acronyms you might want to be
somewhat familiar with. I think I have a printout somewhere, can't ever
remember them either ;)

johannes

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

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

end of thread, other threads:[~2007-01-26 13:46 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-25  6:50 [RFC PATCH] bcm43xx: set channel when the interface is brought up Pavel Roskin
2007-01-25  9:30 ` Jiri Benc
2007-01-25 11:47 ` Ivo Van Doorn
2007-01-25 12:50   ` Jiri Benc
2007-01-25 12:57     ` Ivo Van Doorn
     [not found]     ` <20070125135033.7d7d7baf-IhiK2ZEFs2oCVLCxKZUutA@public.gmane.org>
2007-01-25 14:05       ` Gene Heskett
2007-01-25 14:23         ` Jiri Benc
     [not found]           ` <20070125152321.434bb17c-IhiK2ZEFs2oCVLCxKZUutA@public.gmane.org>
2007-01-25 14:34             ` Gene Heskett
2007-01-26 13:45               ` Johannes Berg
2007-01-25 15:36         ` Larry Finger
2007-01-25 16:26           ` Dan Williams
2007-01-25 16:51 ` Michael Wu
2007-01-25 20:12   ` John W. Linville

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