diff mbox series

ath11k - pci - backports/.config issue

Message ID CAFED-jk0C+4MJxmZ5sC-dpoe=8CF0QEZN+=Zy_TBvyYWj6E1Pg@mail.gmail.com
State RFC, archived
Headers show
Series ath11k - pci - backports/.config issue | expand

Commit Message

Janusz Dziedzic Oct. 21, 2021, 2:39 p.m. UTC
Hello,

Hit some issue with my ath11k card,  so maybe someone already fix
it/know what I missed?

My card (pcie):
root@OpenWrt:~# lspci
0000:00:00.0 PCI bridge: MEDIATEK Corp. Device 3258
0000:01:00.0 Unassigned class [ff00]: Qualcomm QCA6390 Wireless
Network Adapter [AX500-DBS (2x2)]

I have this card in my banana-pi-r64 board in pcie slot.

Checked with current/latest backports (v5.10/v5.15)
On top added patch (added some changes, attached) based on:
https://git.openwrt.org/?p=openwrt/staging/hauke.git;a=commit;h=0b115adb1b0cc9c19c7c780f3a9e6437fa0398a5
Simple choose kmod-ath11k from menuconfig.

Check it little bit (Makefile) and after:
$(SH_FUNC) var2file "$(call shvar,mac80211_config)" $(PKG_BUILD_DIR)/.config
Have correct backports/.config (ATH11K included)
And next we call:
$(MAKE) $(MAKE_OPTS) allnoconfig
After this step we remove ATH11K option(s) from backports/.config

Any idea, did I miss something?

BR
Janusz

Comments

Robert Marko Oct. 21, 2021, 2:43 p.m. UTC | #1
On Thu, 21 Oct 2021 at 16:40, Janusz Dziedzic <janusz.dziedzic@gmail.com> wrote:
>
> Hello,
>
> Hit some issue with my ath11k card,  so maybe someone already fix
> it/know what I missed?
>
> My card (pcie):
> root@OpenWrt:~# lspci
> 0000:00:00.0 PCI bridge: MEDIATEK Corp. Device 3258
> 0000:01:00.0 Unassigned class [ff00]: Qualcomm QCA6390 Wireless
> Network Adapter [AX500-DBS (2x2)]
>
> I have this card in my banana-pi-r64 board in pcie slot.
>
> Checked with current/latest backports (v5.10/v5.15)
> On top added patch (added some changes, attached) based on:
> https://git.openwrt.org/?p=openwrt/staging/hauke.git;a=commit;h=0b115adb1b0cc9c19c7c780f3a9e6437fa0398a5
> Simple choose kmod-ath11k from menuconfig.
>
> Check it little bit (Makefile) and after:
> $(SH_FUNC) var2file "$(call shvar,mac80211_config)" $(PKG_BUILD_DIR)/.config
> Have correct backports/.config (ATH11K included)
> And next we call:
> $(MAKE) $(MAKE_OPTS) allnoconfig
> After this step we remove ATH11K option(s) from backports/.config
>
> Any idea, did I miss something?

Your kernel must also have MHI and QRTR enabled, but it wont work with
the 5.10 QRTR
directly, you need to backport support for it starting the MHI interface.

You can find those patches and some other clues in my WIP branch:
https://github.com/robimarko/openwrt/tree/IPQ807x-5.10-backports

