ath testers needed: ar5212 in 11a mode

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

ath testers needed: ar5212 in 11a mode

Reyk Floeter-2
hi,

the following diff fixes 11a mode on ar5212-based ath(4) wireless
NICs. I'd like to get some test reports from ar5212 users, using 11a
_or_ 11b mode.

It is still not perfect and has some remaining issues. Sometime you'll
see device timeouts or the NIC fails to associate in 11a mode. If this
happens, try to ifconfig athX down and ifconfig athX up the device to
force a chip reset (I try to fix the internal reset in the driver).

Please also verify if you see any frames (like beacons) by using
# tcpdump -y ieee802_11_radio -evni athX

11g mode is still broken, but this is another issue.

btw.: 11a regulation is a mess, try to use a channel like 48 which
should work with most of the regulation domains.

reyk

Index: ar5212.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/ar5212.c,v
retrieving revision 1.29
diff -u -p -r1.29 ar5212.c
--- ar5212.c 5 Jun 2006 15:21:43 -0000 1.29
+++ ar5212.c 9 Sep 2006 20:54:55 -0000
@@ -628,15 +628,10 @@ ar5k_ar5212_reset(struct ath_hal *hal, H
  AR5K_REG_MASKED_BITS(AR5K_AR5212_PHY(0x44),
     hal->ah_antenna[ee_mode][0], 0xfffffc06);
 
- ant[0] = HAL_ANT_FIXED_A;
- ant[1] = HAL_ANT_FIXED_B;
-
- if (hal->ah_ant_diversity == AH_FALSE) {
- if (freq == AR5K_INI_RFGAIN_2GHZ)
- ant[0] = HAL_ANT_FIXED_B;
- else
- ant[1] = HAL_ANT_FIXED_A;
- }
+ if (freq == AR5K_INI_RFGAIN_2GHZ)
+ ant[0] = ant[1] = HAL_ANT_FIXED_B;
+ else
+ ant[0] = ant[1] = HAL_ANT_FIXED_A;
 
  AR5K_REG_WRITE(AR5K_AR5212_PHY_ANT_SWITCH_TABLE_0,
     hal->ah_antenna[ee_mode][ant[0]]);
@@ -1310,11 +1305,13 @@ ar5k_ar5212_fill_tx_desc(struct ath_hal
     u_int segment_length, HAL_BOOL first_segment, HAL_BOOL last_segment)
 {
  struct ar5k_ar5212_tx_desc *tx_desc;
+ struct ar5k_ar5212_tx_status *tx_status;
 
  tx_desc = (struct ar5k_ar5212_tx_desc*)&desc->ds_ctl0;
+ tx_status = (struct ar5k_ar5212_tx_status*)&desc->ds_hw[2];
 
  /* Clear status descriptor */
- bzero(desc->ds_hw, sizeof(desc->ds_hw));
+ bzero(tx_status, sizeof(struct ar5k_ar5212_tx_status));
 
  /* Validate segment length and initialize the descriptor */
  if ((tx_desc->tx_control_1 = (segment_length &
Index: ath.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/ath.c,v
retrieving revision 1.52
diff -u -p -r1.52 ath.c
--- ath.c 23 Jun 2006 21:53:01 -0000 1.52
+++ ath.c 9 Sep 2006 20:55:14 -0000
@@ -725,7 +725,7 @@ ath_init1(struct ath_softc *sc)
  */
  hchan.channel = ic->ic_ibss_chan->ic_freq;
  hchan.channelFlags = ath_chan2flags(ic, ic->ic_ibss_chan);
- if (!ath_hal_reset(ah, ic->ic_opmode, &hchan, AH_FALSE, &status)) {
+ if (!ath_hal_reset(ah, ic->ic_opmode, &hchan, AH_TRUE, &status)) {
  printf("%s: unable to reset hardware; hal status %u\n",
  ifp->if_xname, status);
  error = EIO;

Reply | Threaded
Open this post in threaded view
|

Re: ath testers needed: ar5212 in 11a mode

Johan Torin
On Saturday 09 September 2006 23:22, Reyk Floeter wrote:

> hi,
>
> the following diff fixes 11a mode on ar5212-based ath(4) wireless
> NICs. I'd like to get some test reports from ar5212 users, using 11a
> _or_ 11b mode.
>
> It is still not perfect and has some remaining issues. Sometime you'll
> see device timeouts or the NIC fails to associate in 11a mode. If this
> happens, try to ifconfig athX down and ifconfig athX up the device to
> force a chip reset (I try to fix the internal reset in the driver).
>
> Please also verify if you see any frames (like beacons) by using
> # tcpdump -y ieee802_11_radio -evni athX

This unfortunately yielded nothing.

> 11g mode is still broken, but this is another issue.
>
> btw.: 11a regulation is a mess, try to use a channel like 48 which
> should work with most of the regulation domains.

[ snipped patch ]

I did something like this:

# cat /etc/hostname.ath0
up media autoselect mediaopt hostap mode 11a chan 48 nwid MyNet nwkey
0xiwouldnotthinkso
inet 10.0.1.1 255.255.255.0 NONE
# sudo sh /etc/netstart ath0
ifconfig: SIOCS80211CHANNEL: Invalid argument
# sudo sh /etc/netstart ath0
# sudo ifconfig ath0 down
# sudo ifconfig ath0 up
# ifconfig ath0
ath0: flags=8963<UP,BROADCAST,NOTRAILERS,RUNNING,PROMISC,SIMPLEX,MULTICAST>
mtu 1500
        lladdr 00:0f:b5:6b:fe:7b
        media: IEEE802.11 autoselect mode 11a hostap
        status: active
        ieee80211: nwid MyNet chan 48 bssid 00:0f:b5:6b:fe:7b nwkey <not
displayed>
        inet6 fe80::20f:b5ff:fe6b:fe7b%ath0 prefixlen 64 scopeid 0x1
        inet 10.0.1.1 netmask 0xffffff00 broadcast 10.0.1.255
[ edit /etc/hostname.ath0 ]
# cat /etc/hostname.ath0
up media autoselect mediaopt hostap mode 11b chan 6 nwid MyNet nwkey
0xiwouldnotthinkso
inet 10.0.1.1 255.255.255.0 NONE
# sudo sh /etc/netstart ath0
ifconfig: SIOCS80211CHANNEL: Invalid argument
# sudo sh /etc/netstart ath0
[kernel crashed]


# sudo dmesg -N bsd.gdb -M bsd.0.core

OpenBSD 4.0 (GENERIC) #0: Sun Sep 10 20:02:24 CEST 2006
    [hidden email]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel Pentium II ("GenuineIntel" 686-class, 512KB L2 cache) 332 MHz
cpu0:
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR
real mem  = 100237312 (97888K)
avail mem = 83587072 (81628K)
using 1249 buffers containing 5115904 bytes (4996K) of memory
mainbus0 (root)
bios0 at mainbus0: AT/286+(00) BIOS, date 02/06/98, BIOS32 rev. 0 @ 0xffe90,
SMBIOS rev. 2.1 @ 0xfadc0 (54 entries)
bios0: Dell Computer Corporation OptiPlex GXa 333L EM+
apm0 at bios0: Power Management spec V1.2
apm0: AC on, battery charge unknown
apm0: flags 30102 dobusy 0 doidle 1
pcibios0 at bios0: rev 2.1 @ 0xf0000/0x10000
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfc7d0/96 (4 entries)
pcibios0: PCI Interrupt Router at 000:07:0 ("Intel 82371FB ISA" rev 0x00)
pcibios0: PCI bus #1 is the last bus
bios0: ROM list: 0xc0000/0x8000 0xc8000/0x8000
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 "Intel 82443LX AGP" rev 0x03
ppb0 at pci0 dev 1 function 0 "Intel 82443LX AGP" rev 0x03
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 "ATI Mach64 GD" rev 0x5c
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
pcib0 at pci0 dev 7 function 0 "Intel 82371AB PIIX4 ISA" rev 0x01
pciide0 at pci0 dev 7 function 1 "Intel 82371AB IDE" rev 0x01: DMA, channel 0
wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: <QUANTUM FIREBALL SE2.1A>
wd0: 16-sector PIO, LBA, 2014MB, 4124736 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
pciide0: channel 1 ignored (disabled)
uhci0 at pci0 dev 7 function 2 "Intel 82371AB USB" rev 0x01: irq 11
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: Intel UHCI root hub, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
piixpm0 at pci0 dev 7 function 3 "Intel 82371AB Power" rev 0x01: SMBus
disabled
ath0 at pci0 dev 13 function 0 "Atheros AR5212" rev 0x01: irq 10
ath0: AR5213 5.6 phy 4.1 rf5111 1.7 rf2111 2.3, FCC2A*, address
00:0f:b5:6b:fe:7b
xl0 at pci0 dev 14 function 0 "3Com 3c900 10Mbps-Combo" rev 0x00: irq 9,
address 00:60:97:91:14:d3
xl1 at pci0 dev 17 function 0 "3Com 3c905 100Base-TX" rev 0x00: irq 11,
address 00:c0:4f:ce:c8:e7
nsphy0 at xl1 phy 24: DP83840 10/100 PHY, rev. 1
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
npx0 at isa0 port 0xf0/16: using exception 16
pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pccom1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
isapnp0 at isa0 port 0x279: read port 0x203
wss1 at isapnp0 "CS4236B, CSC0000, , WSS/SB" port 0x534/4,0x388/4,0x220/16 irq
5 drq 1,0: CS4236/CS4236B (vers 0)
audio0 at wss1
joy0 at isapnp0 "CS4236B, CSC000F, , Game" port 0x3a0/8
"CS4236B, CSC0010, , Ctrl" at isapnp0 port 0xf00/8 not configured
"CS4236B, CSC0003, , MPU" at isapnp0 port 0x330/2 not configured
biomask f945 netmask ff45 ttymask ffc7
pctr: 686-class user-level performance counters enabled
mtrr: Pentium Pro MTRR support
dkcsum: wd0 matches BIOS drive 0x80
root on wd0a
rootdev=0x0 rrootdev=0x300 rawdev=0x302
arplookup: unable to enter address for 169.254.127.68
ath0: device timeout
ath0: device timeout
ath0: device timeout
ath0: device timeout
ath0: device timeout
ath0: device timeout
ath0: device timeout
ath0: ath_chan_set: unable to reset channel 48 (5240 Mhz)
panic: ieee80211_newstate: bogus xmit rate 7 setup

Stopped at Debugger+0x4: leave
RUN AT LEAST 'trace' AND 'ps' AND INCLUDE OUTPUT WHEN REPORTING THIS PANIC!
DO NOT EVEN BOTHER REPORTING THIS WITHOUT INCLUDING THAT INFORMATION!
ddb> Debugger(d0ab1000,d89a6960,d0aaf030,1,d0aaf030) at Debugger+0x4
panic(d06601ef,d0660210,7,919f7,d34a9b00) at panic+0x63
ieee80211_rssadapt_choose(d0aaf030,4,ffffffff,919f7) at
ieee80211_rssadapt_choose
ath_newstate(d0aaf030,4,ffffffff,ffff0064,d0ab1000) at ath_newstate+0x181
ieee80211_create_ibss(d0aaf030,d0aaf2a6,2,0,d0ab1000) at
ieee80211_create_ibss+0x11b
ieee80211_set_shortslottime(d0aaf030,1,ffffffff,819f7) at
ieee80211_set_shortslottime+0x2fa
ath_newstate(d0aaf030,1,ffffffff,2,0) at ath_newstate+0x181
ath_init1(d0aaf000,801269ee,d8c2de68,0) at ath_init1+0x17e
ath_ioctl(d0aaf030,801269ee,d8c2de68,d8c2de68,d8c2de68) at ath_ioctl+0xa9
in_control(d3456e5c,801269ee,d8c2de68,d0aaf030,d0aaf030,d0985798,d8c2de20,20f0c05)
at in_control+0x122
ifioctl(d3456e5c,801269ee,d8c2de68,d33aab4c,0) at ifioctl+0x18f
sys_ioctl(d33aab4c,d8c2df68,d8c2df58,5,39) at sys_ioctl+0x125
syscall() at syscall+0x2ea
--- syscall (number 54) ---
0x1c007a69:
ddb>    PID   PPID   PGRP    UID  S       FLAGS  WAIT       COMMAND        
* 9939   3357   3357      0  7      0x4006             ifconfig        
  3357  29576   3357      0  3      0x4086  pause      sh              
 29576  21086  29576   1000  3      0x4086  pause      ksh            
 21086  32632  21086   1000  3        0x84  select     screen          
 32632  23574  32632   1000  3      0x4086  pause      screen          
 23574  15118  23574   1000  3      0x4086  pause      ksh            
 15118   5923   5923   1000  3       0x184  select     sshd            
  5923  26953   5923      0  3      0x4184  netio      sshd            
  4370      1   4370      0  3      0x4086  ttyin      getty          
 29571      1  29571      0  3      0x4086  ttyin      getty          
   375      1    375      0  3      0x4086  ttyin      getty          
 25536      1  25536      0  3      0x4086  ttyin      getty          
  9088      1   9088      0  3      0x4086  ttyin      getty          
 15921      1  15921      0  3        0x84  select     cron            
  9271      1   9271  32767  3       0x184  nanosleep  expiretable    
 22887      1  22887      0  3        0x84  select     dhcpd          
 10855      1  10855      0  3     0x40184  select     sendmail        
 26953      1  26953      0  3        0x84  select     sshd            
 31804      1  31804      0  3       0x184  select     inetd          
  3195  20718  20718     83  3       0x184  poll       ntpd            
 20718      1  20718      0  3        0x84  poll       ntpd            
  2056  13482  13482     70  3       0x184  select     named          
 13482      1  13482      0  3       0x184  netio      named          
 14410    217    217     74  3       0x184  bpf        pflogd          
   217      1    217      0  3        0x84  netio      pflogd          
 14537  10108  10108     73  3       0x184  poll       syslogd        
 10108      1  10108      0  3        0x8c  netio      syslogd        
 27881      1  27881     77  3       0x184  poll       dhclient        
 19599      1   8314      0  3        0x86  poll       dhclient        
    13      0      0      0  3    0x100204  crypto_wa  crypto          
    12      0      0      0  3    0x100204  aiodoned   aiodoned        
    11      0      0      0  3    0x100204  syncer     update          
    10      0      0      0  3    0x100204  cleaner    cleaner        
     9      0      0      0  3    0x100204  reaper     reaper          
     8      0      0      0  3    0x100204  pgdaemon   pagedaemon      
     7      0      0      0  3    0x100204  pftm       pfpurge        
     6      0      0      0  3    0x100204  wait       wskbd_hotkey    
     5      0      0      0  3    0x100204  usbtsk     usbtask        
     4      0      0      0  3    0x100204  usbevt     usb0            
     3      0      0      0  3    0x100204  apmev      apm0            
     2      0      0      0  3    0x100204  kmalloc    kmthread        
     1      0      1      0  3      0x4084  wait       init            
     0     -1      0      0  3     0x80204  scheduler  swapper        
ddb> syncing disks... 6 6 4 done
WARNING: not updating battery clock


/Johan