Bug 215946

Summary: ath11k: support request for WCN6855 liteon subsystem device 11ad:a82d
Product: Drivers Reporter: Wim Van Boven (wimvanboven)
Component: network-wirelessAssignee: drivers_network-wireless (drivers_network-wireless)
Status: CLOSED IMPLEMENTED    
Severity: enhancement CC: avnerbensoussan96, jackys461, kvalo, mohamad.ghazanfari, richard.e.veale, rossi.jakaree, vilson, wiagn233, wojtek.turowicz
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 5.17.5 Subsystem:
Regression: No Bisected commit-id:
Attachments: board file for Lite-On Communications Inc Device a82d
attachment-16335-0.html
attachment-31837-0.html

Description Wim Van Boven 2022-05-06 07:22:21 UTC
ath11k firmwares miss support for device 11ad:a82d (used in 2022 razer blade 14):
 02:00.0 Network controller [0280]: Qualcomm Atheros QCNFA765
 [17cb:1103] (rev 01)
 Subsystem: Lite-On Communications Inc Device [11ad:a82d]

however, it seems to work fine with this one in board-2.bin:
bus=pci,vendor=17cb,device=1103,subsystem-vendor=14cd,subsystem-device=9409,qmi-chip-id=18,qmi-board-id=255m

request to include support for the specific board.
Comment 1 Wim Van Boven 2022-06-18 07:04:03 UTC
Created attachment 301200 [details]
board file for Lite-On Communications Inc Device a82d
Comment 2 Rossi Jakaree 2022-06-27 16:28:48 UTC
Hello Wim & Kalle,

Will that fix be bundled to ath11k-firmware?

Thank you,
Comment 3 jackys461 2022-07-15 04:35:41 UTC
Hello, Wim Van Boven, 

My QCA6856(Lite-On)'s sub device ID is a80d instead of a82d.
(bus=pci,vendor=17cb,device=1103,subsystem-vendor=11ad,subsystem-device=a80d,qmi-chip-id=18,qmi-board-id=255)

So, do you have a board-2.bin for this "11ad:a80d" QCA6856 module?
Thanks.

p.s.
The error message is:
[   15.390289] ath11k_pci 0000:06:00.0: fw_version 0x110d8c35 fw_build_timestamp 2022-01-27 04:01 fw_build_id QC_IMAGE_VERSION_STRING=WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
[   15.403935] ath11k_pci 0000:06:00.0: failed to fetch board data for bus=pci,vendor=17cb,device=1103,subsystem-vendor=11ad,subsystem-device=a80d,qmi-chip-id=18,qmi-board-id=255 from ath11k/WCN6855/hw2.1/board-2.bin
[   15.719840] ath11k_pci 0000:06:00.0: PCIe Bus Error: severity=Corrected, type=Physical Layer, (Receiver ID)
Comment 4 Wim Van Boven 2022-07-25 15:01:24 UTC
(In reply to jackys461 from comment #3)
> Hello, Wim Van Boven, 
> 
> My QCA6856(Lite-On)'s sub device ID is a80d instead of a82d.
> (bus=pci,vendor=17cb,device=1103,subsystem-vendor=11ad,subsystem-device=a80d,
> qmi-chip-id=18,qmi-board-id=255)
> 
> So, do you have a board-2.bin for this "11ad:a80d" QCA6856 module?
> Thanks.
> 
> p.s.
> The error message is:
> [   15.390289] ath11k_pci 0000:06:00.0: fw_version 0x110d8c35
> fw_build_timestamp 2022-01-27 04:01 fw_build_id
> QC_IMAGE_VERSION_STRING=WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
> [   15.403935] ath11k_pci 0000:06:00.0: failed to fetch board data for
> bus=pci,vendor=17cb,device=1103,subsystem-vendor=11ad,subsystem-device=a80d,
> qmi-chip-id=18,qmi-board-id=255 from ath11k/WCN6855/hw2.1/board-2.bin
> [   15.719840] ath11k_pci 0000:06:00.0: PCIe Bus Error: severity=Corrected,
> type=Physical Layer, (Receiver ID)

if it uses the same boardlayout as 82d, you can use the qca swiss army knife to add the in attachment board with the different id. find these tools here: https://github.com/qca/qca-swiss-army-knife/blob/master/tools/scripts/ath11k/ath11k-bdencoder
Comment 5 Vilson Vieira 2022-08-03 05:28:09 UTC
Hello Wim,

I have a Razer Blade 14 (2022) and I'm trying to get the wifi to work (QCA6856).

I tried to use qca-swiss-army-knife to extract the data/bins from the attached board-2.bin, edited that to match "bus=pci,vendor=17cb,device=1103,subsystem-vendor=11ad,subsystem-device=a82d,qmi-chip-id=18,qmi-board-id=255" and then created a new board-2.bin.

Unfortunately that didn't work. Is it only supported on kernel v5.17?

If you can give me some guidance, I can try to provide more information and try to help on adding support to the WCN6856 card.

Thank you in advance!
Comment 6 Panic 2022-08-03 07:19:37 UTC
This worked for up to 5.18.12. Not working 5.18.13 - 5.19.0.
Comment 7 Wim Van Boven 2022-08-03 15:55:36 UTC
Created attachment 301521 [details]
attachment-16335-0.html

works for me on 5.18.13 (fedora). you sure you did not upgrade 
/lib/firmware via some package manager? feel free to share the dmesg 
output and the board file you are using, i'll see if something obvious 
pops up.


On Wed, Aug 3 2022 at 07:19:37 AM +0000, bugzilla-daemon@kernel.org 
wrote:
> <https://bugzilla.kernel.org/show_bug.cgi?id=215946>
> 
> Panic (wojtek.turowicz@gmail.com <mailto:wojtek.turowicz@gmail.com>) 
> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            
> |wojtek.turowicz@gmail.com <mailto:|wojtek.turowicz@gmail.com>
> 
> --- Comment #6 from Panic (wojtek.turowicz@gmail.com 
> <mailto:wojtek.turowicz@gmail.com>) ---
> This worked for up to 5.18.12. Not working 5.18.13 - 5.19.0.
> 
> --
> You may reply to this email to add a comment.
> 
> You are receiving this mail because:
> You reported the bug.
Comment 8 Panic 2022-08-04 06:40:53 UTC
It is possible, I am on ubuntu 22.04. Let me try and reapply the patch again and let you know if that helped.
Comment 9 Panic 2022-08-04 06:44:22 UTC
I pasted the board-2.bin file over the existing one. No luck. The hw2.0 and hw2.1 folder structure has slightly changed I believe. Logs below.