Regards,
Robert
>
> BR
> Janusz
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Janusz Dziedzic Oct. 21, 2021, 2:53 p.m. UTC | #2
czw., 21 paź 2021 o 16:43 Robert Marko <robimarko@gmail.com> napisał(a):
>
> On Thu, 21 Oct 2021 at 16:40, Janusz Dziedzic <janusz.dziedzic@gmail.com> wrote:
> >
> > Hello,
> >
> > Hit some issue with my ath11k card,  so maybe someone already fix
> > it/know what I missed?
> >
> > My card (pcie):
> > root@OpenWrt:~# lspci
> > 0000:00:00.0 PCI bridge: MEDIATEK Corp. Device 3258
> > 0000:01:00.0 Unassigned class [ff00]: Qualcomm QCA6390 Wireless
> > Network Adapter [AX500-DBS (2x2)]
> >
> > I have this card in my banana-pi-r64 board in pcie slot.
> >
> > Checked with current/latest backports (v5.10/v5.15)
> > On top added patch (added some changes, attached) based on:
> > https://git.openwrt.org/?p=openwrt/staging/hauke.git;a=commit;h=0b115adb1b0cc9c19c7c780f3a9e6437fa0398a5
> > Simple choose kmod-ath11k from menuconfig.
> >
> > Check it little bit (Makefile) and after:
> > $(SH_FUNC) var2file "$(call shvar,mac80211_config)" $(PKG_BUILD_DIR)/.config
> > Have correct backports/.config (ATH11K included)
> > And next we call:
> > $(MAKE) $(MAKE_OPTS) allnoconfig
> > After this step we remove ATH11K option(s) from backports/.config
> >
> > Any idea, did I miss something?
>
> Your kernel must also have MHI and QRTR enabled, but it wont work with
> the 5.10 QRTR
> directly, you need to backport support for it starting the MHI interface.
>
> You can find those patches and some other clues in my WIP branch:
> https://github.com/robimarko/openwrt/tree/IPQ807x-5.10-backports
>
OK, so this is removed from .config because of this?
        depends on MHI_BUS
        depends on QRTR
        depends on QRTR_MHI

BR
Janusz
Robert Marko Oct. 21, 2021, 2:53 p.m. UTC | #3
On Thu, 21 Oct 2021 at 16:53, Janusz Dziedzic <janusz.dziedzic@gmail.com> wrote:
>
> czw., 21 paź 2021 o 16:43 Robert Marko <robimarko@gmail.com> napisał(a):
> >
> > On Thu, 21 Oct 2021 at 16:40, Janusz Dziedzic <janusz.dziedzic@gmail.com> wrote:
> > >
> > > Hello,
> > >
> > > Hit some issue with my ath11k card,  so maybe someone already fix
> > > it/know what I missed?
> > >
> > > My card (pcie):
> > > root@OpenWrt:~# lspci
> > > 0000:00:00.0 PCI bridge: MEDIATEK Corp. Device 3258
> > > 0000:01:00.0 Unassigned class [ff00]: Qualcomm QCA6390 Wireless
> > > Network Adapter [AX500-DBS (2x2)]
> > >
> > > I have this card in my banana-pi-r64 board in pcie slot.
> > >
> > > Checked with current/latest backports (v5.10/v5.15)
> > > On top added patch (added some changes, attached) based on:
> > > https://git.openwrt.org/?p=openwrt/staging/hauke.git;a=commit;h=0b115adb1b0cc9c19c7c780f3a9e6437fa0398a5
> > > Simple choose kmod-ath11k from menuconfig.
> > >
> > > Check it little bit (Makefile) and after:
> > > $(SH_FUNC) var2file "$(call shvar,mac80211_config)" $(PKG_BUILD_DIR)/.config
> > > Have correct backports/.config (ATH11K included)
> > > And next we call:
> > > $(MAKE) $(MAKE_OPTS) allnoconfig
> > > After this step we remove ATH11K option(s) from backports/.config
> > >
> > > Any idea, did I miss something?
> >
> > Your kernel must also have MHI and QRTR enabled, but it wont work with
> > the 5.10 QRTR
> > directly, you need to backport support for it starting the MHI interface.
> >
> > You can find those patches and some other clues in my WIP branch:
> > https://github.com/robimarko/openwrt/tree/IPQ807x-5.10-backports
> >
> OK, so this is removed from .config because of this?
>         depends on MHI_BUS
>         depends on QRTR
>         depends on QRTR_MHI

Yes as backports cannot just select stuff like the in-tree driver can.

