Skip to contentSkip to conversation

bcm43xx: set channel when the interface is brought up

RFC PATCH In review Pavel Roskin 9 participants 13 messages Jan 25, 2007 – Jan 26, 2007 2 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 bcm43xx: set channel when the interface is brought up

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.

---

 drivers/net/wireless/d80211/bcm43xx/bcm43xx_main.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/net/wireless/d80211/bcm43xx/bcm43xx_main.c +3 -0
index 9f4d51d..d408e38 100644
@@ -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;
 }
 
Signature · 2 lines
Regards,
Pavel Roskin
#1 lore raw
Quoted 8 lines · Pavel Roskin

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

Signature · 2 lines
Jiri Benc
SUSE Labs
#2 lore raw
In reply to Pavel Roskin

Hi,

Quoted 8 lines

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.

Quoted 3 lines

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

#3 lore raw
Quoted 3 lines · Ivo Van Doorn

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

Signature · 2 lines
Jiri Benc
SUSE Labs
#4 lore raw

Hi,

Quoted 5 lines
Quoted 3 lines

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

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw
Quoted 8 lines · Jiri Benc
Quoted 3 lines · Ivo Van Doorn

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.

Signature · 7 lines
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.
#7 lore raw
Quoted 5 lines · Gene Heskett

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

Signature · 2 lines
Jiri Benc
SUSE Labs

A message that is not in the archive (sent off-list or not yet received): [email protected]

#9 lore raw
Quoted 7 lines · Jiri Benc
Quoted 5 lines · Gene Heskett

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.

Quoted 5 lines

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

Quoted 1 line

Jiri

Signature · 7 lines
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.
maintainer
#10 lore raw
Quoted 1 line · Gene Heskett

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

#11 lore raw
In reply to Gene Heskett
Quoted 7 lines · Gene Heskett
Quoted 6 lines · Jiri Benc
Quoted 3 lines · Ivo Van Doorn

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.

Quoted 8 lines
Quoted 1 line

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

#12 lore raw
Quoted 10 lines · Larry Finger
Quoted 9 lines · Gene Heskett
Quoted 7 lines · Jiri Benc
Quoted 3 lines · Ivo Van Doorn

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

Quoted 8 lines
Quoted 6 lines

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

Quoted 6 lines

Larry

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

#13 lore raw
In reply to Pavel Roskin
Quoted 3 lines · Pavel Roskin

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

#14 lore raw
Quoted 7 lines · Michael Wu
Quoted 3 lines · Pavel Roskin

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.

Signature · 2 lines
John W. Linville
[email protected]