Atheros AR9280 hangs the system when creating wlanX

I have a problem with the card TP-Link WN851N. Moreover, observed only in FreeBSD, Windows 7 everything works flawlessly.
The card is normally determined by the system, but when, according to manual I'm create device wlan0, after some random period of time system is hang.
Tried to change wlan modes: adhoc, hostap, monitor, channels: b/g/ng - the same result.
And no where no *. core files (even dumpdev = "AUTO" in rc.conf included) still do not dump. Even the /var/crash is empty.

uname -a
Code:
FreeBSD bug 8.1-STABLE FreeBSD 8.1-STABLE #6: Wed Sep 22 15:18:14 EEST 2010	 xinn@bug:/usr/obj/usr/src/sys/BUGSERVER  i386

pciconf -lv
Code:
ath0@pci0:3:9:0:		class=0x028000 card=0x2091168c chip=0x0029168c rev=0x01 hdr=0x00
	vendor	 = 'Atheros Communications Inc.'
	class	  = network

cat /var/run/dmesg.boot | grep ath
Code:
ath0: <Atheros 9280> mem 0xe8100000-0xe810ffff irq 21 at device 9.0 on pci3
ath0: [ITHREAD]
ath0: AR9280 mac 128.2 RF5133 phy 13.0

rc.conf
Code:
wlans_ath0="wlan0"
create_args_wlan0="wlanmode hostap"
ifconfig_wlan0="inet 192.168.8.1 netmask 255.255.255.0 ssid bugWiFi channel 6 ht"

ifconfig ath0
Code:
ath0: flags=8847<UP,BROADCAST,DEBUG,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
		ether 94:0c:6d:b3:6c:aa
		media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
		status: no carrier
Yesterday I downloaded http://svn.freebsd.org/base/head/sys/dev/ath/ and http://svn.freebsd.org/base/head/sys/net80211/ and build kernel with the new sources - same result.

Please help me.

Sorry for english, I used Google Translate.
 
I would like give more information but I do not know what to do to provide it.
Please, advice me, what I should do, to localize this problem.
Thanks a lot!
 
Does ath crash in STA mode too?

When ndis crash, does it produce useful output, like textdump in /var/crash. How you made driver module?

If you are in console, vty0 you should see panic message.
 
richardpl said:
Does ath crash in STA mode too?

When ndis crash, does it produce useful output, like textdump in /var/crash. How you made driver module?

If you are in console, vty0 you should see panic message.

In STA mode ath (or wlan) does'n crash, you right.
I used manual to generate ndis driver from this windows driver.
Code:
#ndisgen netathw.inf athw.sys
In vty0 console I see only kernel panic message =)
There is dumps from /var/crash
core.txt.0 and info.0 18kb
core.txt.0,info.0 and vmcore.0 16Mb
 
It is funny that it crash in ndis_init_nic().

Try code from http://gitorious.org/NDISulator

You just need to recompile ndis and if_ndis module.
You will need kernel and world source (you apparently already have them).
Note that if_ndis.c may not compile because it have ifqmaxlen (new feature from CURRENT), so just replace ifqmaxlen with hardcoded value (50 for example).

Alternatively look into 1d8740616d commit how to pick correct medium. (This one should also make leds working) - you will need to patch it manually. Or ask me to write patch.

Also be aware that NDISulator (at least <=5.1 NDIS API) can not support hostap.
 
Many thanks for the detailed response
I will definitely take advantage of your advice.
Just a shame that hostap mode is the goal =)
Probably have to wait for fix this problem in his native ath driver.
 
There some logs:
Code:
# ifconfig wlan0 create wlandev ath0 wlanmode hostap mode 11ng
# ifconfig wlan0 ssid my_ssid ht channel 6:ng inet 192.168.8.1/24
# /etc/rc.d/hostapd onestart
# wlandebug 0xffffffff
Wait for hang =(
After rebooting:
Code:
#cat /var/log/messages| egrep "wlan0|ath0" > mess_wlan
http://xinnslair.com/mess_wlan.zip
 
Back
Top