diff mbox series

[RFC,3/3] mac80211: allow to choose ath11k driver

Message ID 20211024194209.521400-3-janusz.dziedzic@gmail.com
State New
Headers show
Series [RFC,1/3] kernel: allow to choose QCOM_QMI_HELPERS | expand

Commit Message

Janusz Dziedzic Oct. 24, 2021, 7:42 p.m. UTC
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
---
 package/kernel/mac80211/ath.mk | 26 ++++++++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)

Comments

Robert Marko Oct. 24, 2021, 8:03 p.m. UTC | #1
On Sun, 24 Oct 2021 at 21:43, Janusz Dziedzic <janusz.dziedzic@gmail.com> wrote:
>
> Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
> ---
>  package/kernel/mac80211/ath.mk | 26 ++++++++++++++++++++++++--
>  1 file changed, 24 insertions(+), 2 deletions(-)
>
> diff --git a/package/kernel/mac80211/ath.mk b/package/kernel/mac80211/ath.mk
> index ba03ae11a6..634fb13195 100644
> --- a/package/kernel/mac80211/ath.mk
> +++ b/package/kernel/mac80211/ath.mk
> @@ -1,6 +1,6 @@
>  PKG_DRIVERS += \
>         ath ath5k ath6kl ath6kl-sdio ath6kl-usb ath9k ath9k-common ath9k-htc ath10k \
> -       carl9170 owl-loader ar5523 wil6210
> +       ath11k carl9170 owl-loader ar5523 wil6210
>
>  PKG_CONFIG_DEPENDS += \
>         CONFIG_PACKAGE_ATH_DEBUG \
> @@ -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,6 +28,7 @@ endif
>
>  ifdef CONFIG_PACKAGE_MAC80211_TRACING
>    config-y += \
> +       ATH11K_TRACING \
>         ATH10K_TRACING \
>         ATH6KL_TRACING \
>         ATH_TRACEPOINTS \
> @@ -35,7 +37,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

Hi Janusz,

thanks for working on this, I have had ath11k packaged for a while due
to IPQ807x but didn't want to send the patches
until 5.15 backports landed.

That being said, ath11k has spectral support as well.
>  config-$(CONFIG_PACKAGE_ATH_DYNACK) += ATH9K_DYNACK
> @@ -55,6 +57,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 +284,25 @@ 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-mac80211 +kmod-ath +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT \
> +       +@DRIVER_11AX_SUPPORT +kmod-hwmon-core +kmod-thermal +kmod-crypto-michael-mic \
HWMON and thermal are optional things that is not included in every
target, so this needs to be a selectable thing
and needs to pull in both hwmon and thermal kmods if selected.
> +       +kmod-qrtr-mhi +kmod-qcom-qmi-helpers
> +  FILES:= \
> +       $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath11k/ath11k.ko \
> +       $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath11k/ath11k_pci.ko

I am not really a fan of this approach as it always bundles PCI support.
I have it packaged as 3 packaged, ath11k core, AHB and PCI so you can
pick and choose what do you need.

> +  AUTOLOAD:=$(call AutoProbe,ath11k_pci)
This would work for AHB based stuff.

So, would you be interested in combining your MHI/QRTR kmod and QMI
selectable patches with my ath11k packaging patches?
I see it as a way to reduce effort on both sides and get this added.

Regards,
Robert
> +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
> --
> 2.25.1
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Janusz Dziedzic Oct. 24, 2021, 8:33 p.m. UTC | #2
niedz., 24 paź 2021 o 22:04 Robert Marko <robimarko@gmail.com> napisał(a):
>
> On Sun, 24 Oct 2021 at 21:43, Janusz Dziedzic <janusz.dziedzic@gmail.com> wrote:
> >
> > Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
> > ---
> >  package/kernel/mac80211/ath.mk | 26 ++++++++++++++++++++++++--
> >  1 file changed, 24 insertions(+), 2 deletions(-)
> >
> > diff --git a/package/kernel/mac80211/ath.mk b/package/kernel/mac80211/ath.mk
> > index ba03ae11a6..634fb13195 100644
> > --- a/package/kernel/mac80211/ath.mk
> > +++ b/package/kernel/mac80211/ath.mk
> > @@ -1,6 +1,6 @@
> >  PKG_DRIVERS += \
> >         ath ath5k ath6kl ath6kl-sdio ath6kl-usb ath9k ath9k-common ath9k-htc ath10k \
> > -       carl9170 owl-loader ar5523 wil6210
> > +       ath11k carl9170 owl-loader ar5523 wil6210
> >
> >  PKG_CONFIG_DEPENDS += \
> >         CONFIG_PACKAGE_ATH_DEBUG \
> > @@ -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,6 +28,7 @@ endif
> >
> >  ifdef CONFIG_PACKAGE_MAC80211_TRACING
> >    config-y += \
> > +       ATH11K_TRACING \
> >         ATH10K_TRACING \
> >         ATH6KL_TRACING \
> >         ATH_TRACEPOINTS \
> > @@ -35,7 +37,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
>
> Hi Janusz,
>
> thanks for working on this, I have had ath11k packaged for a while due
> to IPQ807x but didn't want to send the patches
> until 5.15 backports landed.
>
> That being said, ath11k has spectral support as well.
> >  config-$(CONFIG_PACKAGE_ATH_DYNACK) += ATH9K_DYNACK
> > @@ -55,6 +57,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 +284,25 @@ 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-mac80211 +kmod-ath +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT \
> > +       +@DRIVER_11AX_SUPPORT +kmod-hwmon-core +kmod-thermal +kmod-crypto-michael-mic \
> HWMON and thermal are optional things that is not included in every
> target, so this needs to be a selectable thing
> and needs to pull in both hwmon and thermal kmods if selected.
Seems ath11k driver base here on ath11k-$(CONFIG_THERMAL) += thermal.o
So, probably you should add ATH11K_CONFIG_THERMAL and send to linux-wireless ...