[    2.520819] ath11k_pci 0000:02:00.0: BAR 0: assigned [mem 0xfc200000-0xfc3fffff 64bit]
[    2.520838] ath11k_pci 0000:02:00.0: enabling device (0000 -> 0002)
[    2.521282] ath11k_pci 0000:02:00.0: MSI vectors: 32
[    2.521288] ath11k_pci 0000:02:00.0: wcn6855 hw2.1
[    3.670772] ath11k_pci 0000:02:00.0: chip_id 0x12 chip_family 0xb board_id 0xff soc_id 0x400c1211
[    3.670776] ath11k_pci 0000:02:00.0: fw_version 0x11090c35 fw_build_timestamp 2022-04-18 20:23 fw_build_id WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.9
[    3.671003] ath11k_pci 0000:02:00.0: found invalid board magic
[    3.677465] ath11k_pci 0000:02:00.0: found invalid board magic
[    3.677480] ath11k_pci 0000:02:00.0: found invalid board magic
[    3.677492] ath11k_pci 0000:02:00.0: failed to fetch board data for bus=pci,vendor=17cb,device=1103,subsystem-vendor=11ad,subsystem-device=a82d,qmi-chip-id=18,qmi-board-id=255 from ath11k/WCN6855/hw2.1/board-2.bin
[    3.677493] ath11k_pci 0000:02:00.0: failed to fetch board.bin from WCN6855/hw2.1
[    3.677493] ath11k_pci 0000:02:00.0: qmi failed to fetch board file: -2
[    3.677494] ath11k_pci 0000:02:00.0: failed to load board data file: -2
Comment 10 Panic 2022-08-04 06:45:17 UTC
ls -al /lib/firmware/ath11k/WCN6855/hw2.0
total 5368
drwxr-xr-x 3 root   root      4096 sie  4 08:42 .
drwxr-xr-x 4 root   root      4096 lip 28 15:16 ..
drwxr-xr-x 7 root   root      4096 cze 26 20:55 1.1
-rw-r--r-- 1 root   root   4972544 lip 26 10:35 amss.bin
-rw-rw-r-- 1 wojtek wojtek   60036 sie  4 08:41 board-2.bin
-rw-r--r-- 1 root   root    266684 lip 26 10:35 m3.bin
-rw-r--r-- 1 root   root    152394 lip 26 10:35 Notice.txt
-rw-r--r-- 1 root   root     24310 lip 26 10:35 regdb.bin


