Subject: Re: CVS commit: src/sys/net80211
To: None <>
From: Urban Boquist <>
List: current-users
Date: 10/25/2003 16:13:36
Hi David,

First, thanks a lot for all your work on wireless support for NetBSD,
you're doing a great job!

However, something you did the last few weeks seems to have broken my
wireless home router. A -current/i386 kernel built roughly 2003-10-04
works, one built 2003-10-20 does not.

If you have any suggestions as to what might be wrong or how to
further debug this I would be very grateful.

Below are two tcpdump's run at the same time on the router machine
(called blixten, aka, with the non-working
kernel. It seems that the wireless output path somehow discards
packets, or am I misreading this? The client is starting a
dhcp-request at this point.

blixten# tcpdump -s 1500 -v -i wi0 
tcpdump: listening on wi0
15:23:49.220090 > [udp sum ok]  xid:0xdbc5a040 vend-rfc1048 DHCP:REQUEST PR:SM+BR+TZ+DG+DN+NS+HN [tos 0x10]  (ttl 16, id 0, len 328)
15:23:49.221604 > [udp sum ok]  xid:0xdbc5a040 file "/i386/nbgrub" vend-rfc1048 DHCP:ACK LT:43200 SM: BR: DN:"" HN:"iller" [tos 0x10]  (ttl 16, id 0, len 328)
15:23:55.218396 > [udp sum ok]  xid:0xdbc5a040 secs:6 vend-rfc1048 DHCP:REQUEST PR:SM+BR+TZ+DG+DN+NS+HN [tos 0x10]  (ttl 16, id 0, len 328)
15:23:55.220137 > [udp sum ok]  xid:0xdbc5a040 secs:6 file "/i386/nbgrub" vend-rfc1048 DHCP:ACK LT:43200 SM: BR: DN:"" HN:"iller" [tos 0x10]  (ttl 16, id 0, len 328)
15:24:02.225056 > [udp sum ok]  xid:0xb6af2109 vend-rfc1048 DHCP:DISCOVER PR:SM+BR+TZ+DG+DN+NS+HN [tos 0x10]  (ttl 16, id 0, len 328)
15:24:02.226421 > [udp sum ok]  xid:0xb6af2109 file "/i386/nbgrub" vend-rfc1048 DHCP:OFFER LT:43200 SM: BR: DN:"" HN:"iller" [tos 0x10]  (ttl 16, id 0, len 328)

blixten# tcpdump -ne -D IEEE802_11 -i wi0
tcpdump: data link type DLT_IEEE802_11
tcpdump: listening on wi0
15:23:49.220078 DA:ff:ff:ff:ff:ff:ff SA:0:2:2d:27:32:9c BSSID:2:2:2d:b:c1:2 >  xid:0xdbc5a040 ether 0:2:2d:27:32:9c [|bootp] [tos 0x10] 
15:23:55.218383 DA:ff:ff:ff:ff:ff:ff SA:0:2:2d:27:32:9c BSSID:2:2:2d:b:c1:2 >  xid:0xdbc5a040 secs:6 ether 0:2:2d:27:32:9c [|bootp] [tos 0x10] 
15:24:02.225045 DA:ff:ff:ff:ff:ff:ff SA:0:2:2d:27:32:9c BSSID:2:2:2d:b:c1:2 >  xid:0xb6af2109 ether 0:2:2d:27:32:9c [|bootp] [tos 0x10] 

Both machines have Orinoco Silver cards, in adhoc/ibss mode and with
wep on. On blixten:

wi0 at pcmcia0 function 0: Lucent Technologies, WaveLAN/IEEE, Version 01.01
wi0: port 0x400-0x43fpcmcia0: card irq 10
 802.11 address 00:02:2d:0b:c1:02
wi0: using Lucent Technologies, WaveLAN/IEEE
wi0: Lucent Firmware: Station (7.52.1)
wi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps

blixten# ifconfig wi0
        nwid boquist.net_wlan nwkey .....
        powersave off
        bssid 02:02:2d:0b:c1:02 chan 3
        address: 00:02:2d:0b:c1:02
        media: IEEE802.11 autoselect adhoc (DS2 adhoc)
        status: active
        inet netmask 0xffffff00 broadcast
        inet6 fe80::202:2dff:fe0b:c102%wi0 prefixlen 64 scopeid 0x9

Btw, what does the the "(DS2 adhoc)" mean above? I'm a little worried
that it doesn't say DS11 there...

I would be very glad to help you debug this if you want, just let me
know what to do.

Kind regards,

        -- Urban

>>>>> David Young writes:

David> Module Name: src Committed By: dyoung Date: Thu Oct 23 06:30:32
David> UTC 2003

David> Modified Files: src/sys/net80211: ieee80211_input.c

David> Log Message: In the input path, do not discard management
David> frames belonging to a different BSS, because that keeps drivers
David> like atw from detecting ad hoc beacons with the same SSID but
David> different BSSID for the purpose of IBSS merges.

David> This should be revisited: maybe drivers should check for
David> beacons before handing packets up with
David> ieee80211_input(). However, this restores the atw(4) to working
David> like it did with the old 802.11 layer, and it *is* nice to
David> re-use the 802.11 layer's packet-decode & -dispatch code (i.e.,
David> the ic_recv_mgmt callback).

David> To generate a diff of this commit: cvs rdiff -r1.9 -r1.10
David> src/sys/net80211/ieee80211_input.c

David> Please note that diffs are not public domain; they are subject
David> to the copyright notices on the relevant files.