# Atheros 9280 does not receive packets(?)



## nakal (Jul 17, 2010)

I have a weird situation and don't know how to figure out what is wrong. I'll try to describe as well as possible.

I've got an Atheros-based router (hostap mode with hostapd). It works with everything except my wireless card on my Asus EeePC 1000HE netbook running FreeBSD-8.1-RC2 (which is also an Atheros, but from a newer generation supporting 11n, it's a Atheros 9280 card).

Here is what happens. When I switch the netbook on it associates with my wireless router and has a good and stable connection. Problem is that DHCP answer packets don't arrive at my netbook, the address stays assigned to 0.0.0.0. I can verify on my router that packets are being sent and also being answered with the correct DHCP settings (tcpdump). On the netbook I can only see packets being sent and no incoming packets at all.

What is happening? How do I investigate further? I cannot tell when the problem appeared, but I know that with FreeBSD 7.x it was working and the card is also working with at least two access points (with the current configuration!).

Kernel is: 8.1-RC2 GENERIC (on router and on netbook)
Using: wpa_supplicant and dhclient
Network is: 11g 54Mbps, WPA2

dmesg|grep ath

```
ath0: <Atheros 9280> mem 0xfbef0000-0xfbefffff irq 19 at device 0.0 on pci1
ath0: [ITHREAD]
ath0: AR9280 mac 128.2 RF5133 phy 13.0
```

ifconfig ath0:

```
ath0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
	ether xx:xx:xx:xx:xx:xx
	media: IEEE 802.11 Wireless Ethernet autoselect mode 11g
	status: associated
```

ifconfig wlan0:

```
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	ether xx:xx:xx:xx:xx:xx
	inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255
	media: IEEE 802.11 Wireless Ethernet OFDM/36Mbps mode 11g
	status: associated
	ssid MYSSID channel 6 (2437 MHz 11g) bssid yy:yy:yy:yy:yy:yy
	regdomain ETSI country DE indoor ecm authmode WPA2/802.11i privacy ON
	deftxkey UNDEF AES-CCM 3:128-bit txpower 30 bmiss 7 scanvalid 450
	bgscan bgscanintvl 300 bgscanidle 250 roam:rssi 7 roam:rate 5
	protmode CTS wme burst roaming MANUAL
```

I have also no idea why only 36Mbps is being selected here.

wpa_supplicant.conf:

```
ctrl_interface=/var/run/wpa_supplicant

network={
        ssid="MYSSID"
        psk="SECRET"
        priority=5
        key_mgmt=WPA-PSK
        proto=RSN
        pairwise=CCMP
        group=CCMP
}
```

rc.conf (relevant part):

```
wlans_ath0="wlan0"
create_args_wlan0="wlanmode sta country DE"
ifconfig_wlan0="WPA DHCP"
```

ifconfig wlan0 scan:

```
MYSSID            yy:yy:yy:yy:yy:yy    6   54M -74:-96  100 EPS  RSN
```

By the way, I've just bought an USB wireless adapter (rum). It works without any big changes (only rc.conf had to be adapted).

Ok. I've tested the connection long enough with rum(4) and ath(4). It is definitely a driver problem in ath(4). I guess that there has been a bug introduced sometime around 8-STABLE.

(Off topic: I've also read in mailing lists about the "we don't care about FreeBSD" attitude by Atheros. I guess it's time for me to simply avoid Atheros from now on.)


----------



## bschmidt (Jul 17, 2010)

Rui commit a fix for exactly that issue if I'm right. This fix should be included in 8.1-RELEASE.


----------



## nakal (Jul 17, 2010)

I've seen this fix and I have verified that it is in RC2 already.

Please note that this addresses a problem with stuck beacons and timeouts. It's true that I've had this problem, too (in PRERELEASE "bb stuck" or something like this), but now the driver is associated with the access point and packets are not arriving at all.


----------



## bschmidt (Jul 17, 2010)

Ok, sorry, was worth a try..

I'm not aware of any other issue with ar9280 cards right now, at least last time I tried those did a pretty decent job. I'll give it a shot tomorrow.


----------



## nakal (Jul 17, 2010)

To reproduce this, you would need a hostap setup with a second ath(4) wireless card (11g), I guess. As I mentioned above, the Atheros 9280 seems to work correctly with some access points.


----------



## bschmidt (Jul 18, 2010)

Hmm, I'm not able to reproduce this with the described setup.

```
ath0: <Atheros 9280> mem 0xfd7f0000-0xfd7fffff irq 17 at device 0.0 on pci2
ath0: [ITHREAD]
ath0: AR9280 mac 128.2 RF5133 phy 13.0
```


```
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 00:15:6d:84:20:26
        inet 10.1.1.72 netmask 0xffff0000 broadcast 10.1.255.255
        media: IEEE 802.11 Wireless Ethernet OFDM/54Mbps mode 11g
        status: associated
        ssid aplab channel 6 (2437 MHz 11g) bssid 00:0e:8e:07:ac:c1
        regdomain ETSI country DE ecm authmode WPA2/802.11i privacy ON
        deftxkey UNDEF AES-CCM 2:128-bit AES-CCM 3:128-bit txpower 30 bmiss 7
        scanvalid 450 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi 7
        roam:rate 5 protmode CTS wme burst roaming MANUAL
```

With a recent HEAD on the client side and an older 7.1-RELEASE running as hostap.


```
ath0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 2290
        ether 00:0e:8e:07:ac:c1
        media: IEEE 802.11 Wireless Ethernet autoselect mode 11g <hostap>
        status: associated
        ssid aplab channel 6 (2437 Mhz 11g) bssid 00:0e:8e:07:ac:c1
        authmode WPA1+WPA2/802.11i privacy MIXED deftxkey 2 AES-CCM 2:128-bit
        AES-CCM 3:128-bit txpower 31.5 scanvalid 60 bgscan bgscanintvl 300
        bgscanidle 250 roam:rssi11g 7 roam:rate11g 5 protmode CTS burst
        dtimperiod 1
```

I'll update the hostap..

Anything funky in your hostapd.conf?


----------



## nakal (Jul 18, 2010)

Very simple setup:


WPA2-only (PSK - keys in hostapd.wpapsk)
WME is off (I cannot make stations associate with enabled WME at all)
No bridge (a separated net: 192.168.1.0/24)


```
wlans_ath0="wlan0"
create_args_wlan0="wlanmode hostap mode 11g media OFDM/54Mbps channel 6 -bgscan ssid MYSSID country DE -wme"
gateway_enable="YES"
ifconfig_wlan0="inet 192.168.1.1 netmask 0xffffff00 mtu 1500"
```

Here is my ath(4) device used for hostap:

```
ath0: <Atheros 2413> mem 0xf7000000-0xf700ffff irq 5 at device 9.0 on pci2
ath0: [ITHREAD]
ath0: AR2413 mac 7.8 RF2413 phy 4.5
```


----------



## nakal (Jul 18, 2010)

*Partially solved (bug in BSSID processing?)*

Ok. I found out what's happening. This is really annoying, because it seems to behave differently on different drivers(?)...

I have a fake BSSID to hide the MAC of my access point. I've set it up to the original address on ath0 and wlan0 (on the hostap) and suddenly I can see incoming packets again.

This is partially solved for me, but:

I want my access point with my fake BSSID/MAC, of course.
I know it worked earlier, because I've got this fake BSSID since years already.
The fact that rum(4) has no problem with it at all and ath(4) is faulty makes it a driver problem for my understanding.

I've tried it out multiple times now. It is definitely something wrong with the BSSID processing. Try to setup a fake BSSID, please (meaning: BSSID!=MAC address).


----------

