Hi,

this is a followup on the misc@ "problem with ral in hopstap mode on -current" 
thread.

I had an AP running with a ral pci card in a soekris box with 4.2 for years.
About two weeks ago, I updated to -current. When the box is started, then the 
ral card
works fine as AP for a while, but then suddenly stops. To fix the problem I had 
to do a:

sh /etc/netstart ral0 on the AP, and wireless was back, working well, the 
clients could connect again.
While the clients were unable to connect, the card itself on the AP looked fine 
all the time:

$ ifconfig ral0
ral0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:11:09:9a:9a:7e
        priority: 4
        groups: wlan
        media: IEEE802.11 autoselect hostap (autoselect mode 11b hostap)
        status: active
        ieee80211: nwid brb.freifunk.net chan 1 bssid 00:11:09:9a:9a:7e 100dBm
        inet 10.23.4.56 netmask 0xffff0000 broadcast 10.23.255.255
        inet6 fe80::211:9ff:fe9a:9a7e%ral0 prefixlen 64 scopeid 0x4

When the problem happened, I ran tcpdump -n -i ral0 -y IEEE802_11_RADIO -vvv, 
and saw the output below.

>From some answers on misc@, others reported having seen similar problems 
>starting to happen between 
4.6 and 4.7. Sthen@ suggested to me to revert revision 1.56 of 
src/sys/net80211/ieee80211_node.c
So I did.