Robert
>
> BR
> Janusz
Janusz Dziedzic Oct. 21, 2021, 3:13 p.m. UTC | #4
czw., 21 paź 2021 o 16:54 Robert Marko <robimarko@gmail.com> napisał(a):
>
> On Thu, 21 Oct 2021 at 16:53, Janusz Dziedzic <janusz.dziedzic@gmail.com> wrote:
> >
> > czw., 21 paź 2021 o 16:43 Robert Marko <robimarko@gmail.com> napisał(a):
> > >
> > > On Thu, 21 Oct 2021 at 16:40, Janusz Dziedzic <janusz.dziedzic@gmail.com> wrote:
> > > >
> > > > Hello,
> > > >
> > > > Hit some issue with my ath11k card,  so maybe someone already fix
> > > > it/know what I missed?
> > > >
> > > > My card (pcie):
> > > > root@OpenWrt:~# lspci
> > > > 0000:00:00.0 PCI bridge: MEDIATEK Corp. Device 3258
> > > > 0000:01:00.0 Unassigned class [ff00]: Qualcomm QCA6390 Wireless
> > > > Network Adapter [AX500-DBS (2x2)]
> > > >
> > > > I have this card in my banana-pi-r64 board in pcie slot.
> > > >
> > > > Checked with current/latest backports (v5.10/v5.15)
> > > > On top added patch (added some changes, attached) based on:
> > > > https://git.openwrt.org/?p=openwrt/staging/hauke.git;a=commit;h=0b115adb1b0cc9c19c7c780f3a9e6437fa0398a5
> > > > Simple choose kmod-ath11k from menuconfig.
> > > >
> > > > Check it little bit (Makefile) and after:
> > > > $(SH_FUNC) var2file "$(call shvar,mac80211_config)" $(PKG_BUILD_DIR)/.config
> > > > Have correct backports/.config (ATH11K included)
> > > > And next we call:
> > > > $(MAKE) $(MAKE_OPTS) allnoconfig
> > > > After this step we remove ATH11K option(s) from backports/.config
> > > >
> > > > Any idea, did I miss something?
> > >
> > > Your kernel must also have MHI and QRTR enabled, but it wont work with
> > > the 5.10 QRTR
> > > directly, you need to backport support for it starting the MHI interface.
> > >
> > > You can find those patches and some other clues in my WIP branch:
> > > https://github.com/robimarko/openwrt/tree/IPQ807x-5.10-backports
> > >
> > OK, so this is removed from .config because of this?
> >         depends on MHI_BUS
> >         depends on QRTR
> >         depends on QRTR_MHI
>
> Yes as backports cannot just select stuff like the in-tree driver can.
>
Sounds good,
But we also have smth like this in backports:
depends on PCI/USB
I suspect we don't have pci/usb drivers in backports also (using
'current' kernel for that) - and works somehow - do we hack it?

BR
Janusz
Janusz Dziedzic Oct. 21, 2021, 4:29 p.m. UTC | #5
czw., 21 paź 2021 o 17:54 Robert Marko <robimarko@gmail.com> napisał(a):
>
> For PCI/USB bus level support there are per target feature flags that are set and then you can check if those are set so that you cant even select usb wlan driver if the target doesnt even have usb support enabled.
>
OK I see. Seems I can select all required kernel parts except:
QCOM_QMI_HELPERS - which is slected when ath11k/mac80211 - and we get
this from backports :)

ATH11K [=n] && NETDEVICES [=y] && WLAN [=y] && WLAN_VENDOR_ATH [=y] &&
MAC80211 [=n] && HAS_DMA [=y] && CRYPTO_MICHAEL_MIC [=y]

Seems kernel patch required to choose it manaully.

Thanks for help.

BR
Janusz
Robert Marko Oct. 21, 2021, 4:52 p.m. UTC | #6
On Thu, 21 Oct 2021 at 18:30, Janusz Dziedzic <janusz.dziedzic@gmail.com> wrote:
>
> czw., 21 paź 2021 o 17:54 Robert Marko <robimarko@gmail.com> napisał(a):
> >
> > For PCI/USB bus level support there are per target feature flags that are set and then you can check if those are set so that you cant even select usb wlan driver if the target doesnt even have usb support enabled.
> >
> OK I see. Seems I can select all required kernel parts except:
> QCOM_QMI_HELPERS - which is slected when ath11k/mac80211 - and we get
> this from backports :)
>
> ATH11K [=n] && NETDEVICES [=y] && WLAN [=y] && WLAN_VENDOR_ATH [=y] &&
> MAC80211 [=n] && HAS_DMA [=y] && CRYPTO_MICHAEL_MIC [=y]
>
> Seems kernel patch required to choose it manaully.

