[LEDE-DEV,PATCH-v2,1/3] Update to latest ath10k-ct driver, enable AHB.

Message ID 1516408024-26655-1-git-send-email-greearb@candelatech.com
State Superseded
Headers show
Series
  • [LEDE-DEV,PATCH-v2,1/3] Update to latest ath10k-ct driver, enable AHB.
Related show

Commit Message

Ben Greear Jan. 20, 2018, 12:27 a.m.
From: Ben Greear <greearb@candelatech.com>

The driver updates include:

ath10k driver backport to fix WPA 'pn' related security bugs
(4.13 based driver only currently),
a fix for off-channel TX for CT wave-1 firmware, a likely
fix for napi related crashes, and a backport of the firmware fetch
patch.

AHB is needed for the IPQ4019 platform radios.

Signed-off-by: Ben Greear <greearb@candelatech.com>
---

v2:  Don't remove stock 4019 firmware from 4019 platform depends.
     Add ability to load ct-firmware-[52].bin before other firmware.
     Add ath10k-ct driver specific firmware option for 4019.

     Verified driver loads on Jalapeno board. 

package/kernel/ath10k-ct/Makefile                  | 14 +++++----
 ...ctivate-user-space-firmware-loading-again.patch | 36 ----------------------
 2 files changed, 8 insertions(+), 42 deletions(-)
 delete mode 100644 package/kernel/ath10k-ct/patches/130-ath10k-activate-user-space-firmware-loading-again.patch

Comments

Christian Lamparter Jan. 21, 2018, 3:54 p.m. | #1
On Saturday, January 20, 2018 1:27:04 AM CET greearb@candelatech.com wrote:
> From: Ben Greear <greearb@candelatech.com>
> 
> Initial beta release of the CT IPQ4019 firmware.  Features are
> similar to the CT 9984 firmware
> 
> Signed-off-by: Ben Greear <greearb@candelatech.com>
> ---
>  package/firmware/ath10k-firmware/Makefile | 74 +++++++++++++++++++++++++++++--
>  1 file changed, 71 insertions(+), 3 deletions(-)
> 
> diff --git a/package/firmware/ath10k-firmware/Makefile b/package/firmware/ath10k-firmware/Makefile
> index 94e5953..c525d87 100644
> --- a/package/firmware/ath10k-firmware/Makefile
> +++ b/package/firmware/ath10k-firmware/Makefile
> @@ -50,6 +50,7 @@ $(Package/ath10k-firmware-default)
>  endef
>  
>  CT_FIRMWARE_FILE = $(1)-$($(1)_FIRMWARE_FILE_CT)
> +CT_FIRMWARE_FILE_HTT = $(1)-$($(1)_FIRMWARE_FILE_CT_HTT)
>  
>  define Download/ct-firmware
>    URL:=https://www.candelatech.com/downloads/$(2)
> @@ -57,6 +58,12 @@ define Download/ct-firmware
>    URL_FILE:=$($(1)_FIRMWARE_FILE_CT)
>  endef
>  
> +define Download/ct-firmware-htt
> +  URL:=https://www.candelatech.com/downloads/$(2)
> +  FILE:=$(call CT_FIRMWARE_FILE_HTT,$(1))
> +  URL_FILE:=$($(1)_FIRMWARE_FILE_CT_HTT)
> +endef
> +
>  QCA988X_FIRMWARE_FILE_CT:=firmware-2-ct-full-community-19.bin.lede
>  define Download/ath10k-firmware-qca988x-ct
>    $(call Download/ct-firmware,QCA988X,)
> @@ -85,6 +92,20 @@ define Download/ath10k-firmware-qca9984-ct
>  endef
>  $(eval $(call Download,ath10k-firmware-qca9984-ct))
>  
> +QCA4019_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-full-htt-mgt-community-10.bin-lede.002
> +define Download/ath10k-firmware-qca4019-ct-htt
> +  $(call Download/ct-firmware-htt,QCA4019,ath10k-4019-10-4)
> +  HASH:=e67bbc8eba56bc72c1aa99a6304ea98345bddc34f4844d5d79a51db1d6d8c425
> +endef
> +$(eval $(call Download,ath10k-firmware-qca4019-ct-htt))
> +
> +QCA4019_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-10.bin-lede.002
> +define Download/ath10k-firmware-qca4019-ct
> +  $(call Download/ct-firmware,QCA4019,ath10k-4019-10-4)
> +  HASH:=f1ebb73903e4e6a6209b8acdc623bc43d355d32cce838ce0448befe9196c7866
> +endef
> +$(eval $(call Download,ath10k-firmware-qca4019-ct))
> +
>  QCA9888_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-9.bin-lede.004
>  define Download/ath10k-firmware-qca9888-ct
>    $(call Download/ct-firmware,QCA9888,ath10k-9888-10-4)
> @@ -146,6 +167,18 @@ This firmware conflicts with the standard 9984 firmware, so select only
>  one.
>  endef
>  
> +define Package/ath10k-firmware-qca4019-ct-htt/description
> +Alternative ath10k firmware for IPQ4019 radio from Candela Technologies.
> +Enables IBSS and other features.  Requires ath10k-ct driver to function.
> +See:  http://www.candelatech.com/ath10k-10.4.php
> +endef
> +
> +define Package/ath10k-firmware-qca4019-ct/description
> +Alternative ath10k firmware for IPQ4019 radio from Candela Technologies.
> +Enables IBSS and other features.  Works with standard or ath10k-ct driver.
> +See:  http://www.candelatech.com/ath10k-10.4.php
> +endef
> +
>  define Package/ath10k-firmware-qca9888-ct/description
>  Alternative ath10k firmware for QCA9886 and QCA9888 from Candela Technologies.
>  Enables IBSS and other features.  See:
> @@ -162,21 +195,34 @@ endef
>  
>  define Package/ath10k-firmware-qca99x0-ct
>  $(Package/ath10k-firmware-default)
> -  TITLE:=ath10k CT 10.4.3 firmware for QCA99x0 devices
> +  TITLE:=ath10k CT 10.4 firmware for QCA99x0 devices
>    SECTION:=firmware
>    CATEGORY:=Firmware
>  endef
>  
>  define Package/ath10k-firmware-qca9984-ct
>  $(Package/ath10k-firmware-default)
> -  TITLE:=ath10k CT 10.4.3 firmware for QCA9984 devices
> +  TITLE:=ath10k CT 10.4 firmware for QCA9984 devices
> +  SECTION:=firmware
> +  CATEGORY:=Firmware
> +endef
> +
> +define Package/ath10k-firmware-qca4019-ct-htt
> +$(Package/ath10k-firmware-default)
> +  TITLE:=ath10k CT 10.4 htt-mgt for QCA4018/9
> +  SECTION:=firmware
> +  CATEGORY:=Firmware
> +endef
> +define Package/ath10k-firmware-qca4019-ct
> +$(Package/ath10k-firmware-default)
> +  TITLE:=ath10k CT 10.4 firmware for QCA4018/9
>    SECTION:=firmware
>    CATEGORY:=Firmware
>  endef
>  
>  define Package/ath10k-firmware-qca9888-ct
>  $(Package/ath10k-firmware-default)
> -  TITLE:=ath10k CT 10.4.3 firmware for QCA9886 and QCA9888 devices
> +  TITLE:=ath10k CT 10.4 fw for QCA9886/8 devices
>    SECTION:=firmware
>    CATEGORY:=Firmware
>  endef
> @@ -328,6 +374,26 @@ define Package/ath10k-firmware-qca9984-ct/install
>  		$(1)/lib/firmware/ath10k/QCA9984/hw1.0/firmware-5.bin
>  endef
>  
> +define Package/ath10k-firmware-qca4019-ct-htt/install
> +	$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA4019/hw1.0
> +	$(INSTALL_DATA) \
> +		$(PKG_BUILD_DIR)/QCA4019/hw1.0/board-2.bin \
> +		$(1)/lib/firmware/ath10k/QCA4019/hw1.0/
> +	$(INSTALL_DATA) \
> +		$(DL_DIR)/$(call CT_FIRMWARE_FILE_HTT,QCA4019) \
> +		$(1)/lib/firmware/ath10k/QCA4019/hw1.0/ct-firmware-5.bin
> +endef
> +
> +define Package/ath10k-firmware-qca4019-ct/install
> +	$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA4019/hw1.0
> +	$(INSTALL_DATA) \
> +		$(PKG_BUILD_DIR)/QCA4019/hw1.0/board-2.bin \
> +		$(1)/lib/firmware/ath10k/QCA4019/hw1.0/
> +	$(INSTALL_DATA) \
> +		$(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA4019) \
> +		$(1)/lib/firmware/ath10k/QCA4019/hw1.0/firmware-5.bin
> +endef
> +
>  define Package/ath10k-firmware-qca9888-ct/install
>  	$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9888/hw2.0
>  	ln -s \
> @@ -353,4 +419,6 @@ $(eval $(call BuPackage/ath10k-firmware-defaultildPackage,ath10k-firmware-qca9887-ct))
>  $(eval $(call BuildPackage,ath10k-firmware-qca988x-ct))
>  $(eval $(call BuildPackage,ath10k-firmware-qca99x0-ct))
>  $(eval $(call BuildPackage,ath10k-firmware-qca9984-ct))
> +$(eval $(call BuildPackage,ath10k-firmware-qca4019-ct-htt))
> +$(eval $(call BuildPackage,ath10k-firmware-qca4019-ct))
>  $(eval $(call BuildPackage,ath10k-firmware-qca9888-ct))
> 
---
I applied the full series on top of the r5904 (see attached
diffconfig). But I ran into issues when selecting ath10k-ct
and ath10k-firmware-qca4019-ct during image creation.
So what's the recommended way to install these?

