Please note: This project is no longer active. The website is kept online for historic purposes only.
If you´re looking for a Linux driver for your Atheros WLAN device, you should continue here .

Ticket #1054 (closed defect: fixed)

Opened 13 years ago

Last modified 12 years ago

SCAN and RUN can't happen at the same time

Reported by: drkhosla@ankhnet.net Assigned to:
Priority: major Milestone: version 0.9.5
Component: madwifi: other Version: v0.9.2.1
Keywords: WDS VAP SCAN Cc: drkhosla@ankhnet.net
Patch is attached: 0 Pending:

Description

I am previously using svn r1512 and the same init script running properly. Now it is not running with svn r1860 and give kernel panic. I am not able to sort out the problem.

The init script is create ath0 and run script WDS.

#!/bin/sh

wlanconfig ath0 destroy
wlanconfig ath0 create wlandev wifi0 wlanmode ap

/etc/init.d/WDS

ifconfig ath0 up

#iwpriv ath0 mode 1
iwconfig ath0 channel 1 mode master essid "test"
iwconfig ath0 txpower 400mW sens 3
iwpriv ath0 hide_ssid 1

WDS script read file for MAC address /etc/WDSLIST and create VAP for WDS link. The script is like this

#!/bin/sh

cnt=1

processLine(){
  line="$@" # get all args
    echo $line
    echo ath$cnt
    wlanconfig ath$cnt destroy
    wlanconfig ath$cnt create wlandev wifi0 wlanmode wds
    iwpriv ath$cnt wds 1
    iwpriv ath$cnt wds_add $line
    iwpriv ath$cnt hide_ssid 1
    }

    ### Main script stars here ###
    # Store file name
    FILE="/etc/WDSLIST"

# make sure file exist and readable
    if [ ! -f $FILE ]; then
     echo "$FILE : does not exists"
     exit 1
    elif [ ! -r $FILE ]; then
     echo "$FILE: can not read"
     exit 2
    fi
# read $FILE using the file descriptors
    exec 3<&0
    exec 0<$FILE
    while read line
    do
    # use $line variable to process line in processLine() function
      processLine $line
      cnt=`expr $cnt + 1`
    done

    exec 0<&3

    cnt=`expr $cnt - 1`
    echo $cnt
    brctl stp br0 on
   while [ $cnt -gt 0 ]
    do
    ifconfig ath$cnt up
    brctl addif br0 ath$cnt
    cnt=`expr $cnt - 1`
    sleep 2
    done

exit 0

The WDS MAC list is in the file /etc/WDSLIST

00:02:6F:43:98:E9
00:02:6F:43:98:DD

At the time of boot I get kernel panic

wlan: 0.8.4.2 (svn r1860)
ath_hal: 0.9.18.0 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)
ath_rate_sample: 1.2 (svn r1860)
ath_pci: 0.9.4.5 (svn r1860)
wifi0: 11a rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
wifi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
wifi0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
wifi0: H/W encryption support: WEP AES AES_CCM TKIP
wifi0: mac 10.4 phy 6.1 radio 6.3
wifi0: Use hw queue 1 for WME_AC_BE traffic
wifi0: Use hw queue 0 for WME_AC_BK traffic
wifi0: Use hw queue 2 for WME_AC_VI traffic
wifi0: Use hw queue 3 for WME_AC_VO traffic
wifi0: Use hw queue 8 for CAB traffic
wifi0: Use hw queue 9 for beacons
wifi0: Atheros 5212: mem=0x80000000, irq=12
wlan: mac acl policy registered
device ath0 entered promiscuous mode
br0: port 1(ath0) entering learning state
br0: port 1(ath0) entering forwarding state
br0: topology change detected, propagating
Universal TUN/TAP device driver 1.5 (C)1999-2002 Maxim Krasnyansky
ip_conntrack_rtsp v0.01 loading
ip_nat_rtsp v0.01 loading
ip_conntrack_pptp version 1.9 loaded
ip_nat_pptp version 1.5 loaded
eth0: Promiscuous mode enabled.
device eth0 entered promiscuous mode
br0: port 1(ath0) entering disabled state
br0: port 1(ath0) entering disabled state
device ath0 left promiscuous mode
ath1: Added WDS MAC: 00:02:6f:43:98:ec
ath2: Added WDS MAC: 00:02:6f:43:98:dd
device ath0 entered promiscuous mode
br0: port 1(ath0) entering learning state
br0: port 1(ath0) entering forwarding state
br0: topology change detected, propagating
device ath2 entered promiscuous mode
ath2: attempt to add interface with same source address.
br0: port 2(ath2) entering listening state
br0: port 2(ath2) entering learning state
br0: port 2(ath2) entering forwarding state
br0: topology change detected, propagating
device ath1 entered promiscuous mode
ath1: attempt to add interface with same source address.
br0: port 3(ath1) entering listening state
br0: port 3(ath1) entering learning state
br0: port 3(ath1) entering forwarding state
br0: topology change detected, propagating
ath_rate_sample: no rates for 00:02:6f:43:98:ec?
SCAN and RUN can't happen at the same time
kernel BUG at ieee80211_proto.c:1601!
invalid operand: 0000
CPU:    0
EIP:    0010:[<c88e9ec0>]    Tainted: P
EFLAGS: 00010282
eax: 0000002b   ebx: 00000000   ecx: c6100000   edx: c651f7e0
esi: c6189160   edi: 00000001   ebp: 00000000   esp: c6101e74
ds: 0018   es: 0018   ss: 0018
Process ifconfig (pid: 517, stackpage=c6101000)
Stack: c88f7894 c617c160 c6170000 c61fe000 c6189160 c8938c39 c6189160 00000001
       00000000 00000187 080a85b2 c617c000 c617c160 c6189160 c617c160 c6189000
       c617c000 c88e9773 c6189160 00000001 00000000 c88e9406 c6189160 00000001