Yes, I had to add text to the tristate as otherwise its hidden.

Regards,
Robert
>
> Thanks for help.
>
> BR
> Janusz
Hauke Mehrtens Oct. 21, 2021, 8:54 p.m. UTC | #7
On 10/21/21 6:52 PM, Robert Marko wrote:
> On Thu, 21 Oct 2021 at 18:30, Janusz Dziedzic <janusz.dziedzic@gmail.com> wrote:
>>
>> czw., 21 paź 2021 o 17:54 Robert Marko <robimarko@gmail.com> napisał(a):
>>>
>>> For PCI/USB bus level support there are per target feature flags that are set and then you can check if those are set so that you cant even select usb wlan driver if the target doesnt even have usb support enabled.
>>>
>> OK I see. Seems I can select all required kernel parts except:
>> QCOM_QMI_HELPERS - which is slected when ath11k/mac80211 - and we get
>> this from backports :)
>>
>> ATH11K [=n] && NETDEVICES [=y] && WLAN [=y] && WLAN_VENDOR_ATH [=y] &&
>> MAC80211 [=n] && HAS_DMA [=y] && CRYPTO_MICHAEL_MIC [=y]
>>
>> Seems kernel patch required to choose it manaully.
> 
> Yes, I had to add text to the tristate as otherwise its hidden.
> 
> Regards,
> Robert

You can create kmod packages for the kernel modules build by MHI_BUS, 
QRTR, QCOM_QMI_HELPERS and whatever you need. Then the ath11k package in 
OpenWrt selects them and it should build on all targets.

We already added a title text to other configuration symbols, see 
target/linux/generic/hack-5.10/251-kconfig.patch

The hard part is known which patches to backport in addition. ;-)

Hauke
Robert Marko Oct. 21, 2021, 9 p.m. UTC | #8
On Thu, 21 Oct 2021 at 22:54, Hauke Mehrtens <hauke@hauke-m.de> wrote:
>
> On 10/21/21 6:52 PM, Robert Marko wrote:
> > On Thu, 21 Oct 2021 at 18:30, Janusz Dziedzic <janusz.dziedzic@gmail.com> wrote:
> >>
> >> czw., 21 paź 2021 o 17:54 Robert Marko <robimarko@gmail.com> napisał(a):
> >>>
> >>> For PCI/USB bus level support there are per target feature flags that are set and then you can check if those are set so that you cant even select usb wlan driver if the target doesnt even have usb support enabled.
> >>>
> >> OK I see. Seems I can select all required kernel parts except:
> >> QCOM_QMI_HELPERS - which is slected when ath11k/mac80211 - and we get
> >> this from backports :)
> >>
> >> ATH11K [=n] && NETDEVICES [=y] && WLAN [=y] && WLAN_VENDOR_ATH [=y] &&
> >> MAC80211 [=n] && HAS_DMA [=y] && CRYPTO_MICHAEL_MIC [=y]
> >>
> >> Seems kernel patch required to choose it manaully.
> >
> > Yes, I had to add text to the tristate as otherwise its hidden.
> >
> > Regards,
> > Robert
>
> You can create kmod packages for the kernel modules build by MHI_BUS,
> QRTR, QCOM_QMI_HELPERS and whatever you need. Then the ath11k package in
> OpenWrt selects them and it should build on all targets.

Yeah, that is my plan to package it in a target agnostic way.
Just lacking the time to do it.
>
> We already added a title text to other configuration symbols, see
> target/linux/generic/hack-5.10/251-kconfig.patch
>
> The hard part is known which patches to backport in addition. ;-)

I have identified a couple that are must have, but I am sure more will pop up.

