# Atheros AR9580 and AR9582 pcie from Mikrotik? (ath_hal?)



## Daemonix (Jan 12, 2022)

Hi,

Anyone using similar wifi PCIe cards? 
Atheros AR9580 and AR9582

Will “ath_hal” or other FreeBSD module work with them?

Im thinking of getting R11e-2HPnD and R11e-5HnD from Mikrotik.

Thanks


----------



## Phishfry (Jan 12, 2022)

I am using the 5ghz Mikrotik module in my Wireless AP.


```
ath0@pci0:4:0:0:    class=0x028000 card=0xd01419b6 chip=0x0033168c rev=0x01 hdr=0x00
    vendor     = 'Qualcomm Atheros'
    device     = 'AR958x 802.11abgn Wireless Network Adapter'
    class      = network
```


```
~ # ifconfig wlan0
wlan0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    ether 4c:5e:0c:11:65:38
    groups: wlan
    ssid apu2ap channel 149 (5745 MHz 11a ht/40+) bssid 4c:5e:0c:11:65:38
    regdomain FCC country US ecm authmode WPA2/802.11i privacy MIXED
    deftxkey 3 TKIP 2:128-bit TKIP 3:128-bit txpower 23 mcastrate 6
    mgmtrate 6 scanvalid 60 ampdulimit 64k ampdudensity 8 shortgi wme
    burst dtimperiod 1 -dfs
    media: IEEE 802.11 Wireless Ethernet autoselect mode 11na <hostap>
    status: running
```


----------



## Daemonix (Jan 12, 2022)

Phishfry said:


> I am using the 5ghz Mikrotik module in my Wireless AP.
> 
> 
> ```
> ...


Thanks for confirming this! Lets see someone is using the 2.4g so I can place the order! 

So AP mode works great too right?


----------



## Daemonix (Jan 12, 2022)

Just seen your update Phishfry . Im going to be on the same hardware! Happy days!
What do you use for 2.4 mini-pcie? (if any)

Thanks a lot!


----------



## Phishfry (Jan 13, 2022)

Daemonix said:


> What do you use for 2.4 mini-pcie? (if any)


None. It's too congested. Upper bands of 5ghz are pretty empty here.

You can see by my `ifconfig` that it is running <hostap> in 11na

I see around 7 Megabytes/sec average and 10 Megabytes/sec max throughput on laptop clients at ~10m distance.


----------



## Daemonix (Jan 13, 2022)

Phishfry said:


> None. It's too congested. Upper bands of 5ghz are pretty empty here.
> 
> You can see by my `ifconfig` that it is running <hostap> in 11na
> 
> I see around 7 Megabytes/sec average and 10 Megabytes/sec max throughput on laptop clients at ~10m distance.


thanks a lot for the help!
I was thinking that the second 2.4 card could also be acting as a "wan client-mode" in some use cases and keep the 5g for the "lan" side.


----------



## Daemonix (Jan 20, 2022)

Phishfry Can I pick your brain a bit more!

Cards seem to work ok but Im not sure if I need extra configuration on the AP side.


```
5g - R11e-5HnD
ath0@pci0:1:0:0:        class=0x028000 card=0xd01419b6 chip=0x0033168c rev=0x01 hdr=0x00
    vendor     = 'Qualcomm Atheros'
    device     = 'AR958x 802.11abgn Wireless Network Adapter'
    class      = network

2g - R11e-2HPnD
ath1@pci0:5:0:0:        class=0x028000 card=0xd01619b6 chip=0x0033168c rev=0x01 hdr=0x00
        vendor     = 'Qualcomm Atheros'
        device     = 'AR958x 802.11abgn Wireless Network Adapter'
        class      = network
