You are not logged in.

#1 2016-06-29 20:15:11

mearon
Member
Registered: 2015-11-20
Posts: 7

ath9k_htc: firmware files appear twice in /usr/lib/firmware

Hey everyone.

I have an TP-Link TL-WN722N Wifi USB dongle:  https://wikidevi.com/wiki/TP-LINK_TL-WN722N
It's supported by the ath9k_htc driver, and has also an opensource firmware implementation: https://github.com/qca/open-ath9k-htc-firmware
ath9k_htc supports two chipsets -- the  AR9271 and the AR7010 (USB-PCIe bridge), see here: https://wireless.wiki.kernel.org/en/use … /ath9k_htc
Mine is the AR9271.

I just noticed the following:

$ la -R /usr/lib/firmware/ | grep htc
-rw-r--r--   1 root root   50980 Mar 15 10:08 htc_9271.fw
-rw-r--r--   1 root root   72684 Mar 15 10:08 htc_7010.fw
drwxr-xr-x   2 root root    4096 Apr 23 07:40 ath9k_htc
/usr/lib/firmware/ath9k_htc:
-rw-r--r--  1 root root 51008 Mar 15 10:08 htc_9271-1.4.0.fw
-rw-r--r--  1 root root 72812 Mar 15 10:08 htc_7010-1.4.0.fw

So each chip has a precompiled firmware -- but why does each firmware file does appear twice? They seem to be almost identical.
Note that Parabola only ships with the former two.
They belong to the linux-firmware package btw. And there are also two versions in the upstream tree: https://git.kernel.org/cgit/linux/kerne … e.git/tree

I'm just curious what's the difference between them smile

Thanks in advance.

Regards,

mearon

Last edited by mearon (2016-06-29 20:26:48)

Offline

#2 2016-06-30 00:25:40

kete
Member
Registered: 2015-01-01
Posts: 36

Re: ath9k_htc: firmware files appear twice in /usr/lib/firmware

Mearon, Emulatorman left a message for you, so you can see it next time pbot sees you.

Offline

#3 2016-06-30 03:56:55

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 723
Website

Re: ath9k_htc: firmware files appear twice in /usr/lib/firmware

One (default used) is for "older" kernels, the one in the directory is the latest version for recent kernels. Of course, in  Arch always use latest firmware, overwrite the older one.

PS: https://wiki.archlinux.org/index.php/Us … x-firmware

EDIT: I do not remember what is the kernel version considered older (is not documented, you can search in mailing list, but... I am doing such thing since... +1 year, 3.x age...)

Last edited by djgera (2016-06-30 04:00:21)

Offline

#4 2016-06-30 10:39:24

mearon
Member
Registered: 2015-11-20
Posts: 7

Re: ath9k_htc: firmware files appear twice in /usr/lib/firmware

@kete: Thanks, got it.

@djgera:
Ah. But what I don't understand: Since according to the pacman hook the older firmware files get overwritten -- why does they still have different file size? (Although it's only some bytes: 28 bytes for 9271 and 128 bytes for 7010)

Sorry if I don't get something obvious here...

Offline

#5 2016-07-02 04:38:01

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 723
Website

Re: ath9k_htc: firmware files appear twice in /usr/lib/firmware

The firmware repository provides both version and package just pack them. Such pacman hook is on my machine, I made it, not provided by the package, because I like the latest version.

Offline

#6 2016-09-16 19:13:37

SammysHP
Member
From: Germany
Registered: 2015-07-20
Posts: 9
Website

Re: ath9k_htc: firmware files appear twice in /usr/lib/firmware

This commit message explains it pretty good: https://git.kernel.org/cgit/linux/kerne … 11a315a3dc

PS: Just got a ping from the developer, thus the late response.

Last edited by SammysHP (2016-09-16 19:14:03)

Offline

Board footer

Powered by FluxBB