Index: ieee80211_node.c
===================================================================
RCS file: /cvs/src/sys/net80211/ieee80211_node.c,v
retrieving revision 1.63
diff -u -p -r1.63 ieee80211_node.c
--- ieee80211_node.c 28 Mar 2011 14:49:40 -0000 1.63
+++ ieee80211_node.c 13 Jan 2012 17:57:41 -0000
@@ -936,6 +936,7 @@ ieee80211_needs_rxnode(struct ieee80211c
      switch (wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK) {
      case IEEE80211_FC0_SUBTYPE_BEACON:
      case IEEE80211_FC0_SUBTYPE_PROBE_RESP:
+         rc = 1;
         break;
      default:
 #ifndef IEEE80211_STA_ONLY

So adding this rc=1 on Friday evening, now over the whole weekend, up to this 
morning, my wireless is working stable now,
as it was before with the 4.2. 

The commit log for the 1.56 revision was:

revision 1.56
date: 2010/02/17 18:34:37;  author: damien;  state: Exp;  lines: +1 -2
Do not always create a new node when a beacon or a probe response
is received.  The creation of a new node is already handled in
ieee80211_recv_probe_resp() when necessary.
This avoids creating empty nodes with wrong channels when beacons
are received on the wrong channel (overlapping channels).
Those empty nodes may also prevent the real node from being
discovered because of ieee80211_find_node_for_beacon() filtering.

This should prevent entries of the form:
        nwid "" chan 3 bssid 00:01:02:03:04:05 0dB 54M
in "ifconfig if0 scan" output, like reported by Rivo Nurges.


So the change will probably reintroduce the problem that the change was 
supposed to fix, and probably another different fix 
to my problem or the problem above is needed.

I don't know what the real fix could be, but I'm willing to test anything that 
gets thrown at me.
If more information is needed, let me know.

cheers,
Sebastian


OpenBSD 5.1-beta (GENERIC) #0: Fri Jan 13 19:40:36 CET 2012
    sebastia@delta-flyer.ds9:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Geode(TM) Integrated Processor by National Semi ("Geode by NSC" 
586-class) 267 MHz
cpu0: FPU,TSC,MSR,CX8,CMOV,MMX
real mem  = 133754880 (127MB)
avail mem = 121548800 (115MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 20/40/21, BIOS32 rev. 0 @ 0xf7840
pcibios0 at bios0: rev 2.0 @ 0xf0000/0x10000
pcibios0: pcibios_get_intr_routing - function not supported
pcibios0: PCI IRQ Routing information unavailable.
pcibios0: PCI bus #0 is the last bus
bios0: ROM list: 0xc8000/0x9000
cpu0 at mainbus0: (uniprocessor)
cpu0: TSC disabled
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "Cyrix GXm PCI" rev 0x00
sis0 at pci0 dev 6 function 0 "NS DP83815 10/100" rev 0x00, DP83816A: irq 10, 
address 00:00:24:c3:89:1c
nsphyter0 at sis0 phy 0: DP83815 10/100 PHY, rev. 1
sis1 at pci0 dev 7 function 0 "NS DP83815 10/100" rev 0x00, DP83816A: irq 10, 
address 00:00:24:c3:89:1d
nsphyter1 at sis1 phy 0: DP83815 10/100 PHY, rev. 1
sis2 at pci0 dev 8 function 0 "NS DP83815 10/100" rev 0x00, DP83816A: irq 10, 
address 00:00:24:c3:89:1e
nsphyter2 at sis2 phy 0: DP83815 10/100 PHY, rev. 1
ral0 at pci0 dev 10 function 0 "Ralink RT2560" rev 0x01: irq 11, address 
00:11:09:9a:9a:7e
ral0: MAC/BBP RT2560 (rev 0x04), RF RT2525
gscpcib0 at pci0 dev 18 function 0 "NS SC1100 ISA" rev 0x00
gpio0 at gscpcib0: 64 pins
"NS SC1100 SMI" rev 0x00 at pci0 dev 18 function 1 not configured
pciide0 at pci0 dev 18 function 2 "NS SCx200 IDE" rev 0x01: DMA, channel 0 
wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: <SanDisk SDCFH-002G>
wd0: 1-sector PIO, LBA, 1918MB, 3928176 sectors
wd0(pciide0:0:0): using PIO mode 4, DMA mode 2
geodesc0 at pci0 dev 18 function 5 "NS SC1100 X-Bus" rev 0x00: iid 6 revision 3 
wdstatus 0
ohci0 at pci0 dev 19 function 0 "Compaq USB OpenHost" rev 0x08: irq 5, version 
1.0, legacy support
isa0 at gscpcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com0: console
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
nsclpcsio0 at isa0 port 0x2e/2: NSC PC87366 rev 9: GPIO VLM TMS
gpio1 at nsclpcsio0: 29 pins
gscsio0 at isa0 port 0x15c/2: SC1100 SIO rev 1:
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
usb0 at ohci0: USB revision 1.0
uhub0 at usb0 "Compaq OHCI root hub" rev 1.00/1.00 addr 1
vscsi0 at root
scsibus0 at vscsi0: 256 targets
softraid0 at ro


tcpdump -n -i ral0 -y IEEE802_11_RADIO -vvv
17:24:42.394972 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:42.409967 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:48.102207 802.11: probe request, <radiotap v0, tsf 366152637112, 1Mbit/s, 
chan 1, 11g, antenna 1, signal 46dB>
17:24:48.102357 802.11: probe response, timestamp 0, interval 100, 
caps=41<ESS,SHORT_PREAMBLE>, ssid (brb.freifunk.net), rates 1M 2M 5M 11M, ds (c
han 1), <radiotap v0, 1Mbit/s, chan 1, 11g, antenna 1>
17:24:49.225241 802.11: probe request, <radiotap v0, tsf 366153760136, 1Mbit/s, 
chan 1, 11g, antenna 1, signal 65dB>
17:24:49.225311 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:49.225347 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:49.225368 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:49.225387 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:49.225407 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:49.225427 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:49.225446 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:49.225464 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:49.225484 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:49.225505 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:49.225526 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:49.225547 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:49.225569 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:49.225590 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:49.225612 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:49.225634 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:49.244871 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:49.262353 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:49.280332 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:49.426983 802.11: authentication request, <radiotap v0, tsf 366153961887, 
1Mbit/s, chan 1, 11g, antenna 1, signal 65dB>
17:24:49.427049 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:49.427079 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:49.427099 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:49.427120 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:49.427142 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:49.427162 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:49.427182 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:49.439397 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:49.460284 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:49.476350 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:56.294812 802.11: probe request, <radiotap v0, tsf 366160829709, 1Mbit/s, 
chan 1, 11g, antenna 1, signal 67dB>
17:24:56.294878 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:56.294912 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:56.294935 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:56.294956 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:56.294976 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:56.295006 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:56.295028 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:56.295050 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:56.295070 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:56.295091 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:56.295113 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:56.295134 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:56.295154 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:56.295174 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>
17:24:56.295195 802.11: deauthentication, authentication expired, <radiotap v0, 
1Mbit/s, chan 1, 11g, antenna 1>


ot
scsibus1 at softraid0: 256 targets

Reply via email to