> > +       +kmod-qrtr-mhi +kmod-qcom-qmi-helpers
> > +  FILES:= \
> > +       $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath11k/ath11k.ko \
> > +       $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath11k/ath11k_pci.ko
>
> I am not really a fan of this approach as it always bundles PCI support.
> I have it packaged as 3 packaged, ath11k core, AHB and PCI so you can
> pick and choose what do you need.
>
> > +  AUTOLOAD:=$(call AutoProbe,ath11k_pci)
> This would work for AHB based stuff.
>
I only have PCI version and really need smth that will at least build
after will check kmod-ath11k.
Don't see any problem to fix it later - similar like we have in ath10k
- should be easy to do.

> So, would you be interested in combining your MHI/QRTR kmod and QMI
> selectable patches with my ath11k packaging patches?
> I see it as a way to reduce effort on both sides and get this added.
>
Now I think will focus on adding this series, while my platform don't
support 32 MSI vectors (not sure why we don't have them in 5.15):

Carl Huang (6):
   ath11k: get msi_data again after request_irq is called
   ath11k: add ce and ext irq flag to indicate irq_handler
   ath11k: use ATH11K_PCI_IRQ_DP_OFFSET for dp irqx
   ath11k: refactor mulitple msi vector implementation
   ath11k: supports one MSI vector
   ath11k: do not restore ASPM in case of single MSI vector

BTW, probably we should also resend:
https://patchwork.kernel.org/project/linux-arm-msm/patch/20180427140358.30839-1-elder@linaro.org/
While we have real reason to unlock QCOM_QMI_HELPERS.

Regarding ath.mk patch - this is base on Hauke patch - probably we
should change author here :)

BR
Janusz


> Regards,
> Robert
> > +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
> > --
> > 2.25.1
> >
> >
> > _______________________________________________
> > openwrt-devel mailing list
> > openwrt-devel@lists.openwrt.org
> > https://lists.openwrt.org/mailman/listinfo/openwrt-devel



--
Janusz Dziedzic
diff mbox series

Patch

diff --git a/package/kernel/mac80211/ath.mk b/package/kernel/mac80211/ath.mk
index ba03ae11a6..634fb13195 100644
--- a/package/kernel/mac80211/ath.mk
+++ b/package/kernel/mac80211/ath.mk
@@ -1,6 +1,6 @@ 
 PKG_DRIVERS += \
 	ath ath5k ath6kl ath6kl-sdio ath6kl-usb ath9k ath9k-common ath9k-htc ath10k \
-	carl9170 owl-loader ar5523 wil6210
+	ath11k carl9170 owl-loader ar5523 wil6210
 
 PKG_CONFIG_DEPENDS += \
 	CONFIG_PACKAGE_ATH_DEBUG \
@@ -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,6 +28,7 @@  endif
 
 ifdef CONFIG_PACKAGE_MAC80211_TRACING
   config-y += \
+	ATH11K_TRACING \
 	ATH10K_TRACING \
 	ATH6KL_TRACING \
 	ATH_TRACEPOINTS \
@@ -35,7 +37,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 +57,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 +284,25 @@  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-mac80211 +kmod-ath +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT \
+	+@DRIVER_11AX_SUPPORT +kmod-hwmon-core +kmod-thermal +kmod-crypto-michael-mic \
+	+kmod-qrtr-mhi +kmod-qcom-qmi-helpers
+  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_pci)
+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