Regards,
Robert
>
> Hauke
Janusz Dziedzic Oct. 22, 2021, 7:19 a.m. UTC | #9
czw., 21 paź 2021 o 23:00 Robert Marko <robimarko@gmail.com> napisał(a):
>
> On Thu, 21 Oct 2021 at 22:54, Hauke Mehrtens <hauke@hauke-m.de> wrote:
> >
> > On 10/21/21 6:52 PM, Robert Marko wrote:
> > > On Thu, 21 Oct 2021 at 18:30, Janusz Dziedzic <janusz.dziedzic@gmail.com> wrote:
> > >>
> > >> czw., 21 paź 2021 o 17:54 Robert Marko <robimarko@gmail.com> napisał(a):
> > >>>
> > >>> For PCI/USB bus level support there are per target feature flags that are set and then you can check if those are set so that you cant even select usb wlan driver if the target doesnt even have usb support enabled.
> > >>>
> > >> OK I see. Seems I can select all required kernel parts except:
> > >> QCOM_QMI_HELPERS - which is slected when ath11k/mac80211 - and we get
> > >> this from backports :)
> > >>
> > >> ATH11K [=n] && NETDEVICES [=y] && WLAN [=y] && WLAN_VENDOR_ATH [=y] &&
> > >> MAC80211 [=n] && HAS_DMA [=y] && CRYPTO_MICHAEL_MIC [=y]
> > >>
> > >> Seems kernel patch required to choose it manaully.
> > >
> > > Yes, I had to add text to the tristate as otherwise its hidden.
> > >
> > > Regards,
> > > Robert
> >
> > You can create kmod packages for the kernel modules build by MHI_BUS,
> > QRTR, QCOM_QMI_HELPERS and whatever you need. Then the ath11k package in
> > OpenWrt selects them and it should build on all targets.
>
> Yeah, that is my plan to package it in a target agnostic way.
> Just lacking the time to do it.
> >
> > We already added a title text to other configuration symbols, see
> > target/linux/generic/hack-5.10/251-kconfig.patch
> >
> > The hard part is known which patches to backport in addition. ;-)
>
> I have identified a couple that are must have, but I am sure more will pop up.
>

Finally added all packages to kernel and build correctly. Also load correctly:

[  162.361441] ath11k_pci 0000:01:00.0: assign IRQ: got 0
[  162.366922] ath11k_pci 0000:01:00.0: BAR 0: assigned [mem
0x20000000-0x20ffffff 64bit]
[  162.380001] ath11k_pci 0000:01:00.0: enabling device (0000 -> 0002)
[  162.386358] ath11k_pci 0000:01:00.0: enabling bus mastering
[  162.392043] ath11k_pci 0000:01:00.0: failed to get 32 MSI vectors,
only -28 available
[  162.399927] ath11k_pci 0000:01:00.0: failed to enable msi: -28
[  162.405778] ath11k_pci 0000:01:00.0: disabling bus mastering
[  162.411481] ath11k_pci: probe of 0000:01:00.0 failed with error -28

Seems other ath11k patch will be required, while MSI failed to get 32 vectors

> Regards,
> Robert
> >
> > Hauke




--
Janusz Dziedzic
Mathew McBride Oct. 24, 2021, 7 a.m. UTC | #10
Hello Janusz,
On Fri, Oct 22, 2021, at 1:39 AM, Janusz Dziedzic wrote:
> Hello,
> 
> Hit some issue with my ath11k card,  so maybe someone already fix
> it/know what I missed?
> 
> My card (pcie):
> root@OpenWrt:~# lspci
> 0000:00:00.0 PCI bridge: MEDIATEK Corp. Device 3258
> 0000:01:00.0 Unassigned class [ff00]: Qualcomm QCA6390 Wireless
> Network Adapter [AX500-DBS (2x2)]
> 
> I have this card in my banana-pi-r64 board in pcie slot.
> 
> Checked with current/latest backports (v5.10/v5.15)
> On top added patch (added some changes, attached) based on:
> https://git.openwrt.org/?p=openwrt/staging/hauke.git;a=commit;h=0b115adb1b0cc9c19c7c780f3a9e6437fa0398a5
> Simple choose kmod-ath11k from menuconfig.
> 
> 
Getting PCIe (QCA6390, QCN9074) ath11k cards working under kernel 5.10 takes a bit more work than the versions in the IPQ platforms.