ls -al /lib/firmware/ath11k/WCN6855/hw2.1
total 8
drwxr-xr-x 2 root root 4096 lip 28 15:16 .
drwxr-xr-x 4 root root 4096 lip 28 15:16 ..
lrwxrwxrwx 1 root root   17 lip 26 10:35 amss.bin -> ../hw2.0/amss.bin
lrwxrwxrwx 1 root root   20 lip 26 10:35 board-2.bin -> ../hw2.0/board-2.bin
lrwxrwxrwx 1 root root   15 lip 26 10:35 m3.bin -> ../hw2.0/m3.bin
lrwxrwxrwx 1 root root   18 lip 26 10:35 regdb.bin -> ../hw2.0/regdb.bin
Comment 11 Panic 2022-08-04 06:46:01 UTC
`lip` stands for july
`cze` stands for june
`sie` stand for august
Comment 12 Wim Van Boven 2022-08-04 15:41:43 UTC
(In reply to Panic from comment #10)
> ls -al /lib/firmware/ath11k/WCN6855/hw2.0
> total 5368
> drwxr-xr-x 3 root   root      4096 sie  4 08:42 .
> drwxr-xr-x 4 root   root      4096 lip 28 15:16 ..
> drwxr-xr-x 7 root   root      4096 cze 26 20:55 1.1
> -rw-r--r-- 1 root   root   4972544 lip 26 10:35 amss.bin
> -rw-rw-r-- 1 wojtek wojtek   60036 sie  4 08:41 board-2.bin
> -rw-r--r-- 1 root   root    266684 lip 26 10:35 m3.bin
> -rw-r--r-- 1 root   root    152394 lip 26 10:35 Notice.txt
> -rw-r--r-- 1 root   root     24310 lip 26 10:35 regdb.bin
> 
> 
> ls -al /lib/firmware/ath11k/WCN6855/hw2.1
> total 8
> drwxr-xr-x 2 root root 4096 lip 28 15:16 .
> drwxr-xr-x 4 root root 4096 lip 28 15:16 ..
> lrwxrwxrwx 1 root root   17 lip 26 10:35 amss.bin -> ../hw2.0/amss.bin
> lrwxrwxrwx 1 root root   20 lip 26 10:35 board-2.bin -> ../hw2.0/board-2.bin
> lrwxrwxrwx 1 root root   15 lip 26 10:35 m3.bin -> ../hw2.0/m3.bin
> lrwxrwxrwx 1 root root   18 lip 26 10:35 regdb.bin -> ../hw2.0/regdb.bin

going by your board file size and looking through kvalo's code, i reckon you copied the attached board layout as is and copied onto board-2.bin. 
the actual board-2.bin is a file composed of many board layouts. i assume the driver then throws the error as it is checking the format and getting something unexpected. you either need to patch the board-2.bin with the qca swiss army knife tools, or pull the whole file from my git: https://github.com/wimvanboven/razer-blade-14-2022-ath11k/tree/master/WCN6855/hw2.0
Comment 13 Panic 2022-08-05 06:42:05 UTC
Pulling from your repo and replacing worked! Do you think some day this will be merged to /lib/firmware/ath11k repo?
Comment 14 Wim Van Boven 2022-08-05 18:02:25 UTC
Created attachment 301527 [details]
attachment-31837-0.html

That hope made me submit this report :)
Happy Friday and glad i could help.


On Fri, 5 Aug 2022, 08:42 , <bugzilla-daemon@kernel.org> wrote:

