Skip to contentSkip to conversation

w35und: fix registration with wlan stack

PATCH In review Pavel Machek 3 participants 5 messages Jan 30, 2009 10 messages not in the archive Staging

lore
Share & tools
lore

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

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

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

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

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

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

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

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

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

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

#10 lore raw

PATCH 1/1 w35und: fix registration with wlan stack

Initialize few more fields in wireless device structure so that wireless core actually accepts our registration.

---
commit 87290671d60a4f0e734f389a266b13d71c275ce4
tree c8e312a3ef0b0d250c1e605ce86bff94c0254847
parent e6de9be58f118cba6ccfef28830db701b8cc9f46 author Pavel <[email protected]> Fri, 30 Jan 2009 09:08:36 +0100 committer Pavel <[email protected]> Fri, 30 Jan 2009 09:08:36 +0100

 drivers/staging/winbond/wbusb.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/staging/winbond/wbusb.c +3 -1
index b003f9a..49f1bf0 100644
@@ -369,9 +369,11 @@ static int wb35_probe(struct usb_interface *intf, const struct usb_device_id *id
 	}
 
 	dev->extra_tx_headroom = 12;	/* FIXME */
-	dev->flags = 0;
+	dev->flags = IEEE80211_HW_SIGNAL_UNSPEC;
+	dev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION);
 
 	dev->channel_change_time = 1000;
+	dev->max_signal = 100;
 	dev->queues = 1;
 
 	dev->wiphy->bands[IEEE80211_BAND_2GHZ] = &wbsoft_band_2GHz;
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Acked-by on v1 1/1
#11 lore raw
Quoted 4 lines · Pavel Machek

Initialize few more fields in wireless device structure so that wireless core actually accepts our registration.

Looking at the changes, lets see if we can get some more review on this:

Quoted 15 lines

---
commit 87290671d60a4f0e734f389a266b13d71c275ce4
tree c8e312a3ef0b0d250c1e605ce86bff94c0254847
parent e6de9be58f118cba6ccfef28830db701b8cc9f46 author Pavel <[email protected]> Fri, 30 Jan 2009 09:08:36 +0100 committer Pavel <[email protected]> Fri, 30 Jan 2009 09:08:36 +0100

 drivers/staging/winbond/wbusb.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/staging/winbond/wbusb.c +0 -0
index b003f9a..49f1bf0 100644

drivers/staging/winbond/wbusb.c static int wb35_probe(struct usb_interface *intf, const struct usb_device_id *id · line 373

Quoted 6 lines
drivers/staging/winbond/wbusb.c +2 -1
@@ -369,9 +369,11 @@ static int wb35_probe(struct usb_interface *intf, const struct usb_device_id *id
 	}
 
 	dev->extra_tx_headroom = 12;	/* FIXME */
-	dev->flags = 0;
+	dev->flags = IEEE80211_HW_SIGNAL_UNSPEC;
+	dev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION);

The wiphy->interface_modes thing is probably fall-out from commit 8dffff216fcac4f79078478085e86d68db64922e ("mac80211: only create default STA interface if supported"). I'm cc'ing Johannes.