I have a tree here which I have used successfully with the QCA6390 and QCN9074 cards (in our NXP LS1088/Ten64 platform). There are still quite a few bugs with QCN (e.g no MAC address read from the card, reboot issues) but the QCA6390 is working well.

https://gitlab.com/traversetech/ls1088firmware/openwrt/-/commits/arm64_2102_11ax

This tree is actually based on 21.02 with a backported kernel 5.10 (5.4 is too old for our hardware). If you pick most of changes to the master branch it should work.

The backports of MHI bus and ath11k changes are quite large - there are over 200 patches I cherry picked back onto 5.10 to make this work!

You can see the full patch set here:
https://gitlab.com/matt_traverse/ath11k-qcn9074-backport/-/commits/ath11k_5_10_20210909
In the OpenWrt tree above, I squashed these patches into one each for MHI, QRTR  and ath11k (grafting this onto backports)

(There are also patches related to Qualcomm PCIe cellular modems which also use the MHI infrastructure, and which I also want to use under OpenWrt)

Because of that, I haven't made any attempts to upstream this.

Moving to backports-5.15.x should make the situation more bearable, it would also help if drivers/bus/mhi and drivers/net/wwan (for the PCIe modems) is taken from backports as well.

Best Regards,
Matt
Robert Marko Oct. 24, 2021, 11:01 a.m. UTC | #11
On Sun, 24 Oct 2021 at 09:01, Mathew McBride <matt@traverse.com.au> wrote:
>
> Hello Janusz,
> On Fri, Oct 22, 2021, at 1:39 AM, Janusz Dziedzic wrote:
> > Hello,
> >
> > Hit some issue with my ath11k card,  so maybe someone already fix
> > it/know what I missed?
> >
> > My card (pcie):
> > root@OpenWrt:~# lspci
> > 0000:00:00.0 PCI bridge: MEDIATEK Corp. Device 3258
> > 0000:01:00.0 Unassigned class [ff00]: Qualcomm QCA6390 Wireless
> > Network Adapter [AX500-DBS (2x2)]
> >
> > I have this card in my banana-pi-r64 board in pcie slot.
> >
> > Checked with current/latest backports (v5.10/v5.15)
> > On top added patch (added some changes, attached) based on:
> > https://git.openwrt.org/?p=openwrt/staging/hauke.git;a=commit;h=0b115adb1b0cc9c19c7c780f3a9e6437fa0398a5
> > Simple choose kmod-ath11k from menuconfig.
> >
> >
> Getting PCIe (QCA6390, QCN9074) ath11k cards working under kernel 5.10 takes a bit more work than the versions in the IPQ platforms.
>
> I have a tree here which I have used successfully with the QCA6390 and QCN9074 cards (in our NXP LS1088/Ten64 platform). There are still quite a few bugs with QCN (e.g no MAC address read from the card, reboot issues) but the QCA6390 is working well.

The issue is that EEPROM caldata download will be in 5.16, and even
worse caldata is not loaded at all for PCI cards currently.
And it seems like they broke AHB completely with the caldata
refactoring to add EEPROM, so ath11k is a mess currently.

Not to mention dependencies on QMI, QRTR and MHI which complicates it
even further.

Regards,
Robert
>
> https://gitlab.com/traversetech/ls1088firmware/openwrt/-/commits/arm64_2102_11ax
>
> This tree is actually based on 21.02 with a backported kernel 5.10 (5.4 is too old for our hardware). If you pick most of changes to the master branch it should work.
>
> The backports of MHI bus and ath11k changes are quite large - there are over 200 patches I cherry picked back onto 5.10 to make this work!
>
> You can see the full patch set here:
> https://gitlab.com/matt_traverse/ath11k-qcn9074-backport/-/commits/ath11k_5_10_20210909
> In the OpenWrt tree above, I squashed these patches into one each for MHI, QRTR  and ath11k (grafting this onto backports)
>
> (There are also patches related to Qualcomm PCIe cellular modems which also use the MHI infrastructure, and which I also want to use under OpenWrt)
>
> Because of that, I haven't made any attempts to upstream this.
>
> Moving to backports-5.15.x should make the situation more bearable, it would also help if drivers/bus/mhi and drivers/net/wwan (for the PCIe modems) is taken from backports as well.
>
> Best Regards,
> Matt
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
diff mbox series