Furthermore, it looks like the packages are lacking CONFLICTS
flags. Like between ath10k-firmware-qca4019-ct-htt and 
ath10k-firmware-qca4019-ct. Again the conflict between the
ct-htt and -ct  firmware is not because of the firmware itself
(they have different names "firmware-5.bin" vs "ct-firmware-5.bin")
but because of the "board-2.bin". Upon further investigation, the
board-2.bin actually comes from the ath10k github, so it's the
same as ath10k-firmware-qca4019. So, is it really necessary to
have the same blob in two packages?
---
Collected errors:
 * check_data_file_clashes: Package kmod-ath10k wants to install file /mnt/build/lede/ath10k-ct-test/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/root-ipq806x/lib/modules/4.9.76/ath10k_core.ko
        But that file is already provided by package  * kmod-ath10k-ct
 * check_data_file_clashes: Package kmod-ath10k wants to install file /mnt/build/lede/ath10k-ct-test/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/root-ipq806x/lib/modules/4.9.76/ath10k_pci.ko
        But that file is already provided by package  * kmod-ath10k-ct
 * opkg_install_cmd: Cannot install package kmod-ath10k.
 * check_data_file_clashes: Package ath10k-firmware-qca4019-ct wants to install file /mnt/build/lede/ath10k-ct-test/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/root-ipq806x/lib/firmware/ath10k/QCA4019/hw1.0/board-2.bin
        But that file is already provided by package  * ath10k-firmware-qca4019
 * check_data_file_clashes: Package ath10k-firmware-qca4019-ct wants to install file /mnt/build/lede/ath10k-ct-test/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/root-ipq806x/lib/firmware/ath10k/QCA4019/hw1.0/firmware-5.bin
        But that file is already provided by package  * ath10k-firmware-qca4019
 * opkg_install_cmd: Cannot install package ath10k-firmware-qca4019-ct.