> https://bugzilla.kernel.org/show_bug.cgi?id=215946
>
> --- Comment #13 from Panic (wojtek.turowicz@gmail.com) ---
> Pulling from your repo and replacing worked! Do you think some day this
> will be
> merged to /lib/firmware/ath11k repo?
>
> --
> You may reply to this email to add a comment.
>
> You are receiving this mail because:
> You reported the bug.
Comment 15 Richard 2022-08-06 08:52:32 UTC
(In reply to Panic from comment #13)
> Pulling from your repo and replacing worked! Do you think some day this will
> be merged to /lib/firmware/ath11k repo?

You just replaced the board-2.bin file? Or did you do something else?

On a clean install of ubuntu 22.04, replacing the board-2.bin file removes all the errors in dmesg, but the wifi still does not work. Are there some other steps (are you still using kernel 5.15? Did you install some other packages?)

Thank you in advance for help!
Comment 16 Richard 2022-08-06 11:31:13 UTC
(In reply to Richard from comment #15)
> (In reply to Panic from comment #13)
> > Pulling from your repo and replacing worked! Do you think some day this
> will
> > be merged to /lib/firmware/ath11k repo?
> 
> You just replaced the board-2.bin file? Or did you do something else?
> 
> On a clean install of ubuntu 22.04, replacing the board-2.bin file removes
> all the errors in dmesg, but the wifi still does not work. Are there some
> other steps (are you still using kernel 5.15? Did you install some other
> packages?)
> 
> Thank you in advance for help!

I got it to work -- I also had to:
1) Turn off secure boot in the bios
2) Install some other packages maybe (linux-modules-generic, ubuntu-drivers install)
3) Replace the board-2.bin file in /usr/lib/firmware and /lib/firmware
4) update software (linux-firmware etc.) to more recent version.

Working in 5.15 kernel in kubuntu 22.04!
Comment 17 Vilson Vieira 2022-08-06 14:16:07 UTC
I can confirm that as well, just did the steps mentioned by Richard and it is working flawlessly on kernel v5.15 in Ubuntu 22.04.

Thank you Wim for making the board file available!
Comment 18 Panic 2022-08-08 07:14:03 UTC
5.19 on 22.04
Comment 19 Richard 2022-08-08 07:31:05 UTC
OK, it works fine on 5.15 as well (in case you want to run the official kernel).
Comment 20 Shengyu Qu 2022-09-27 09:33:05 UTC
Kalle just updated bdf in his git, you can check if this works. 
https://github.com/kvalo/ath11k-firmware/blob/master/WCN6855/hw2.0/board-2.bin
Comment 21 Panic 2022-09-29 06:58:07 UTC
Do we know what's in that update?
Comment 22 Shengyu Qu 2022-09-29 07:28:03 UTC
(In reply to Panic from comment #21)
> Do we know what's in that update?

After unpacking,I found that he converted every bdf in newest Windows driver to make them compatible with Linux driver(they can't work with Linux driver), then packed them all into new board-2.bin.
Comment 23 Panic 2022-09-29 09:48:52 UTC
It seems that Ubuntu does get some version of that Github repo automagically thorugh apt-get. Do we know how often they sync the packages with the repo?
Comment 24 Wim Van Boven 2022-09-29 15:41:01 UTC
(In reply to Shengyu Qu from comment #20)
> Kalle just updated bdf in his git, you can check if this works. 
> https://github.com/kvalo/ath11k-firmware/blob/master/WCN6855/hw2.0/board-2.
> bin

works for me! thanks for heads up and gg Kalle
Comment 34 Kalle Valo 2022-11-21 15:18:43 UTC
(In reply to avnerbensoussan96 from comment #25)

> Do you know how to make both wifi and Bluetooth work ? 

Bugzilla is not a user support forum and these kind of questions make our (developer's) work much harder. Please send them elsewhere. I will mark these kinds of comments as private.
Comment 35 Kalle Valo 2022-11-21 15:20:11 UTC
(In reply to Wim Van Boven from comment #24)
> (In reply to Shengyu Qu from comment #20)
> > Kalle just updated bdf in his git, you can check if this works. 
> > https://github.com/kvalo/ath11k-firmware/blob/master/WCN6855/hw2.0/board-2.
> > bin
> 
> works for me! thanks for heads up and gg Kalle

Great, thanks for testing and letting us know. Closing the bug.
Comment 36 Shengyu Qu 2022-11-21 15:49:53 UTC
New board-2.bin works well on my card too. When will linux-firmware repo be updated with new firmware and board-2.bin?
Comment 37 Kalle Valo 2022-11-23 06:55:52 UTC
> New board-2.bin works well on my card too. When will linux-firmware repo be
> updated with new firmware and board-2.bin?

I try to send a pull request to linux-firmware every 3-4 months or so.
I'll do the next pull request "soon" but I can't give an exact schedule,
though it is high on my todo list. I will cc the ath11k list when I
submit the pull request, so you can follow the list to see the progress:

https://wireless.wiki.kernel.org/en/users/drivers/ath11k/mailinglist