```


```
ath0_wlan0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        description: OPT4_WLAN5G
        ether 4c:5e:0c:10:01:ca
        inet6 fe80::4e5e:cff:fe10:1ca%ath0_wlan0 prefixlen 64 scopeid 0x8
        groups: wlan
        ssid lou5 channel 157 (5785 MHz 11a ht/40+) bssid 4c:5e:0c:10:01:ca
        regdomain FCC country US anywhere ecm authmode WPA2/802.11i -wps -tsn
        privacy MIXED deftxkey 3
        AES-CCM 2:128-bit
        AES-CCM 3:128-bit powersavemode OFF powersavesleep 100 txpower 1
        txpowmax 50.0 -dotd rtsthreshold 2346 fragthreshold 2346 bmiss 7
        11a     ucast NONE    mgmt  6 Mb/s mcast  6 Mb/s maxretry 6
        11na    ucast NONE    mgmt  6 Mb/s mcast  6 Mb/s maxretry 6
        scanvalid 60 -bgscan bgscanintvl 300 bgscanidle 250
        roam:11a     rssi    7dBm rate 12 Mb/s
        roam:11na    rssi    7dBm  MCS  1   
        -pureg protmode OFF ht htcompat ampdu ampdulimit 64k ampdudensity 8
        amsdu shortgi htprotmode RTSCTS -puren -smps -rifs stbc ldpc -uapsd
        -vht -vht40 -vht80 -vht160 -vht80p80 -wme burst -dwds -hidessid
        -apbridge dtimperiod 1 doth -dfs inact bintval 100
        parent interface: ath0
        media: IEEE 802.11 Wireless Ethernet autoselect mode 11na <hostap>
        status: running
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        
ath1_wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        description: OPT5_WLAN2G
        ether 74:4d:28:36:bc:8c
        inet6 fe80::764d:28ff:fe36:bc8c%ath1_wlan0 prefixlen 64 scopeid 0x9
        inet 192.168.66.26 netmask 0xffffff00 broadcast 192.168.66.255
        groups: wlan
        ssid LittleW channel 9 (2452 MHz 11g ht/20) bssid 00:2a:10:cf:3b:10
        regdomain FCC country US anywhere ecm authmode WPA2/802.11i -wps -tsn
        privacy ON deftxkey UNDEF
        AES-CCM 2:128-bit powersavemode OFF powersavesleep 100 txpower 6
        txpowmax 50.0 -dotd rtsthreshold 2346 fragthreshold 2346 bmiss 7
        11b     ucast NONE    mgmt  1 Mb/s mcast  1 Mb/s maxretry 6
        11g     ucast NONE    mgmt  1 Mb/s mcast  1 Mb/s maxretry 6
        11ng    ucast NONE    mgmt  1 Mb/s mcast  1 Mb/s maxretry 6
        scanvalid 60 -bgscan bgscanintvl 300 bgscanidle 250
        roam:11b     rssi    7dBm rate  1 Mb/s
        roam:11g     rssi    7dBm rate  5 Mb/s
        roam:11ng    rssi    7dBm  MCS  1   
        -pureg protmode OFF ht htcompat ampdu ampdulimit 64k ampdudensity 8
        amsdu shortgi htprotmode RTSCTS -puren -smps -rifs stbc ldpc -uapsd
        -vht -vht40 -vht80 -vht160 -vht80p80 wme burst -dwds roaming MANUAL
        bintval 102
        AC_BE cwmin  4 cwmax 10 aifs  3 txopLimit   0 -acm ack
              cwmin  4 cwmax 10 aifs  3 txopLimit   0 -acm
        AC_BK cwmin  4 cwmax 10 aifs  7 txopLimit   0 -acm ack
              cwmin  4 cwmax 10 aifs  7 txopLimit   0 -acm
        AC_VI cwmin  3 cwmax  4 aifs  2 txopLimit  94 -acm ack
              cwmin  3 cwmax  4 aifs  2 txopLimit  94 -acm
        AC_VO cwmin  2 cwmax  3 aifs  2 txopLimit  47 -acm ack
              cwmin  2 cwmax  3 aifs  2 txopLimit  47 -acm
        parent interface: ath1
        media: IEEE 802.11 Wireless Ethernet MCS mode 11ng
        status: associated
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        
wlan2: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 4e:5e:0c:10:01:ca
        groups: wlan
        ssid "" channel 157 (5785 MHz 11a ht/40+) bssid 00:00:00:00:00:00
        regdomain FCC country US anywhere ecm authmode OPEN -wps -tsn
        privacy OFF deftxkey UNDEF powersavemode OFF powersavesleep 100
        txpower 1 txpowmax 50.0 -dotd rtsthreshold 2346 fragthreshold 2346
        bmiss 7
        11a     ucast NONE    mgmt  6 Mb/s mcast  6 Mb/s maxretry 6
        11na    ucast NONE    mgmt  6 Mb/s mcast  6 Mb/s maxretry 6
        scanvalid 60 -bgscan bgscanintvl 300 bgscanidle 250
        roam:11a     rssi    7dBm rate 12 Mb/s
        roam:11na    rssi    7dBm  MCS  1   
        -pureg protmode CTS ht htcompat ampdu ampdulimit 64k ampdudensity 8
        amsdu shortgi htprotmode RTSCTS -puren -smps -rifs stbc ldpc -uapsd
        -vht -vht40 -vht80 -vht160 -vht80p80 wme burst -dwds -hidessid
        apbridge dtimperiod 1 doth -dfs inact bintval 0
        AC_BE cwmin  4 cwmax  6 aifs  3 txopLimit   0 -acm ack
              cwmin  4 cwmax 10 aifs  3 txopLimit   0 -acm
        AC_BK cwmin  4 cwmax 10 aifs  7 txopLimit   0 -acm ack
              cwmin  4 cwmax 10 aifs  7 txopLimit   0 -acm
        AC_VI cwmin  3 cwmax  4 aifs  1 txopLimit  94 -acm ack
              cwmin  3 cwmax  4 aifs  2 txopLimit  94 -acm
        AC_VO cwmin  2 cwmax  3 aifs  1 txopLimit  47 -acm ack
              cwmin  2 cwmax  3 aifs  2 txopLimit  47 -acm
        parent interface: ath0
        media: IEEE 802.11 Wireless Ethernet autoselect <hostap> (autoselect <hostap>)
        status: no carrier
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
```

(tx power is down because I did it manually for testing)

- The 5G card seems to be split in two but if I remember correctly its better if I only use one part right??? (This is the 'AP' card)
- The 5G AP give a max speed of 54Mbit on a Mac I have next to it. Are there any setting I need to check?
- Do you see anything else I need to RTFM?

Thanks


----------