make[2]: *** [package/Makefile:67: package/install] Error 255
make[2]: Leaving directory '/mnt/build/lede/ath10k-ct-test'
make[1]: *** [package/Makefile:103: /mnt/build/lede/ath10k-ct-test/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/stamp/.package_install] Error 2
make[1]: Leaving directory '/mnt/build/lede/ath10k-ct-test'
make: *** [/mnt/build/lede/ath10k-ct-test/include/toplevel.mk:218: world] Error 2

---  diffconfig.sh 
CONFIG_TARGET_ipq806x=y
CONFIG_TARGET_MULTI_PROFILE=y
CONFIG_TARGET_PER_DEVICE_ROOTFS=y
CONFIG_TARGET_DEVICE_ipq806x_DEVICE_avm_fritzbox-4040=y
CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_DEVICE_avm_fritzbox-4040=""
CONFIG_TARGET_DEVICE_ipq806x_DEVICE_openmesh_a42=y
CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_DEVICE_openmesh_a42=""
CONFIG_TARGET_DEVICE_ipq806x_DEVICE_qcom_ap-dk01.1-c1=y
CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_DEVICE_qcom_ap-dk01.1-c1=""
CONFIG_TARGET_DEVICE_ipq806x_DEVICE_qcom_ap-dk04.1-c1=y
CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_DEVICE_qcom_ap-dk04.1-c1=""
CONFIG_TARGET_PER_DEVICE_ROOTFS=y
CONFIG_PACKAGE_ath10k-firmware-qca4019=y
CONFIG_PACKAGE_ath10k-firmware-qca4019-ct=y
CONFIG_PACKAGE_ipq-wifi-openmesh_a42=y
CONFIG_PACKAGE_kmod-ath10k-ct=y
CONFIG_PACKAGE_kmod-hwmon-core=y
---
sha1sum .pkgdir/ath10k-firmware-qca4019-ct/lib/firmware/ath10k/QCA4019/hw1.0/board-2.bin \
        .pkgdir/ath10k-firmware-qca4019/lib/firmware/ath10k/QCA4019/hw1.0/board-2.bin
aacc603506832ec81552e1b8f2155f9dc12c12d0  .pkgdir/ath10k-firmware-qca4019-ct/lib/firmware/ath10k/QCA4019/hw1.0/board-2.bin
aacc603506832ec81552e1b8f2155f9dc12c12d0  .pkgdir/ath10k-firmware-qca4019/lib/firmware/ath10k/QCA4019/hw1.0/board-2.bin
Ben Greear Jan. 21, 2018, 9:49 p.m. | #2
On 01/21/2018 07:54 AM, Christian Lamparter wrote:
> On Saturday, January 20, 2018 1:27:04 AM CET greearb@candelatech.com wrote:
>> From: Ben Greear <greearb@candelatech.com>
>>
>> Initial beta release of the CT IPQ4019 firmware.  Features are
>> similar to the CT 9984 firmware

>> +$(eval $(call BuildPackage,ath10k-firmware-qca4019-ct-htt))
>> +$(eval $(call BuildPackage,ath10k-firmware-qca4019-ct))
>>  $(eval $(call BuildPackage,ath10k-firmware-qca9888-ct))
>>
> ---
> I applied the full series on top of the r5904 (see attached
> diffconfig). But I ran into issues when selecting ath10k-ct
> and ath10k-firmware-qca4019-ct during image creation.
> So what's the recommended way to install these?

Are you able to un-select the default firmware?  In that case, there should
be no issue with the board-2.bin?

I expect the use case is to install exactly one of the firmware targets.

If we take the board-2.bin out of the firmware install target, then users
would somehow have to know to install some sort of board-2.bin or similar
file, otherwise the driver still will not load.

Since some boards have their own custom board-2.bin, I'm not sure how to
automate this properly.  But, if we just assume users will select the
right thing, then splitting board-2.bin out of the FW install target
should be OK I guess?