Call Trace:    [<c88f7894>] [<c8938c39>] [<c88e9773>] [<c88e9406>] [<c88e941b>]
  [<c018a4e8>] [<c018b3b2>] [<c01b9817>] [<c0185551>] [<c0135581>] [<c0106943>]

Code: 0f 0b 41 06 08 77 8f c8 85 ff 58 0f 85 dc 00 00 00 f6 86 be
 <0>Kernel panic: Aiee, killing interrupt handler!
In interrupt handler - not syncing

When I reboot without running script WDS (after comment out /etc/init.d/WDS). I am ablet to boot it properly. Then I run WDS script and there is no kernel panic but I am getting following error contineously at console terminal

ath_rate_sample: no rates for 00:02:6f:43:98:ec?

I am using kernel 2.4.32 and using wrap board with senao WLAN card.

Change History

12/24/06 02:01:46 changed by anonymous

I think my problem is similar to ticket #287 and ticket #894 with respect to error

ath_rate_sample: no rates for 00:02:6f:43:98:ec?

Except

SCAN and RUN can't happen at the same time
kernel BUG at ieee80211_proto.c:1601!

12/30/06 06:49:59 changed by anonymous

Seeing the same issue when 2 VAPs are used, one in client mode, the other in AP mode. any iwconfig change to either VAP after they are running results in this PANIC

This was after running for several minutes, and if no iwconfig changes are made, it will operate without issue for hours. However, a simple channel change causes the panic

# iwconfig ath2 channel 6 SCAN and RUN can't happen at the same time


kernel BUG at <bad filename>:60805! invalid operand: 0000 #1 PREEMPT Modules linked in: tun ipt_multiport ipt_mark cls_u32 sch_sfq sch_htb ipt_MARK iptable_filter iptable_mangle pcmcia yenta_socket rsrc_nonstatic pcmcia_core wlan_tkip wlan_xauth bridge wlan_scan_ap natsemi crc32 ath_pci ath_rate_sample wlan ath_hal wd1100 rfcomm l2cap bluetooth ipt_MASQUERADE iptable_nat ip_conntrack ip_tables CPU: 0 EIP: 0060:[<c88e6632>] Tainted: P VLI EFLAGS: 00010246 (2.6.11.7nomadisp) EIP is at ieee80211_newstate+0x8e/0x195 [wlan] eax: 0000002b ebx: 00000000 ecx: c49a9e38 edx: c88f3060

comBIOS ver. 1.28 20050529 Copyright (C) 2000-2005 Soekris Engineering.

net4801

0128 Mbyte Memory CPU Geode 266 Mhz

02/12/07 11:46:45 changed by drkhosla@ankhnet.net

I just compile r2100 and found the same error. Then I decided to change the sequence of creating VAP in script.

I first create interface and enable it and then execute WDS script.

#!/bin/sh

wlanconfig ath0 destroy
wlanconfig ath0 create wlandev wifi0 wlanmode ap

ifconfig ath0 up

#iwpriv ath0 mode 1
iwconfig ath0 channel 1 mode master essid "test"
iwconfig ath0 txpower 400mW sens 3
iwpriv ath0 hide_ssid 1

/etc/init.d/WDS #<-----put here

Instead of creating all VAP first and then isssue ifconfig <VAP Interface> up command one by one, I create VAP one by one and issue ifconfig <VAP Interface> up immediately after creating VAP. Then create another VAP and so on. The WDS script is like this

!/bin/sh

cnt=1

processLine(){
  line="$@" # get all args
    echo $line
    echo ath$cnt
    wlanconfig ath$cnt destroy
    wlanconfig ath$cnt create wlandev wifi0 wlanmode wds
    iwpriv ath$cnt wds 1
    iwpriv ath$cnt wds_add $line
    iwpriv ath$cnt hide_ssid 1
    ifconfig ath$cnt up
    brctl addif br0 ath$cnt
    }

    ### Main script stars here ###
    # Store file name
    FILE="/etc/WDSLIST"

# make sure file exist and readable
    if [ ! -f $FILE ]; then
     echo "$FILE : does not exists"
     exit 1
    elif [ ! -r $FILE ]; then
     echo "$FILE: can not read"
     exit 2
    fi
# read $FILE using the file descriptors
    exec 3<&0
    exec 0<$FILE
    brctl stp br0 on
    while read line
    do
    # use $line variable to process line in processLine() function
      processLine $line
      cnt=`expr $cnt + 1`
    done

    exec 0<&3

exit 0

Now VAP are created one by one. If I create all VAP and then make then up one by one. It doesn't work. I read some where in ticket/userdoc that, you have to create VAPs first and issue ifconfig VAP up command in reverse order as I did in my previous script. Now make VAP one by one. I hope this will help many users.

02/07/08 04:38:22 changed by mtaylor

  • status changed from new to closed.
  • resolution set to fixed.

State machine was rewritten in trunk. Should not occur now.

02/07/08 06:19:49 changed by mrenzmann

  • milestone set to version 0.9.5.