install ath9k firmware on both $(prefix) and $(prefix)/ath9k_htc
authorDavid P <megver83@parabola.nu>
Tue, 22 May 2018 03:06:14 +0000 (23:06 -0400)
committerJason Self <j@jxself.org>
Tue, 22 May 2018 03:12:04 +0000 (20:12 -0700)
Having ath9k_htc fw files installed at $(prefix)/ makes it work, but not having them in $(prefix)/ath9k_htc
causes the following:

[    8.952592] usb 3-2: ath9k_htc: Firmware ath9k_htc/htc_9271-1.4.0.fw requested
[    8.952652] usb 3-2: Direct firmware load for ath9k_htc/htc_9271-1.4.0.fw failed with error -2
[    8.952655] usb 3-2: ath9k_htc: Firmware htc_9271.fw requested

Although the firmware works, it throws that (benign) error, that's why linux-firmware installs it in both,
/lib/firmware and /lib/firmware/ath9k_htc, and this patch fixes this by creating a symlink.

kernel log after the patch:

[    3.929726] Workqueue: events request_firmware_work_func
[    3.929769]  ? _request_firmware+0x423/0xcc0
[    3.929772]  request_firmware_work_func+0x47/0x90
[    5.408573] usb 3-2: ath9k_htc: Firmware ath9k_htc/htc_9271-1.4.0.fw requested

Signed-off-by: David P <megver83@parabola.nu>
Makefile

index 0a9d18995c915abc396a9bf2795ad55a685796d2..1a9ceb64fb74a232256f4ede0bda466d671efbee 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -95,8 +95,10 @@ clean:
 
 install:
        if [ -a aica/arm/aica_firmware.bin ]; then $(install_program) -D aica/arm/aica_firmware.bin $(prefix)/aica_firmware.bin; fi;
-       if [ -a ath9k_htc/target_firmware/htc_9271.fw ]; then $(install_program) -D ath9k_htc/target_firmware/htc_9271.fw $(prefix)/htc_9271.fw; fi;
-       if [ -a ath9k_htc/target_firmware/htc_7010.fw ]; then $(install_program) -D ath9k_htc/target_firmware/htc_7010.fw $(prefix)/htc_7010.fw; fi;
+       if [ -a ath9k_htc/target_firmware/htc_9271.fw ]; then $(install_program) -D ath9k_htc/target_firmware/htc_9271.fw $(prefix)/ath9k_htc/htc_9271-1.4.0.fw && \
+               ln -s ath9k_htc/htc_9271-1.4.0.fw $(prefix)/htc_9271.fw; fi;
+       if [ -a ath9k_htc/target_firmware/htc_7010.fw ]; then $(install_program) -D ath9k_htc/target_firmware/htc_7010.fw $(prefix)/ath9k_htc/htc_7010-1.4.0.fw && \
+               ln -s ath9k_htc/htc_7010-1.4.0.fw $(prefix)/htc_7010.fw; fi;
        if [ -a av7110/bootcode.bin ]; then $(install_program) -D av7110/bootcode.bin $(prefix)/av7110/bootcode.bin; fi;
        if [ -a cis/3CCFEM556.cis ]; then $(install_program) -D cis/3CCFEM556.cis $(prefix)/cis/3CCFEM556.cis; fi;
        if [ -a cis/3CXEM556.cis ]; then $(install_program) -D cis/3CXEM556.cis $(prefix)/cis/3CXEM556.cis; fi;