Thanks,
Ben
Christian Lamparter Jan. 22, 2018, 5:51 p.m. | #3
On Sunday, January 21, 2018 10:49:19 PM CET Ben Greear wrote:
> 
> On 01/21/2018 07:54 AM, Christian Lamparter wrote:
> > On Saturday, January 20, 2018 1:27:04 AM CET greearb@candelatech.com wrote:
> >> From: Ben Greear <greearb@candelatech.com>
> >>
> >> Initial beta release of the CT IPQ4019 firmware.  Features are
> >> similar to the CT 9984 firmware
> 
> >> +$(eval $(call BuildPackage,ath10k-firmware-qca4019-ct-htt))
> >> +$(eval $(call BuildPackage,ath10k-firmware-qca4019-ct))
> >>  $(eval $(call BuildPackage,ath10k-firmware-qca9888-ct))
> >>
> > ---
> > I applied the full series on top of the r5904 (see attached
> > diffconfig). But I ran into issues when selecting ath10k-ct
> > and ath10k-firmware-qca4019-ct during image creation.
> > So what's the recommended way to install these?
> 
> Are you able to un-select the default firmware? In that case,
> there should be no issue with the board-2.bin?
Try the diffconfig. It a multi-image built that includes all the current
qca4019 targets. From what I can see, neither kmod-ath10k or
ath10k-firmware-qca4019 can be deselected. At best kmod-ath10k
can be compiled as an installable package (=m). However 
ath10k-firmware-qca4019 will always be included (=y)
(due to the ipq-wifi packages' DEPENDS).

kconfig/menuconfig provides some information to why the packages
are being picked:

kmod-ath10k is Selected by: MODULE_DEFAULT_kmod-ath10k [=y] && \
         TARGET_PER_DEVICE_ROOTFS [=y] && m && MODULES [=y]

ath10k-firmware-qca4019 is Selected by:
  MODULE_DEFAULT_ath10k-firmware-qca4019 [=y] && TARGET_PER_DEVICE_ROOTFS [=y] \\ 
  && m && MODULES [=y] || PACKAGE_ipq-wifi-avm_fritzbox-4040 [=m] && \
  TARGET_ipq806x [=y] || PACKAGE_ipq-wifi-openmesh_a42 [=y] &&
  TARGET_ipq806x [=y] && (m && MODULES [=y] || PACKAGE_ipq-wifi-avm_fritzbox-4040 [=m]!=y)

> I expect the use case is to install exactly one of the firmware targets.
>
> If we take the board-2.bin out of the firmware install target, then users
> would somehow have to know to install some sort of board-2.bin or similar
> file, otherwise the driver still will not load.
>
> Since some boards have their own custom board-2.bin, I'm not sure how to
> automate this properly.  But, if we just assume users will select the
> right thing, then splitting board-2.bin out of the FW install target
> should be OK I guess?
I guess. Separating the board-2.bin files also has an advantage that it
will make it possible for users to update the ath10k-firmware-* package
on a deployed system without needing to reinstall the custom ipq-wifi
for their device each time.

But why not ask the ath10k-firmware package maintainer for input as well?
It could just be that a solution is just hiding in plain sight.

For example a easy solution would be just add a short note to the package
description of ath10k-firmware-qca4019-ct(-htt) like the one that was added
to ath10k-firmware-qca9984-ct: 
"This firmware conflicts with the standard 9984 firmware, so select only
one." [0] (but tailored to qca4019). This will leave it to the user to
either select/deselect the right firmware and driver combo manually.

Another possible way would be to set the "CONFLICTS" variable on the
kmod-ath10k(-ct) and all the ath10k-firmware-* packages. This would have
the advantage that the package/firmware/driver selection would be automatic.

Or maybe there's an elegant solution with "ALTERNATIVES"/"REPLACES"/"PROVIDES"/
"DEPENDS" package variables. With the kmod-ath10k-ct and ath10k-firmware-*-ct
packages at a higher priority, so they'll take precedence if selected.

... etc.

Regards,
Christian

[0] <https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=package/firmware/ath10k-firmware/Makefile;h=94e59537834a67e8b9d469f6a050697e6cf24789;hb=HEAD#l145>
Ben Greear Feb. 13, 2018, 6:27 p.m. | #4
What is the status on this?

I have some new firmware/driver changes I'd like to get upstream
as well, but this series is stuck in limbo.  The first two patches
should should be useful for anyone using my ath10k-ct stuff, and the
third will at least help IPQ4019 have a better chance at running my
code, even if they cannot currently select the options w/out applying
a few patches to relax some of the REQUIRES stuff that the 4019
platforms may currently have.

Thanks,
Ben

On 01/19/2018 04:27 PM, greearb@candelatech.com wrote:
> From: Ben Greear <greearb@candelatech.com>
>
> The driver updates include:
>
> ath10k driver backport to fix WPA 'pn' related security bugs
> (4.13 based driver only currently),
> a fix for off-channel TX for CT wave-1 firmware, a likely
> fix for napi related crashes, and a backport of the firmware fetch
> patch.
>
> AHB is needed for the IPQ4019 platform radios.
>
> Signed-off-by: Ben Greear <greearb@candelatech.com>
> ---
>
> v2:  Don't remove stock 4019 firmware from 4019 platform depends.
>      Add ability to load ct-firmware-[52].bin before other firmware.
>      Add ath10k-ct driver specific firmware option for 4019.
>
>      Verified driver loads on Jalapeno board.
>
> package/kernel/ath10k-ct/Makefile                  | 14 +++++----
>  ...ctivate-user-space-firmware-loading-again.patch | 36 ----------------------
>  2 files changed, 8 insertions(+), 42 deletions(-)
>  delete mode 100644 package/kernel/ath10k-ct/patches/130-ath10k-activate-user-space-firmware-loading-again.patch
>
> diff --git a/package/kernel/ath10k-ct/Makefile b/package/kernel/ath10k-ct/Makefile
> index fe094e7..83d3a05 100644
> --- a/package/kernel/ath10k-ct/Makefile
> +++ b/package/kernel/ath10k-ct/Makefile
> @@ -9,8 +9,8 @@ PKG_LICENSE_FILES:=
>  PKG_SOURCE_URL:=https://github.com/greearb/ath10k-ct.git
>  PKG_SOURCE_PROTO:=git
>  PKG_SOURCE_DATE:=2017-06-13
> -PKG_SOURCE_VERSION:=bded1823912549017d819d1796273b3134c3de20
> -PKG_MIRROR_HASH:=616174650e12a82edb6b6bd18ac186e2c6a48fdad0082df9d2011ab20940814b
> +PKG_SOURCE_VERSION:=e1edd74d5f0c5291b0be72c81033e74e267929d4
> +PKG_MIRROR_HASH:=945dc7110017a80c33cac20d9d2a9beda0a6a98b50178319403568098534e60a
>
>  PKG_MAINTAINER:=Ben Greear <greearb@candelatech.com>
>  PKG_BUILD_PARALLEL:=1
> @@ -29,7 +29,7 @@ include $(INCLUDE_DIR)/package.mk
>  define KernelPackage/ath10k-ct
>    SUBMENU:=Wireless Drivers
>    TITLE:=ath10k-ct driver optimized for CT ath10k firmware
> -  DEPENDS:=+kmod-mac80211 +kmod-ath +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT @PCI_SUPPORT +kmod-hwmon-core
> +  DEPENDS:=+kmod-mac80211 +kmod-ath +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT +@DRIVER_11W_SUPPORT +kmod-hwmon-core
>    FILES:=\
>  	$(PKG_BUILD_DIR)/ath10k$(CT_KVER)/ath10k_pci.ko \
>  	$(PKG_BUILD_DIR)/ath10k$(CT_KVER)/ath10k_core.ko
> @@ -50,9 +50,11 @@ ifdef CONFIG_PACKAGE_MAC80211_MESH
>  endif
>
>  CT_MAKEDEFS += CONFIG_ATH10K=m CONFIG_ATH10K_PCI=m
> -# No AHB support enabled yet.  Could conditionally enable it later.
> -#CT_MAKEDEFS += CONFIG_ATH10K_AHB=y
> -#NOSTDINC_FLAGS += -DCONFIG_ATH10K_AHB
> +
> +# This AHB logic is needed for IPQ4019 radios
> +CT_MAKEDEFS += CONFIG_ATH10K_AHB=m
> +NOSTDINC_FLAGS += -DCONFIG_ATH10K_AHB
> +
>  NOSTDINC_FLAGS += -DSTANDALONE_CT
>
>  ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS
> diff --git a/package/kernel/ath10k-ct/patches/130-ath10k-activate-user-space-firmware-loading-again.patch b/package/kernel/ath10k-ct/patches/130-ath10k-activate-user-space-firmware-loading-again.patch
> deleted file mode 100644
> index dc02a9d..0000000
> --- a/package/kernel/ath10k-ct/patches/130-ath10k-activate-user-space-firmware-loading-again.patch
> +++ /dev/null
> @@ -1,36 +0,0 @@
> -From c0cc00f250e19c717fc9cdbdb7f55aaa569c7498 Mon Sep 17 00:00:00 2001
> -From: Hauke Mehrtens <hauke@hauke-m.de>
> -Date: Thu, 24 Aug 2017 23:06:41 +0200
> -Subject: [PATCH] ath10k: activate user space firmware loading again
> -
> -In commit 9f5bcfe93315 ("ath10k: silence firmware file probing
> -warnings") the firmware loading was changed from request_firmware() to
> -request_firmware_direct() to silence some warnings in case it fails.
> -request_firmware_direct() directly searches in the file system only and
> -does not send a hotplug event to user space in case it could not find
> -the firmware directly.
> -In LEDE we use a user space script to extract the calibration data from
> -the flash memory which gets triggered by the hotplug event. This way the
> -firmware gets extracted from some vendor specific partition when the
> -driver requests this firmware. This mechanism does not work any more
> -after this change.
> -
> -Fixes: 9f5bcfe93315 ("ath10k: silence firmware file probing warnings")
> -Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
> -Cc: Michal Kazior <michal.kazior@tieto.com>
> -Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
> ----
> - ath10k-4.13/core.c | 2 +-
> - 1 file changed, 1 insertion(+), 1 deletion(-)
> -
> ---- a/ath10k-4.13/core.c
> -+++ b/ath10k-4.13/core.c
> -@@ -556,7 +556,7 @@ static const struct firmware *ath10k_fet
> - 		dir = ".";
> -
> - 	snprintf(filename, sizeof(filename), "%s/%s", dir, file);
> --	ret = request_firmware_direct(&fw, filename, ar->dev);
> -+	ret = request_firmware(&fw, filename, ar->dev);
> - 	ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot fw request '%s': %d\n",
> - 		   filename, ret);
> -
>
John Crispin Feb. 13, 2018, 8:03 p.m. | #5
On 13/02/18 19:27, Ben Greear wrote:
> What is the status on this?
>
> I have some new firmware/driver changes I'd like to get upstream
> as well, but this series is stuck in limbo.  The first two patches
> should should be useful for anyone using my ath10k-ct stuff, and the
> third will at least help IPQ4019 have a better chance at running my
> code, even if they cannot currently select the options w/out applying
> a few patches to relax some of the REQUIRES stuff that the 4019
> platforms may currently have.
>
> Thanks,
> Ben

Hi Ben,

was going to send an email, ... what happened to patch 3/3 ?

     John
>
> On 01/19/2018 04:27 PM, greearb@candelatech.com wrote:
>> From: Ben Greear <greearb@candelatech.com>
>>
>> The driver updates include:
>>
>> ath10k driver backport to fix WPA 'pn' related security bugs
>> (4.13 based driver only currently),
>> a fix for off-channel TX for CT wave-1 firmware, a likely
>> fix for napi related crashes, and a backport of the firmware fetch
>> patch.
>>
>> AHB is needed for the IPQ4019 platform radios.
>>
>> Signed-off-by: Ben Greear <greearb@candelatech.com>
>> ---
>>
>> v2:  Don't remove stock 4019 firmware from 4019 platform depends.
>>      Add ability to load ct-firmware-[52].bin before other firmware.
>>      Add ath10k-ct driver specific firmware option for 4019.
>>
>>      Verified driver loads on Jalapeno board.
>>
>> package/kernel/ath10k-ct/Makefile                  | 14 +++++----
>>  ...ctivate-user-space-firmware-loading-again.patch | 36 
>> ----------------------
>>  2 files changed, 8 insertions(+), 42 deletions(-)
>>  delete mode 100644 
>> package/kernel/ath10k-ct/patches/130-ath10k-activate-user-space-firmware-loading-again.patch
>>
>> diff --git a/package/kernel/ath10k-ct/Makefile 
>> b/package/kernel/ath10k-ct/Makefile
>> index fe094e7..83d3a05 100644
>> --- a/package/kernel/ath10k-ct/Makefile
>> +++ b/package/kernel/ath10k-ct/Makefile
>> @@ -9,8 +9,8 @@ PKG_LICENSE_FILES:=
>>  PKG_SOURCE_URL:=https://github.com/greearb/ath10k-ct.git
>>  PKG_SOURCE_PROTO:=git
>>  PKG_SOURCE_DATE:=2017-06-13
>> -PKG_SOURCE_VERSION:=bded1823912549017d819d1796273b3134c3de20
>> -PKG_MIRROR_HASH:=616174650e12a82edb6b6bd18ac186e2c6a48fdad0082df9d2011ab20940814b 
>>
>> +PKG_SOURCE_VERSION:=e1edd74d5f0c5291b0be72c81033e74e267929d4
>> +PKG_MIRROR_HASH:=945dc7110017a80c33cac20d9d2a9beda0a6a98b50178319403568098534e60a 
>>
>>
>>  PKG_MAINTAINER:=Ben Greear <greearb@candelatech.com>
>>  PKG_BUILD_PARALLEL:=1
>> @@ -29,7 +29,7 @@ include $(INCLUDE_DIR)/package.mk
>>  define KernelPackage/ath10k-ct
>>    SUBMENU:=Wireless Drivers
>>    TITLE:=ath10k-ct driver optimized for CT ath10k firmware
>> -  DEPENDS:=+kmod-mac80211 +kmod-ath +@DRIVER_11N_SUPPORT 
>> +@DRIVER_11AC_SUPPORT @PCI_SUPPORT +kmod-hwmon-core
>> +  DEPENDS:=+kmod-mac80211 +kmod-ath +@DRIVER_11N_SUPPORT 
>> +@DRIVER_11AC_SUPPORT +@DRIVER_11W_SUPPORT +kmod-hwmon-core
>>    FILES:=\
>>      $(PKG_BUILD_DIR)/ath10k$(CT_KVER)/ath10k_pci.ko \
>>      $(PKG_BUILD_DIR)/ath10k$(CT_KVER)/ath10k_core.ko
>> @@ -50,9 +50,11 @@ ifdef CONFIG_PACKAGE_MAC80211_MESH
>>  endif
>>
>>  CT_MAKEDEFS += CONFIG_ATH10K=m CONFIG_ATH10K_PCI=m
>> -# No AHB support enabled yet.  Could conditionally enable it later.
>> -#CT_MAKEDEFS += CONFIG_ATH10K_AHB=y
>> -#NOSTDINC_FLAGS += -DCONFIG_ATH10K_AHB
>> +
>> +# This AHB logic is needed for IPQ4019 radios
>> +CT_MAKEDEFS += CONFIG_ATH10K_AHB=m
>> +NOSTDINC_FLAGS += -DCONFIG_ATH10K_AHB
>> +
>>  NOSTDINC_FLAGS += -DSTANDALONE_CT
>>
>>  ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS
>> diff --git 
>> a/package/kernel/ath10k-ct/patches/130-ath10k-activate-user-space-firmware-loading-again.patch 
>> b/package/kernel/ath10k-ct/patches/130-ath10k-activate-user-space-firmware-loading-again.patch 
>>
>> deleted file mode 100644
>> index dc02a9d..0000000
>> --- 
>> a/package/kernel/ath10k-ct/patches/130-ath10k-activate-user-space-firmware-loading-again.patch
>> +++ /dev/null
>> @@ -1,36 +0,0 @@
>> -From c0cc00f250e19c717fc9cdbdb7f55aaa569c7498 Mon Sep 17 00:00:00 2001
>> -From: Hauke Mehrtens <hauke@hauke-m.de>
>> -Date: Thu, 24 Aug 2017 23:06:41 +0200
>> -Subject: [PATCH] ath10k: activate user space firmware loading again
>> -
>> -In commit 9f5bcfe93315 ("ath10k: silence firmware file probing
>> -warnings") the firmware loading was changed from request_firmware() to
>> -request_firmware_direct() to silence some warnings in case it fails.
>> -request_firmware_direct() directly searches in the file system only and
>> -does not send a hotplug event to user space in case it could not find
>> -the firmware directly.
>> -In LEDE we use a user space script to extract the calibration data from
>> -the flash memory which gets triggered by the hotplug event. This way 
>> the
>> -firmware gets extracted from some vendor specific partition when the
>> -driver requests this firmware. This mechanism does not work any more
>> -after this change.
>> -
>> -Fixes: 9f5bcfe93315 ("ath10k: silence firmware file probing warnings")
>> -Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
>> -Cc: Michal Kazior <michal.kazior@tieto.com>
>> -Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
>> ----
>> - ath10k-4.13/core.c | 2 +-
>> - 1 file changed, 1 insertion(+), 1 deletion(-)
>> -
>> ---- a/ath10k-4.13/core.c
>> -+++ b/ath10k-4.13/core.c
>> -@@ -556,7 +556,7 @@ static const struct firmware *ath10k_fet
>> -         dir = ".";
>> -
>> -     snprintf(filename, sizeof(filename), "%s/%s", dir, file);
>> --    ret = request_firmware_direct(&fw, filename, ar->dev);
>> -+    ret = request_firmware(&fw, filename, ar->dev);
>> -     ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot fw request '%s': %d\n",
>> -            filename, ret);
>> -
>>
>
>
Ben Greear Feb. 13, 2018, 8:43 p.m. | #6
On 02/13/2018 12:03 PM, John Crispin wrote:
>
>
> On 13/02/18 19:27, Ben Greear wrote:
>> What is the status on this?
>>
>> I have some new firmware/driver changes I'd like to get upstream
>> as well, but this series is stuck in limbo.  The first two patches
>> should should be useful for anyone using my ath10k-ct stuff, and the
>> third will at least help IPQ4019 have a better chance at running my
>> code, even if they cannot currently select the options w/out applying
>> a few patches to relax some of the REQUIRES stuff that the 4019
>> platforms may currently have.
>>
>> Thanks,
>> Ben
>
> Hi Ben,
>
> was going to send an email, ... what happened to patch 3/3 ?

Well, it was sent to the list, if that is what you mean?

There was also some disagreement about it, and some platforms
cannot select the IPQ4019 firmware it provides because of package dependencies.  I do not know
what is a good way to resolve it, and the quick fix of just removing
the hard dependency was not welcomed.  I'd prefer the patch applied,
as then users have to do only a small and simple tweak to make the firmware
usable, and it should not hurt anyone else since they can just stick with
the stock firmware.

If the 3/3 patch is just not wanted, then users that want my firmware can
manually download it to their system.  The first two patches could
still be applied.

Thanks,
Ben

>
>     John
>>
>> On 01/19/2018 04:27 PM, greearb@candelatech.com wrote:
>>> From: Ben Greear <greearb@candelatech.com>
>>>
>>> The driver updates include:
>>>
>>> ath10k driver backport to fix WPA 'pn' related security bugs
>>> (4.13 based driver only currently),
>>> a fix for off-channel TX for CT wave-1 firmware, a likely
>>> fix for napi related crashes, and a backport of the firmware fetch
>>> patch.
>>>
>>> AHB is needed for the IPQ4019 platform radios.
>>>
>>> Signed-off-by: Ben Greear <greearb@candelatech.com>
>>> ---
>>>
>>> v2:  Don't remove stock 4019 firmware from 4019 platform depends.
>>>      Add ability to load ct-firmware-[52].bin before other firmware.
>>>      Add ath10k-ct driver specific firmware option for 4019.
>>>
>>>      Verified driver loads on Jalapeno board.
>>>
>>> package/kernel/ath10k-ct/Makefile                  | 14 +++++----
>>>  ...ctivate-user-space-firmware-loading-again.patch | 36 ----------------------
>>>  2 files changed, 8 insertions(+), 42 deletions(-)
>>>  delete mode 100644 package/kernel/ath10k-ct/patches/130-ath10k-activate-user-space-firmware-loading-again.patch
>>>
>>> diff --git a/package/kernel/ath10k-ct/Makefile b/package/kernel/ath10k-ct/Makefile
>>> index fe094e7..83d3a05 100644
>>> --- a/package/kernel/ath10k-ct/Makefile
>>> +++ b/package/kernel/ath10k-ct/Makefile
>>> @@ -9,8 +9,8 @@ PKG_LICENSE_FILES:=
>>>  PKG_SOURCE_URL:=https://github.com/greearb/ath10k-ct.git
>>>  PKG_SOURCE_PROTO:=git
>>>  PKG_SOURCE_DATE:=2017-06-13
>>> -PKG_SOURCE_VERSION:=bded1823912549017d819d1796273b3134c3de20
>>> -PKG_MIRROR_HASH:=616174650e12a82edb6b6bd18ac186e2c6a48fdad0082df9d2011ab20940814b
>>> +PKG_SOURCE_VERSION:=e1edd74d5f0c5291b0be72c81033e74e267929d4
>>> +PKG_MIRROR_HASH:=945dc7110017a80c33cac20d9d2a9beda0a6a98b50178319403568098534e60a
>>>
>>>  PKG_MAINTAINER:=Ben Greear <greearb@candelatech.com>
>>>  PKG_BUILD_PARALLEL:=1
>>> @@ -29,7 +29,7 @@ include $(INCLUDE_DIR)/package.mk
>>>  define KernelPackage/ath10k-ct
>>>    SUBMENU:=Wireless Drivers
>>>    TITLE:=ath10k-ct driver optimized for CT ath10k firmware
>>> -  DEPENDS:=+kmod-mac80211 +kmod-ath +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT @PCI_SUPPORT +kmod-hwmon-core
>>> +  DEPENDS:=+kmod-mac80211 +kmod-ath +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT +@DRIVER_11W_SUPPORT +kmod-hwmon-core
>>>    FILES:=\
>>>      $(PKG_BUILD_DIR)/ath10k$(CT_KVER)/ath10k_pci.ko \
>>>      $(PKG_BUILD_DIR)/ath10k$(CT_KVER)/ath10k_core.ko
>>> @@ -50,9 +50,11 @@ ifdef CONFIG_PACKAGE_MAC80211_MESH
>>>  endif
>>>
>>>  CT_MAKEDEFS += CONFIG_ATH10K=m CONFIG_ATH10K_PCI=m
>>> -# No AHB support enabled yet.  Could conditionally enable it later.
>>> -#CT_MAKEDEFS += CONFIG_ATH10K_AHB=y
>>> -#NOSTDINC_FLAGS += -DCONFIG_ATH10K_AHB
>>> +
>>> +# This AHB logic is needed for IPQ4019 radios
>>> +CT_MAKEDEFS += CONFIG_ATH10K_AHB=m
>>> +NOSTDINC_FLAGS += -DCONFIG_ATH10K_AHB
>>> +
>>>  NOSTDINC_FLAGS += -DSTANDALONE_CT
>>>
>>>  ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS
>>> diff --git a/package/kernel/ath10k-ct/patches/130-ath10k-activate-user-space-firmware-loading-again.patch
>>> b/package/kernel/ath10k-ct/patches/130-ath10k-activate-user-space-firmware-loading-again.patch
>>> deleted file mode 100644
>>> index dc02a9d..0000000
>>> --- a/package/kernel/ath10k-ct/patches/130-ath10k-activate-user-space-firmware-loading-again.patch
>>> +++ /dev/null
>>> @@ -1,36 +0,0 @@
>>> -From c0cc00f250e19c717fc9cdbdb7f55aaa569c7498 Mon Sep 17 00:00:00 2001
>>> -From: Hauke Mehrtens <hauke@hauke-m.de>
>>> -Date: Thu, 24 Aug 2017 23:06:41 +0200
>>> -Subject: [PATCH] ath10k: activate user space firmware loading again
>>> -
>>> -In commit 9f5bcfe93315 ("ath10k: silence firmware file probing
>>> -warnings") the firmware loading was changed from request_firmware() to
>>> -request_firmware_direct() to silence some warnings in case it fails.
>>> -request_firmware_direct() directly searches in the file system only and
>>> -does not send a hotplug event to user space in case it could not find
>>> -the firmware directly.
>>> -In LEDE we use a user space script to extract the calibration data from
>>> -the flash memory which gets triggered by the hotplug event. This way the
>>> -firmware gets extracted from some vendor specific partition when the
>>> -driver requests this firmware. This mechanism does not work any more
>>> -after this change.
>>> -
>>> -Fixes: 9f5bcfe93315 ("ath10k: silence firmware file probing warnings")
>>> -Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
>>> -Cc: Michal Kazior <michal.kazior@tieto.com>
>>> -Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
>>> ----
>>> - ath10k-4.13/core.c | 2 +-
>>> - 1 file changed, 1 insertion(+), 1 deletion(-)
>>> -
>>> ---- a/ath10k-4.13/core.c
>>> -+++ b/ath10k-4.13/core.c
>>> -@@ -556,7 +556,7 @@ static const struct firmware *ath10k_fet
>>> -         dir = ".";
>>> -
>>> -     snprintf(filename, sizeof(filename), "%s/%s", dir, file);
>>> --    ret = request_firmware_direct(&fw, filename, ar->dev);
>>> -+    ret = request_firmware(&fw, filename, ar->dev);
>>> -     ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot fw request '%s': %d\n",
>>> -            filename, ret);
>>> -
>>>
>>
>>
>
Jo-Philipp Wich March 22, 2018, 7:55 a.m. | #7
Merged into my staging tree.
Thank you!

Patch

diff --git a/package/kernel/ath10k-ct/Makefile b/package/kernel/ath10k-ct/Makefile
index fe094e7..83d3a05 100644
--- a/package/kernel/ath10k-ct/Makefile
+++ b/package/kernel/ath10k-ct/Makefile
@@ -9,8 +9,8 @@  PKG_LICENSE_FILES:=
 PKG_SOURCE_URL:=https://github.com/greearb/ath10k-ct.git
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_DATE:=2017-06-13
-PKG_SOURCE_VERSION:=bded1823912549017d819d1796273b3134c3de20
-PKG_MIRROR_HASH:=616174650e12a82edb6b6bd18ac186e2c6a48fdad0082df9d2011ab20940814b
+PKG_SOURCE_VERSION:=e1edd74d5f0c5291b0be72c81033e74e267929d4
+PKG_MIRROR_HASH:=945dc7110017a80c33cac20d9d2a9beda0a6a98b50178319403568098534e60a
 
 PKG_MAINTAINER:=Ben Greear <greearb@candelatech.com>
 PKG_BUILD_PARALLEL:=1
@@ -29,7 +29,7 @@  include $(INCLUDE_DIR)/package.mk
 define KernelPackage/ath10k-ct
   SUBMENU:=Wireless Drivers
   TITLE:=ath10k-ct driver optimized for CT ath10k firmware
-  DEPENDS:=+kmod-mac80211 +kmod-ath +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT @PCI_SUPPORT +kmod-hwmon-core
+  DEPENDS:=+kmod-mac80211 +kmod-ath +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT +@DRIVER_11W_SUPPORT +kmod-hwmon-core
   FILES:=\
 	$(PKG_BUILD_DIR)/ath10k$(CT_KVER)/ath10k_pci.ko \
 	$(PKG_BUILD_DIR)/ath10k$(CT_KVER)/ath10k_core.ko
@@ -50,9 +50,11 @@  ifdef CONFIG_PACKAGE_MAC80211_MESH
 endif
 
 CT_MAKEDEFS += CONFIG_ATH10K=m CONFIG_ATH10K_PCI=m
-# No AHB support enabled yet.  Could conditionally enable it later.
-#CT_MAKEDEFS += CONFIG_ATH10K_AHB=y
-#NOSTDINC_FLAGS += -DCONFIG_ATH10K_AHB
+
+# This AHB logic is needed for IPQ4019 radios
+CT_MAKEDEFS += CONFIG_ATH10K_AHB=m
+NOSTDINC_FLAGS += -DCONFIG_ATH10K_AHB
+
 NOSTDINC_FLAGS += -DSTANDALONE_CT
 
 ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS
diff --git a/package/kernel/ath10k-ct/patches/130-ath10k-activate-user-space-firmware-loading-again.patch b/package/kernel/ath10k-ct/patches/130-ath10k-activate-user-space-firmware-loading-again.patch
deleted file mode 100644
index dc02a9d..0000000
--- a/package/kernel/ath10k-ct/patches/130-ath10k-activate-user-space-firmware-loading-again.patch
+++ /dev/null
@@ -1,36 +0,0 @@ 
-From c0cc00f250e19c717fc9cdbdb7f55aaa569c7498 Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens <hauke@hauke-m.de>
-Date: Thu, 24 Aug 2017 23:06:41 +0200
-Subject: [PATCH] ath10k: activate user space firmware loading again
-
-In commit 9f5bcfe93315 ("ath10k: silence firmware file probing
-warnings") the firmware loading was changed from request_firmware() to
-request_firmware_direct() to silence some warnings in case it fails.
-request_firmware_direct() directly searches in the file system only and
-does not send a hotplug event to user space in case it could not find
-the firmware directly.
-In LEDE we use a user space script to extract the calibration data from
-the flash memory which gets triggered by the hotplug event. This way the
-firmware gets extracted from some vendor specific partition when the
-driver requests this firmware. This mechanism does not work any more
-after this change.
-
-Fixes: 9f5bcfe93315 ("ath10k: silence firmware file probing warnings")
-Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-Cc: Michal Kazior <michal.kazior@tieto.com>
-Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
----
- ath10k-4.13/core.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/ath10k-4.13/core.c
-+++ b/ath10k-4.13/core.c
-@@ -556,7 +556,7 @@ static const struct firmware *ath10k_fet
- 		dir = ".";
- 
- 	snprintf(filename, sizeof(filename), "%s/%s", dir, file);
--	ret = request_firmware_direct(&fw, filename, ar->dev);
-+	ret = request_firmware(&fw, filename, ar->dev);
- 	ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot fw request '%s': %d\n",
- 		   filename, ret);
-