drivers/staging/winbond/wbusb.c static int wb35_probe(struct usb_interface *intf, const struct usb_device_id *id · line 376

Quoted 3 lines
drivers/staging/winbond/wbusb.c +1 -0
 	dev->channel_change_time = 1000;
+	dev->max_signal = 100;

And the IEEE80211_HW_SIGNAL_UNSPEC and ->max_signal from commit 566bfe5a8bcde13188a356f77666f8115813cf31 ("mac80211: use hardware flags for signal/noise units"). Lets cc Bruno.

Quoted 3 lines
drivers/staging/winbond/wbusb.c +0 -0
 	dev->queues = 1;
 
 	dev->wiphy->bands[IEEE80211_BAND_2GHZ] = &wbsoft_band_2GHz;
#12 lore raw
Quoted 8 lines · Pekka Enberg

drivers/staging/winbond/wbusb.c static int wb35_probe(struct usb_interface *intf, const struct usb_device_id *id · line 373

Quoted 4 lines
drivers/staging/winbond/wbusb.c +2 -1
 	dev->extra_tx_headroom = 12;	/* FIXME */
-	dev->flags = 0;
+	dev->flags = IEEE80211_HW_SIGNAL_UNSPEC;
+	dev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION);

The wiphy->interface_modes thing is probably fall-out from commit 8dffff216fcac4f79078478085e86d68db64922e ("mac80211: only create default STA interface if supported"). I'm cc'ing Johannes.

Yes. That looks reasonable, though it means you'll only support STA, not ad-hoc.

Quoted 7 lines

drivers/staging/winbond/wbusb.c static int wb35_probe(struct usb_interface *intf, const struct usb_device_id *id · line 376

Quoted 3 lines
drivers/staging/winbond/wbusb.c +1 -0
 	dev->channel_change_time = 1000;
+	dev->max_signal = 100;

And the IEEE80211_HW_SIGNAL_UNSPEC and ->max_signal from commit 566bfe5a8bcde13188a356f77666f8115813cf31 ("mac80211: use hardware flags for signal/noise units"). Lets cc Bruno.

Seems reasonable, though does it would be good to see if it can do DBM, which we very very much prefer.

johannes

#13 lore raw
Quoted 12 lines · Pekka Enberg
Quoted 10 lines

drivers/staging/winbond/wbusb.c static int wb35_probe(struct usb_interface *intf, const struct usb_device_id *id · line 373

Quoted 6 lines
drivers/staging/winbond/wbusb.c +2 -1
 	dev->extra_tx_headroom = 12;	/* FIXME */
-	dev->flags = 0;
+	dev->flags = IEEE80211_HW_SIGNAL_UNSPEC;
+	dev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION);

The wiphy->interface_modes thing is probably fall-out from commit 8dffff216fcac4f79078478085e86d68db64922e ("mac80211: only create default STA interface if supported"). I'm cc'ing Johannes.

Quoted 2 lines

Yes. That looks reasonable, though it means you'll only support STA, not ad-hoc.

Ok. The driver is very basic for now (can only do channel 1), so we certainly have bigger problems than ad-hoc.

Quoted 9 lines
Quoted 6 lines

drivers/staging/winbond/wbusb.c static int wb35_probe(struct usb_interface *intf, const struct usb_device_id *id · line 376

Quoted 2 lines
drivers/staging/winbond/wbusb.c +1 -0
 	dev->channel_change_time = 1000;
+	dev->max_signal = 100;

And the IEEE80211_HW_SIGNAL_UNSPEC and ->max_signal from commit 566bfe5a8bcde13188a356f77666f8115813cf31 ("mac80211: use hardware flags for signal/noise units"). Lets cc Bruno.

Seems reasonable, though does it would be good to see if it can do DBM, which we very very much prefer.

Well, currenlty it reports all zeros...
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#14 lore raw
Quoted 11 lines · Pavel Machek
Quoted 9 lines
Quoted 6 lines

drivers/staging/winbond/wbusb.c static int wb35_probe(struct usb_interface *intf, const struct usb_device_id *id · line 376

Quoted 2 lines
drivers/staging/winbond/wbusb.c +1 -0
 	dev->channel_change_time = 1000;
+	dev->max_signal = 100;

And the IEEE80211_HW_SIGNAL_UNSPEC and ->max_signal from commit 566bfe5a8bcde13188a356f77666f8115813cf31 ("mac80211: use hardware flags for signal/noise units"). Lets cc Bruno.

Seems reasonable, though does it would be good to see if it can do DBM, which we very very much prefer.

Well, currenlty it reports all zeros...

In that case you shouldn't do this patch to avoid userspace getting bogus values.

johannes