# How bad is ath in terms of power consumption



## abishai (Mar 31, 2017)

From ath(4)  bug list:

```
The driver does not fully enable power-save operation of the chip in station mode; consequently power use is suboptimal (e.g. on a laptop).
```
I'm not good in terminology, but station mode is 'normal' mode, when client connected to AP, right? So, my question is how bad power consumption on ath(4) chips for mobile users?


----------



## Phishfry (Mar 31, 2017)

No station mode is Base Station. This would be hostAPD or FreeBSD Access Point mode. Not client mode.

That said the Atheros power usage is negligible from my readings. I see a small (.1) amp increase with a module installed.

Mikrotik does make some high end modules which draw more but they are not the norm.
The AR5BXB112 modules are what I prefer. They can be had for cheap and work great. This is a full length module. For half card my favorite is AR5BHB112. They are getting harder to find now. Both offer 3x antenna connectors for MiMo. Both are based on the AR9380 chipset.


----------



## abishai (Apr 1, 2017)

OK, thanks! 
I've ordered AR9462 in m.2 form factor for my laptop.


----------



## Phishfry (Apr 1, 2017)

I am curious how well that module works. That is newer than any Atheros modules I have tried. I am quite interested in an M.2 ath0 solution.
It says it's supported so you should be OK.
https://wiki.freebsd.org/dev/ath_hal(4)/HardwareSupport


----------



## Phishfry (Apr 1, 2017)

Well I was so surprised to see an Atheros M.2 module I did some research. Most all AR9462 are mini-PCIe cards in the half card factor.

I did see a few with M.2 like this place. Note the card notch differences for M.2.
https://www.thinkpenguin.com/gnu-linux/wireless-n-m2-ngff-combo-card-v2
https://www.thinkpenguin.com/gnu-linux/wireless-n-dual-band-bluetooth-40-m2-ngff-combo-card

https://wikidevi.com/wiki/Qualcomm_Atheros_QCNFA222


----------



## Phishfry (Apr 2, 2017)

Actually I got station mode wrong. From here it is Master Mode which is Access Point and Station Mode is for clients.
https://www.safaribooksonline.com/library/view/wireless-hacks/0596005598/ch01s13.html
http://linuxwireless.org/en/users/Documentation/modes/


----------



## abishai (Apr 2, 2017)

OK, I've got my card.
It marked with QUALCOMM ATHEROS Y9108(NFA222). DImensions are 22x33, E slot. I don't see such card on your link
I put it on my DELL XPS 13 (Skylake), throwing away Intel one that is unstable for me. (I believe I've seen a commit on phabricator that improves situation with new intel cards, but I don't wish to switch to CURRENT or wait).
Looks like everything works under 11.0-RELEASE without any hints to kernel, so both chip driver and M.2 glue code works. Also, ray of love goes to DELL as they don't have digital restriction on their laptops.

```
ath0@pci0:58:0:0:   class=0x028000 card=0x03001028 chip=0x0034168c rev=0x01 hdr=0x00
    vendor     = 'Qualcomm Atheros'
    device     = 'AR9462 Wireless Network Adapter'
    class      = network
```
System consumption measured (`acpiconf -i 0`). Data was retrieved under X session with xterm, so this should reflect normal consumption of idle laptop.

wifi disabled in BIOS : 863 mA
wifi not connected : 882 mA
wifi connected and idle: 965mA
wifi fetching FreeBSD ISO: 1071
I don't know if power consumption is 'suboptimal' or not, but it looks reliable at least for me. I tried to disconnect wifi from AP after it connected and received consumption decrease as well (965 -> 882), so I think power saving works at least partially. Or maybe it works fully and BUGS part of man is outdated.


----------



## aht0 (Apr 5, 2017)

Phishfry said:


> No station mode is Base Station. This would be hostAPD or FreeBSD Access Point mode. Not client mode.
> 
> That said the Atheros power usage is negligible from my readings. I see a small (.1) amp increase with a module installed.
> *
> ...


Outside Mikrotik's own adapters and their Routerboard's, high power wifi modules from Mikrotik consume exactly as much power as "generic" standard wifi modules when put into "generic" adapters or any of the laptops.

You can get "high-power" mode only on Mikrotik's "host" or using Mikrotik's adapter card (like RB14EU). Custom PCB and mini-PCIe paths taking care of it. Such module in laptop is thus waste of money, plus it may be bitch and half to install into some laptop (heatsink on wifi+bigger MMCX connectors+limited to single band in firmware). In "high-power" mode, they may consume as much as 5W though. Pretty much perfect for Wifi AP, but not at all for client-side stuff.

"Generic" Atheros card would probably be consuming somewhere around or slightly over 0,1W - depending a lot on regdomain you have set for this card ("ETSI" is limited to 100mW power output IF I recall it right, just to give you an example). I've used mostly cards with AR9462 chipset, less AR9485 or AR9280. The latter should be well supported also on other BSD operating systems. 2 former chipsets work only on FreeBSD, very well for client-side purposes, less so for AP (beacon-error spam sometimes)


----------