Patch

diff --git a/package/kernel/mac80211/ath.mk b/package/kernel/mac80211/ath.mk
index ba03ae11a6..e0b8f4a4fb 100644
--- a/package/kernel/mac80211/ath.mk
+++ b/package/kernel/mac80211/ath.mk
@@ -1,5 +1,5 @@ 
 PKG_DRIVERS += \
-	ath ath5k ath6kl ath6kl-sdio ath6kl-usb ath9k ath9k-common ath9k-htc ath10k \
+	ath ath5k ath6kl ath6kl-sdio ath6kl-usb ath9k ath9k-common ath9k-htc ath10k ath11k \
 	carl9170 owl-loader ar5523 wil6210
 
 PKG_CONFIG_DEPENDS += \
@@ -19,6 +19,7 @@  ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS
 	ATH9K_DEBUGFS \
 	ATH9K_HTC_DEBUGFS \
 	ATH10K_DEBUGFS \
+	ATH11K_DEBUGFS \
 	CARL9170_DEBUGFS \
 	ATH5K_DEBUG \
 	ATH6KL_DEBUG \
@@ -27,7 +28,9 @@  endif
 
 ifdef CONFIG_PACKAGE_MAC80211_TRACING
   config-y += \
+	ATH11K_TRACING \
 	ATH10K_TRACING \
+	ATH11K_TRACING \
 	ATH6KL_TRACING \
 	ATH_TRACEPOINTS \
 	ATH5K_TRACER \
@@ -35,7 +38,7 @@  ifdef CONFIG_PACKAGE_MAC80211_TRACING
 endif
 
 config-$(call config_package,ath) += ATH_CARDS ATH_COMMON
-config-$(CONFIG_PACKAGE_ATH_DEBUG) += ATH_DEBUG ATH10K_DEBUG ATH9K_STATION_STATISTICS
+config-$(CONFIG_PACKAGE_ATH_DEBUG) += ATH_DEBUG ATH10K_DEBUG ATH11K_DEBUG ATH9K_STATION_STATISTICS
 config-$(CONFIG_PACKAGE_ATH_DFS) += ATH9K_DFS_CERTIFIED ATH10K_DFS_CERTIFIED
 config-$(CONFIG_PACKAGE_ATH_SPECTRAL) += ATH9K_COMMON_SPECTRAL ATH10K_SPECTRAL
 config-$(CONFIG_PACKAGE_ATH_DYNACK) += ATH9K_DYNACK
@@ -55,6 +58,7 @@  config-$(CONFIG_ATH10K_THERMAL) += ATH10K_THERMAL
 
 config-$(call config_package,ath9k-htc) += ATH9K_HTC
 config-$(call config_package,ath10k) += ATH10K ATH10K_PCI
+config-$(call config_package,ath11k) += ATH11K ATH11K_PCI
 
 config-$(call config_package,ath5k) += ATH5K
 ifdef CONFIG_TARGET_ath25
@@ -281,6 +285,22 @@  define KernelPackage/ath10k/config
 
 endef
 
+define KernelPackage/ath11k
+  $(call KernelPackage/mac80211/Default)
+  TITLE:=Qualcomm 802.11ax wireless chipset support
+  URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath11k
+  DEPENDS+= @PCI_SUPPORT +kmod-ath +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT
+  FILES:= \
+	$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath11k/ath11k.ko \
+	$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath11k/ath11k_pci.ko
+  AUTOLOAD:=$(call AutoProbe,ath11k)
+endef
+
+define KernelPackage/ath11k/description
+This module adds support for Qualcomm Technologies 802.11ax family of
+chipsets.
+endef
+
 define KernelPackage/carl9170
   $(call KernelPackage/mac80211/Default)
   TITLE:=Driver for Atheros AR9170 USB sticks