ath10k-ct: update to version 6.14
authorShiji Yang <[email protected]>
Fri, 28 Mar 2025 16:00:50 +0000 (00:00 +0800)
committerRobert Marko <[email protected]>
Mon, 31 Mar 2025 09:17:41 +0000 (11:17 +0200)
This new version fixes some memory leak and NULL pointer issues.

Upstreamed patches:
[1] 010-api_update.patch
[2] 201-wifi-ath10k-add-LED-and-GPIO-controlling-support-for.patch

The new 003 patch was introduced to fix the build error on old LTS
kernel. The patch 004 was used to fix the issue of IPQ4019 radio
not being able to start.

Tested on QCA9882 and IPQ4019.

[1] https://github.com/torvalds/linux/commit/bca8bc0399ac2efd56e6adbed0307e10125a556c
[2] https://github.com/torvalds/linux/commit/8e1debd82466a3fe711784ab37e6b54e56011267

Signed-off-by: Shiji Yang <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/18368
Signed-off-by: Robert Marko <[email protected]>
13 files changed:
package/kernel/ath10k-ct/Makefile
package/kernel/ath10k-ct/patches/001-patch-version.patch
package/kernel/ath10k-ct/patches/002-ath10k-6.10-remove-unsupported-feature.patch
package/kernel/ath10k-ct/patches/003-ath10k-ct-make-it-compatible-with-the-old-LTS-kernel.patch [new file with mode: 0644]
package/kernel/ath10k-ct/patches/004-Revert-wifi-ath10k-Use-iommu_paging_domain_alloc.patch [new file with mode: 0644]
package/kernel/ath10k-ct/patches/010-api_update.patch [deleted file]
package/kernel/ath10k-ct/patches/130-ath10k-read-qcom-coexist-support-as-a-u32.patch
package/kernel/ath10k-ct/patches/201-wifi-ath10k-add-LED-and-GPIO-controlling-support-for.patch [deleted file]
package/kernel/ath10k-ct/patches/202-ath10k-use-tpt-trigger-by-default.patch
package/kernel/ath10k-ct/patches/300-fix-fortify-checking-error.patch
package/kernel/ath10k-ct/patches/960-0010-ath10k-limit-htt-rx-ring-size.patch
package/kernel/ath10k-ct/patches/960-0011-ath10k-limit-pci-buffer-size.patch
package/kernel/ath10k-ct/patches/988-ath10k-always-use-mac80211-loss-detection.patch

index f9795d8c8d2266d18d5a0e96796a0b7fbcb945c1..dfe160244927b02b742f5b1d42bacdd64209fecc 100644 (file)
@@ -1,21 +1,21 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ath10k-ct
-PKG_RELEASE:=2
+PKG_RELEASE:=1
 
 PKG_LICENSE:=GPLv2
 PKG_LICENSE_FILES:=
 
 PKG_SOURCE_URL:=https://github.com/greearb/ath10k-ct.git
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2024-07-30
-PKG_SOURCE_VERSION:=ac71b14dc93aef0af6f0f24808b0afb673eaa5f5
-PKG_MIRROR_HASH:=f7774fc7002bbea450f543927acd528fb1bb6742f0e9ef28a402df3796893d93
+PKG_SOURCE_DATE:=2025-03-14
+PKG_SOURCE_VERSION:=63f5b605236f2cd2f919539d67236c43fb8f957d
+PKG_MIRROR_HASH:=d83cb59b947680d40006e0da825735c387c5b1699a7981c2d973ca4d285266f2
 
-# Build the 6.10 ath10k-ct driver version.
+# Build the 6.14 ath10k-ct driver version.
 # Probably this should match as closely as
 # possible to whatever mac80211 backports version is being used.
-CT_KVER="-6.10"
+CT_KVER="-6.14"
 
 PKG_MAINTAINER:=Ben Greear <[email protected]>
 PKG_BUILD_PARALLEL:=1
index 4c90a3f316320f52bb4f70fa2bb11f5a023cafc3..9cea32e6399150351527350503346d7c8fc657e3 100644 (file)
@@ -1,11 +1,11 @@
---- a/ath10k-6.10/pci.c
-+++ b/ath10k-6.10/pci.c
+--- a/ath10k-6.14/pci.c
++++ b/ath10k-6.14/pci.c
 @@ -3871,7 +3871,7 @@ static int __ath10k_pci_probe(struct pci
        int (*pci_hard_reset)(struct ath10k *ar);
        u32 (*targ_cpu_to_ce_addr)(struct ath10k *ar, u32 addr);
  
 -      printk(KERN_INFO "ath10k 6.7 driver, optimized for CT firmware, probing pci device: 0x%x.\n",
-+      printk(KERN_INFO "ath10k 6.10 driver, optimized for CT firmware, probing pci device: 0x%x.\n",
++      printk(KERN_INFO "ath10k 6.14 driver, optimized for CT firmware, probing pci device: 0x%x.\n",
               pci_dev->device);
  
        switch (pci_dev->device) {
index ca64c8a110e6aa09c527e1ff6192cad89b9381e4..f7caa526037207570ce5dff0bbc5ccb0618be0d1 100644 (file)
@@ -1,6 +1,6 @@
---- a/ath10k-6.10/mac.c
-+++ b/ath10k-6.10/mac.c
-@@ -11626,7 +11626,6 @@ int ath10k_mac_register(struct ath10k *a
+--- a/ath10k-6.14/mac.c
++++ b/ath10k-6.14/mac.c
+@@ -11648,7 +11648,6 @@ int ath10k_mac_register(struct ath10k *a
        ar->hw->wiphy->n_cipher_suites = ar->hw_params.n_cipher_suites;
  
        wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
diff --git a/package/kernel/ath10k-ct/patches/003-ath10k-ct-make-it-compatible-with-the-old-LTS-kernel.patch b/package/kernel/ath10k-ct/patches/003-ath10k-ct-make-it-compatible-with-the-old-LTS-kernel.patch
new file mode 100644 (file)
index 0000000..632a419
--- /dev/null
@@ -0,0 +1,46 @@
+From: Shiji Yang <[email protected]>
+Date: Fri, 28 Mar 2025 19:56:06 +0800
+Subject: [PATCH] ath10k-ct: make it compatible with the old LTS kernel
+
+Rollback some APIs to fix compilation errors.
+
+Signed-off-by: Shiji Yang <[email protected]>
+---
+ ath10k-6.14/ahb.c | 2 +-
+ ath10k-6.14/mac.c | 5 ++---
+ 2 files changed, 3 insertions(+), 4 deletions(-)
+
+--- a/ath10k-6.14/ahb.c
++++ b/ath10k-6.14/ahb.c
+@@ -842,7 +842,7 @@ static struct platform_driver ath10k_ahb
+               .of_match_table = ath10k_ahb_of_match,
+       },
+       .probe = ath10k_ahb_probe,
+-      .remove = ath10k_ahb_remove,
++      .remove_new = ath10k_ahb_remove,
+ };
+ int ath10k_ahb_init(void)
+--- a/ath10k-6.14/mac.c
++++ b/ath10k-6.14/mac.c
+@@ -9607,10 +9607,9 @@ exit:
+ static void ath10k_sta_rc_update(struct ieee80211_hw *hw,
+                                struct ieee80211_vif *vif,
+-                               struct ieee80211_link_sta *link_sta,
++                               struct ieee80211_sta *sta,
+                                u32 changed)
+ {
+-      struct ieee80211_sta *sta = link_sta->sta;
+       struct ath10k *ar = hw->priv;
+       struct ath10k_sta *arsta = (struct ath10k_sta *)sta->drv_priv;
+       struct ath10k_vif *arvif = (void *)vif->drv_priv;
+@@ -10603,7 +10602,7 @@ static const struct ieee80211_ops ath10k
+       .reconfig_complete              = ath10k_reconfig_complete,
+       .get_survey                     = ath10k_get_survey,
+       .set_bitrate_mask               = ath10k_mac_op_set_bitrate_mask,
+-      .link_sta_rc_update             = ath10k_sta_rc_update,
++      .sta_rc_update                  = ath10k_sta_rc_update,
+       .offset_tsf                     = ath10k_offset_tsf,
+       .get_tsf                        = ath10k_get_tsf,
+       .ampdu_action                   = ath10k_ampdu_action,
diff --git a/package/kernel/ath10k-ct/patches/004-Revert-wifi-ath10k-Use-iommu_paging_domain_alloc.patch b/package/kernel/ath10k-ct/patches/004-Revert-wifi-ath10k-Use-iommu_paging_domain_alloc.patch
new file mode 100644 (file)
index 0000000..f765950
--- /dev/null
@@ -0,0 +1,28 @@
+From: Shiji Yang <[email protected]>
+Date: Fri, 28 Mar 2025 19:56:06 +0800
+Subject: [PATCH] Revert "wifi: ath10k: Use iommu_paging_domain_alloc()"
+
+IPQ4019 wireless can't start after upstream commit d5b7485588df[1].
+
+[1] https://github.com/torvalds/linux/commit/d5b7485588dffb39c5687e965623124ab7ebcd51
+Signed-off-by: Shiji Yang <[email protected]>
+---
+ ath10k-6.14/snoc.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/ath10k-6.14/snoc.c
++++ b/ath10k-6.14/snoc.c
+@@ -1635,10 +1635,10 @@ static int ath10k_fw_init(struct ath10k
+       ar_snoc->fw.dev = &pdev->dev;
+-      iommu_dom = iommu_paging_domain_alloc(ar_snoc->fw.dev);
+-      if (IS_ERR(iommu_dom)) {
++      iommu_dom = iommu_domain_alloc(&platform_bus_type);
++      if (!iommu_dom) {
+               ath10k_err(ar, "failed to allocate iommu domain\n");
+-              ret = PTR_ERR(iommu_dom);
++              ret = -ENOMEM;
+               goto err_unregister;
+       }
diff --git a/package/kernel/ath10k-ct/patches/010-api_update.patch b/package/kernel/ath10k-ct/patches/010-api_update.patch
deleted file mode 100644 (file)
index dff725b..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
---- a/ath10k-6.10/mac.c
-+++ b/ath10k-6.10/mac.c
-@@ -1675,7 +1675,7 @@ static void ath10k_recalc_radar_detectio
-                * by indicating that radar was detected.
-                */
-               ath10k_warn(ar, "failed to start CAC: %d\n", ret);
--              ieee80211_radar_detected(ar->hw);
-+              ieee80211_radar_detected(ar->hw, NULL);
-       }
- }
-@@ -6238,7 +6238,7 @@ err:
-       return ret;
- }
--static void ath10k_stop(struct ieee80211_hw *hw)
-+static void ath10k_stop(struct ieee80211_hw *hw, bool suspend)
- {
-       struct ath10k *ar = hw->priv;
-       u32 opt;
---- a/ath10k-6.10/debug.c
-+++ b/ath10k-6.10/debug.c
-@@ -3319,7 +3319,7 @@ static ssize_t ath10k_write_simulate_rad
-       if (!arvif->is_started)
-               return -EINVAL;
--      ieee80211_radar_detected(ar->hw);
-+      ieee80211_radar_detected(ar->hw, NULL);
-       return count;
- }
---- a/ath10k-6.10/wmi.c
-+++ b/ath10k-6.10/wmi.c
-@@ -4402,7 +4402,7 @@ static void ath10k_radar_detected(struct
-       if (ar->dfs_block_radar_events)
-               ath10k_info(ar, "DFS Radar detected, but ignored as requested\n");
-       else
--              ieee80211_radar_detected(ar->hw);
-+              ieee80211_radar_detected(ar->hw, NULL);
- }
- static void ath10k_radar_confirmation_work(struct work_struct *work)
index 61090a49d0e44f9ddb8c5f2ac105b7a5ff3ac89c..3bc31e0b84d87b06387a8b58b41deb543a1c0d3a 100644 (file)
@@ -39,9 +39,9 @@ that the feature is properly initialized:
 
 Signed-off-by: Vincent Tremblay <[email protected]>
 
---- a/ath10k-6.10/core.c
-+++ b/ath10k-6.10/core.c
-@@ -2871,14 +2871,14 @@ done:
+--- a/ath10k-6.14/core.c
++++ b/ath10k-6.14/core.c
+@@ -2888,14 +2888,14 @@ done:
  static void ath10k_core_fetch_btcoex_dt(struct ath10k *ar)
  {
        struct device_node *node;
diff --git a/package/kernel/ath10k-ct/patches/201-wifi-ath10k-add-LED-and-GPIO-controlling-support-for.patch b/package/kernel/ath10k-ct/patches/201-wifi-ath10k-add-LED-and-GPIO-controlling-support-for.patch
deleted file mode 100644 (file)
index c1137d0..0000000
+++ /dev/null
@@ -1,616 +0,0 @@
-From 8e1debd82466a3fe711784ab37e6b54e56011267 Mon Sep 17 00:00:00 2001
-From: Sebastian Gottschall <[email protected]>
-Date: Mon, 13 May 2024 17:22:25 +0300
-Subject: [PATCH] wifi: ath10k: add LED and GPIO controlling support for
- various chipsets
-
-Adds LED and GPIO Control support for 988x, 9887, 9888, 99x0, 9984
-based chipsets with on chipset connected led's using WMI Firmware API.
-The LED device will get available named as "ath10k-phyX" at sysfs and
-can be controlled with various triggers.
-Adds also debugfs interface for gpio control.
-
-Signed-off-by: Sebastian Gottschall <[email protected]>
-Reviewed-by: Steve deRosier <[email protected]>
-[kvalo: major reorg and cleanup]
-Signed-off-by: Kalle Valo <[email protected]>
-[ansuel: rebase and small cleanup]
-Signed-off-by: Christian Marangi <[email protected]>
-Tested-by: Stefan Lippers-Hollmann <[email protected]>
-Signed-off-by: Kalle Valo <[email protected]>
-Link: https://msgid.link/[email protected]
----
- ath10k-6.10/Kconfig   |  6 ++
- ath10k-6.10/Makefile  |  1 +
- ath10k-6.10/core.c    | 32 ++++++++
- ath10k-6.10/core.h    |  8 ++
- ath10k-6.10/hw.h      |  1 +
- ath10k-6.10/leds.c    | 90 +++++++++++++++++++++++
- ath10k-6.10/leds.h    | 34 +++++++++
- ath10k-6.10/mac.c     |  1 +
- ath10k-6.10/wmi-ops.h | 32 ++++++++
- ath10k-6.10/wmi-tlv.c |  2 +
- ath10k-6.10/wmi.c     | 54 ++++++++++++++
- ath10k-6.10/wmi.h     | 35 +++++++++
- 12 files changed, 296 insertions(+)
- create mode 100644 ath10k-6.10/leds.c
- create mode 100644 ath10k-6.10/leds.h
-
---- a/ath10k-6.10/Kconfig
-+++ b/ath10k-6.10/Kconfig
-@@ -68,6 +68,12 @@ config ATH10K_DEBUGFS
-         If unsure, say Y to make it easier to debug problems.
-+config ATH10K_LEDS
-+      bool
-+      depends on ATH10K
-+      depends on LEDS_CLASS=y || LEDS_CLASS=MAC80211
-+      default y
-+
- config ATH10K_SPECTRAL
-       bool "Atheros ath10k spectral scan support"
-       depends on ATH10K_DEBUGFS
---- a/ath10k-6.10/Makefile
-+++ b/ath10k-6.10/Makefile
-@@ -20,6 +20,7 @@ ath10k_core-$(CONFIG_ATH10K_SPECTRAL) +=
- ath10k_core-$(CONFIG_NL80211_TESTMODE) += testmode.o
- ath10k_core-$(CONFIG_ATH10K_TRACING) += trace.o
- ath10k_core-$(CONFIG_THERMAL) += thermal.o
-+ath10k_core-$(CONFIG_ATH10K_LEDS) += leds.o
- ath10k_core-$(CONFIG_MAC80211_DEBUGFS) += debugfs_sta.o
- ath10k_core-$(CONFIG_PM) += wow.o
- ath10k_core-$(CONFIG_ATH10K_CE) += ce.o
---- a/ath10k-6.10/core.c
-+++ b/ath10k-6.10/core.c
-@@ -29,6 +29,7 @@
- #include "testmode.h"
- #include "wmi-ops.h"
- #include "coredump.h"
-+#include "leds.h"
- /* Disable ath10k-ct DBGLOG output by default */
- unsigned int ath10k_debug_mask = ATH10K_DBG_NO_DBGLOG;
-@@ -81,6 +82,7 @@ static const struct ath10k_hw_params ath
-               .name = "qca988x hw2.0",
-               .patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR,
-               .uart_pin = 7,
-+              .led_pin = 1,
-               .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
-               .otp_exe_param = 0,
-               .channel_counters_freq_hz = 88000,
-@@ -121,6 +123,7 @@ static const struct ath10k_hw_params ath
-               .name = "qca988x hw2.0 ubiquiti",
-               .patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR,
-               .uart_pin = 7,
-+              .led_pin = 0,
-               .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
-               .otp_exe_param = 0,
-               .channel_counters_freq_hz = 88000,
-@@ -162,6 +165,7 @@ static const struct ath10k_hw_params ath
-               .name = "qca9887 hw1.0",
-               .patch_load_addr = QCA9887_HW_1_0_PATCH_LOAD_ADDR,
-               .uart_pin = 7,
-+              .led_pin = 1,
-               .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
-               .otp_exe_param = 0,
-               .channel_counters_freq_hz = 88000,
-@@ -203,6 +207,7 @@ static const struct ath10k_hw_params ath
-               .name = "qca6174 hw3.2 sdio",
-               .patch_load_addr = QCA6174_HW_3_0_PATCH_LOAD_ADDR,
-               .uart_pin = 19,
-+              .led_pin = 0,
-               .otp_exe_param = 0,
-               .channel_counters_freq_hz = 88000,
-               .max_probe_resp_desc_thres = 0,
-@@ -239,6 +244,7 @@ static const struct ath10k_hw_params ath
-               .name = "qca6164 hw2.1",
-               .patch_load_addr = QCA6174_HW_2_1_PATCH_LOAD_ADDR,
-               .uart_pin = 6,
-+              .led_pin = 0,
-               .otp_exe_param = 0,
-               .channel_counters_freq_hz = 88000,
-               .max_probe_resp_desc_thres = 0,
-@@ -279,6 +285,7 @@ static const struct ath10k_hw_params ath
-               .name = "qca6174 hw2.1",
-               .patch_load_addr = QCA6174_HW_2_1_PATCH_LOAD_ADDR,
-               .uart_pin = 6,
-+              .led_pin = 0,
-               .otp_exe_param = 0,
-               .channel_counters_freq_hz = 88000,
-               .max_probe_resp_desc_thres = 0,
-@@ -319,6 +326,7 @@ static const struct ath10k_hw_params ath
-               .name = "qca6174 hw3.0",
-               .patch_load_addr = QCA6174_HW_3_0_PATCH_LOAD_ADDR,
-               .uart_pin = 6,
-+              .led_pin = 0,
-               .otp_exe_param = 0,
-               .channel_counters_freq_hz = 88000,
-               .max_probe_resp_desc_thres = 0,
-@@ -359,6 +367,7 @@ static const struct ath10k_hw_params ath
-               .name = "qca6174 hw3.2",
-               .patch_load_addr = QCA6174_HW_3_0_PATCH_LOAD_ADDR,
-               .uart_pin = 6,
-+              .led_pin = 0,
-               .otp_exe_param = 0,
-               .channel_counters_freq_hz = 88000,
-               .max_probe_resp_desc_thres = 0,
-@@ -403,6 +412,7 @@ static const struct ath10k_hw_params ath
-               .name = "qca99x0 hw2.0",
-               .patch_load_addr = QCA99X0_HW_2_0_PATCH_LOAD_ADDR,
-               .uart_pin = 7,
-+              .led_pin = 17,
-               .otp_exe_param = 0x00000700,
-               .continuous_frag_desc = true,
-               .cck_rate_map_rev2 = true,
-@@ -449,6 +459,7 @@ static const struct ath10k_hw_params ath
-               .name = "qca9984/qca9994 hw1.0",
-               .patch_load_addr = QCA9984_HW_1_0_PATCH_LOAD_ADDR,
-               .uart_pin = 7,
-+              .led_pin = 17,
-               .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
-               .otp_exe_param = 0x00000700,
-               .continuous_frag_desc = true,
-@@ -501,6 +512,7 @@ static const struct ath10k_hw_params ath
-               .name = "qca9888 hw2.0",
-               .patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR,
-               .uart_pin = 7,
-+              .led_pin = 17,
-               .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
-               .otp_exe_param = 0x00000700,
-               .continuous_frag_desc = true,
-@@ -551,6 +563,7 @@ static const struct ath10k_hw_params ath
-               .name = "qca9377 hw1.0",
-               .patch_load_addr = QCA9377_HW_1_0_PATCH_LOAD_ADDR,
-               .uart_pin = 6,
-+              .led_pin = 0,
-               .otp_exe_param = 0,
-               .channel_counters_freq_hz = 88000,
-               .max_probe_resp_desc_thres = 0,
-@@ -591,6 +604,7 @@ static const struct ath10k_hw_params ath
-               .name = "qca9377 hw1.1",
-               .patch_load_addr = QCA9377_HW_1_0_PATCH_LOAD_ADDR,
-               .uart_pin = 6,
-+              .led_pin = 0,
-               .otp_exe_param = 0,
-               .channel_counters_freq_hz = 88000,
-               .max_probe_resp_desc_thres = 0,
-@@ -633,6 +647,7 @@ static const struct ath10k_hw_params ath
-               .name = "qca9377 hw1.1 sdio",
-               .patch_load_addr = QCA9377_HW_1_0_PATCH_LOAD_ADDR,
-               .uart_pin = 19,
-+              .led_pin = 0,
-               .otp_exe_param = 0,
-               .channel_counters_freq_hz = 88000,
-               .max_probe_resp_desc_thres = 0,
-@@ -666,6 +681,7 @@ static const struct ath10k_hw_params ath
-               .name = "qca4019 hw1.0",
-               .patch_load_addr = QCA4019_HW_1_0_PATCH_LOAD_ADDR,
-               .uart_pin = 7,
-+              .led_pin = 0,
-               .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
-               .otp_exe_param = 0x0010000,
-               .continuous_frag_desc = true,
-@@ -711,6 +727,7 @@ static const struct ath10k_hw_params ath
-               .dev_id = 0,
-               .bus = ATH10K_BUS_SNOC,
-               .name = "wcn3990 hw1.0",
-+              .led_pin = 0,
-               .continuous_frag_desc = true,
-               .tx_chain_mask = 0x7,
-               .rx_chain_mask = 0x7,
-@@ -4073,6 +4090,10 @@ int ath10k_core_start(struct ath10k *ar,
-                       ath10k_wmi_check_apply_board_power_ctl_table(ar);
-       }
-+      status = ath10k_leds_start(ar);
-+      if (status)
-+              goto err_hif_stop;
-+
-       return 0;
- err_hif_stop:
-@@ -4334,9 +4355,18 @@ static void ath10k_core_register_work(st
-               goto err_spectral_destroy;
-       }
-+      status = ath10k_leds_register(ar);
-+      if (status) {
-+              ath10k_err(ar, "could not register leds: %d\n",
-+                         status);
-+              goto err_thermal_unregister;
-+      }
-+
-       set_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags);
-       return;
-+err_thermal_unregister:
-+      ath10k_thermal_unregister(ar);
- err_spectral_destroy:
-       ath10k_spectral_destroy(ar);
- err_debug_destroy:
-@@ -4396,6 +4426,8 @@ void ath10k_core_unregister(struct ath10
-       if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags))
-               return;
-+      ath10k_leds_unregister(ar);
-+
-       ath10k_thermal_unregister(ar);
-       /* Stop spectral before unregistering from mac80211 to remove the
-        * relayfs debugfs file cleanly. Otherwise the parent debugfs tree
---- a/ath10k-6.10/core.h
-+++ b/ath10k-6.10/core.h
-@@ -15,6 +15,7 @@
- #include <linux/pci.h>
- #include <linux/uuid.h>
- #include <linux/time.h>
-+#include <linux/leds.h>
- #include "htt.h"
- #include "htc.h"
-@@ -1592,6 +1593,13 @@ struct ath10k {
-       } testmode;
-       struct {
-+              struct gpio_led wifi_led;
-+              struct led_classdev cdev;
-+              char label[48];
-+              u32 gpio_state_pin;
-+      } leds;
-+
-+      struct {
-               /* protected by data_lock */
-               u32 rx_crc_err_drop;
-               u32 fw_crash_counter;
---- a/ath10k-6.10/hw.h
-+++ b/ath10k-6.10/hw.h
-@@ -516,6 +516,7 @@ struct ath10k_hw_params {
-       const char *name;
-       u32 patch_load_addr;
-       int uart_pin;
-+      int led_pin;
-       u32 otp_exe_param;
-       /* Type of hw cycle counter wraparound logic, for more info
---- /dev/null
-+++ b/ath10k-6.10/leds.c
-@@ -0,0 +1,90 @@
-+// SPDX-License-Identifier: ISC
-+/*
-+ * Copyright (c) 2005-2011 Atheros Communications Inc.
-+ * Copyright (c) 2011-2017 Qualcomm Atheros, Inc.
-+ * Copyright (c) 2018 Sebastian Gottschall <[email protected]>
-+ * Copyright (c) 2018 The Linux Foundation. All rights reserved.
-+ */
-+
-+#include <linux/leds.h>
-+
-+#include "core.h"
-+#include "wmi.h"
-+#include "wmi-ops.h"
-+
-+#include "leds.h"
-+
-+static int ath10k_leds_set_brightness_blocking(struct led_classdev *led_cdev,
-+                                             enum led_brightness brightness)
-+{
-+      struct ath10k *ar = container_of(led_cdev, struct ath10k,
-+                                       leds.cdev);
-+      struct gpio_led *led = &ar->leds.wifi_led;
-+
-+      mutex_lock(&ar->conf_mutex);
-+
-+      if (ar->state != ATH10K_STATE_ON)
-+              goto out;
-+
-+      ar->leds.gpio_state_pin = (brightness != LED_OFF) ^ led->active_low;
-+      ath10k_wmi_gpio_output(ar, led->gpio, ar->leds.gpio_state_pin);
-+
-+out:
-+      mutex_unlock(&ar->conf_mutex);
-+
-+      return 0;
-+}
-+
-+int ath10k_leds_start(struct ath10k *ar)
-+{
-+      if (ar->hw_params.led_pin == 0)
-+              /* leds not supported */
-+              return 0;
-+
-+      /* under some circumstances, the gpio pin gets reconfigured
-+       * to default state by the firmware, so we need to
-+       * reconfigure it this behaviour has only ben seen on
-+       * QCA9984 and QCA99XX devices so far
-+       */
-+      ath10k_wmi_gpio_config(ar, ar->hw_params.led_pin, 0,
-+                             WMI_GPIO_PULL_NONE, WMI_GPIO_INTTYPE_DISABLE);
-+      ath10k_wmi_gpio_output(ar, ar->hw_params.led_pin, 1);
-+
-+      return 0;
-+}
-+
-+int ath10k_leds_register(struct ath10k *ar)
-+{
-+      int ret;
-+
-+      if (ar->hw_params.led_pin == 0)
-+              /* leds not supported */
-+              return 0;
-+
-+      snprintf(ar->leds.label, sizeof(ar->leds.label), "ath10k-%s",
-+               wiphy_name(ar->hw->wiphy));
-+      ar->leds.wifi_led.active_low = 1;
-+      ar->leds.wifi_led.gpio = ar->hw_params.led_pin;
-+      ar->leds.wifi_led.name = ar->leds.label;
-+      ar->leds.wifi_led.default_state = LEDS_GPIO_DEFSTATE_KEEP;
-+
-+      ar->leds.cdev.name = ar->leds.label;
-+      ar->leds.cdev.brightness_set_blocking = ath10k_leds_set_brightness_blocking;
-+      ar->leds.cdev.default_trigger = ar->leds.wifi_led.default_trigger;
-+
-+      ret = led_classdev_register(wiphy_dev(ar->hw->wiphy), &ar->leds.cdev);
-+      if (ret)
-+              return ret;
-+
-+      return 0;
-+}
-+
-+void ath10k_leds_unregister(struct ath10k *ar)
-+{
-+      if (ar->hw_params.led_pin == 0)
-+              /* leds not supported */
-+              return;
-+
-+      led_classdev_unregister(&ar->leds.cdev);
-+}
-+
---- /dev/null
-+++ b/ath10k-6.10/leds.h
-@@ -0,0 +1,34 @@
-+/* SPDX-License-Identifier: ISC */
-+/*
-+ * Copyright (c) 2005-2011 Atheros Communications Inc.
-+ * Copyright (c) 2011-2017 Qualcomm Atheros, Inc.
-+ * Copyright (c) 2018 Sebastian Gottschall <[email protected]>
-+ * Copyright (c) 2018 The Linux Foundation. All rights reserved.
-+ */
-+
-+#ifndef _LEDS_H_
-+#define _LEDS_H_
-+
-+#include "core.h"
-+
-+#ifdef CONFIG_ATH10K_LEDS
-+void ath10k_leds_unregister(struct ath10k *ar);
-+int ath10k_leds_start(struct ath10k *ar);
-+int ath10k_leds_register(struct ath10k *ar);
-+#else
-+static inline void ath10k_leds_unregister(struct ath10k *ar)
-+{
-+}
-+
-+static inline int ath10k_leds_start(struct ath10k *ar)
-+{
-+      return 0;
-+}
-+
-+static inline int ath10k_leds_register(struct ath10k *ar)
-+{
-+      return 0;
-+}
-+
-+#endif
-+#endif /* _LEDS_H_ */
---- a/ath10k-6.10/mac.c
-+++ b/ath10k-6.10/mac.c
-@@ -26,6 +26,7 @@
- #include "wmi-tlv.h"
- #include "wmi-ops.h"
- #include "wow.h"
-+#include "leds.h"
- /*********/
- /* Rates */
---- a/ath10k-6.10/wmi-ops.h
-+++ b/ath10k-6.10/wmi-ops.h
-@@ -228,7 +228,10 @@ struct wmi_ops {
-                        const struct wmi_bb_timing_cfg_arg *arg);
-       struct sk_buff *(*gen_per_peer_per_tid_cfg)(struct ath10k *ar,
-                                                   const struct wmi_per_peer_per_tid_cfg_arg *arg);
-+      struct sk_buff *(*gen_gpio_config)(struct ath10k *ar, u32 gpio_num,
-+                                         u32 input, u32 pull_type, u32 intr_mode);
-+      struct sk_buff *(*gen_gpio_output)(struct ath10k *ar, u32 gpio_num, u32 set);
- };
- int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id);
-@@ -1147,6 +1150,35 @@ ath10k_wmi_force_fw_hang(struct ath10k *
-       return ath10k_wmi_cmd_send(ar, skb, ar->wmi.cmd->force_fw_hang_cmdid);
- }
-+static inline int ath10k_wmi_gpio_config(struct ath10k *ar, u32 gpio_num,
-+                                       u32 input, u32 pull_type, u32 intr_mode)
-+{
-+      struct sk_buff *skb;
-+
-+      if (!ar->wmi.ops->gen_gpio_config)
-+              return -EOPNOTSUPP;
-+
-+      skb = ar->wmi.ops->gen_gpio_config(ar, gpio_num, input, pull_type, intr_mode);
-+      if (IS_ERR(skb))
-+              return PTR_ERR(skb);
-+
-+      return ath10k_wmi_cmd_send(ar, skb, ar->wmi.cmd->gpio_config_cmdid);
-+}
-+
-+static inline int ath10k_wmi_gpio_output(struct ath10k *ar, u32 gpio_num, u32 set)
-+{
-+      struct sk_buff *skb;
-+
-+      if (!ar->wmi.ops->gen_gpio_config)
-+              return -EOPNOTSUPP;
-+
-+      skb = ar->wmi.ops->gen_gpio_output(ar, gpio_num, set);
-+      if (IS_ERR(skb))
-+              return PTR_ERR(skb);
-+
-+      return ath10k_wmi_cmd_send(ar, skb, ar->wmi.cmd->gpio_output_cmdid);
-+}
-+
- static inline int
- ath10k_wmi_dbglog_cfg(struct ath10k *ar, u64 module_enable, u32 log_level)
- {
---- a/ath10k-6.10/wmi-tlv.c
-+++ b/ath10k-6.10/wmi-tlv.c
-@@ -4606,6 +4606,8 @@ static const struct wmi_ops wmi_tlv_ops
-       .gen_echo = ath10k_wmi_tlv_op_gen_echo,
-       .gen_vdev_spectral_conf = ath10k_wmi_tlv_op_gen_vdev_spectral_conf,
-       .gen_vdev_spectral_enable = ath10k_wmi_tlv_op_gen_vdev_spectral_enable,
-+      /* .gen_gpio_config not implemented */
-+      /* .gen_gpio_output not implemented */
- };
- static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = {
---- a/ath10k-6.10/wmi.c
-+++ b/ath10k-6.10/wmi.c
-@@ -8467,6 +8467,49 @@ ath10k_wmi_op_gen_peer_set_param(struct
-       return skb;
- }
-+static struct sk_buff *ath10k_wmi_op_gen_gpio_config(struct ath10k *ar,
-+                                                   u32 gpio_num, u32 input,
-+                                                   u32 pull_type, u32 intr_mode)
-+{
-+      struct wmi_gpio_config_cmd *cmd;
-+      struct sk_buff *skb;
-+
-+      skb = ath10k_wmi_alloc_skb(ar, sizeof(*cmd));
-+      if (!skb)
-+              return ERR_PTR(-ENOMEM);
-+
-+      cmd = (struct wmi_gpio_config_cmd *)skb->data;
-+      cmd->pull_type = __cpu_to_le32(pull_type);
-+      cmd->gpio_num = __cpu_to_le32(gpio_num);
-+      cmd->input = __cpu_to_le32(input);
-+      cmd->intr_mode = __cpu_to_le32(intr_mode);
-+
-+      ath10k_dbg(ar, ATH10K_DBG_WMI, "wmi gpio_config gpio_num 0x%08x input 0x%08x pull_type 0x%08x intr_mode 0x%08x\n",
-+                 gpio_num, input, pull_type, intr_mode);
-+
-+      return skb;
-+}
-+
-+static struct sk_buff *ath10k_wmi_op_gen_gpio_output(struct ath10k *ar,
-+                                                   u32 gpio_num, u32 set)
-+{
-+      struct wmi_gpio_output_cmd *cmd;
-+      struct sk_buff *skb;
-+
-+      skb = ath10k_wmi_alloc_skb(ar, sizeof(*cmd));
-+      if (!skb)
-+              return ERR_PTR(-ENOMEM);
-+
-+      cmd = (struct wmi_gpio_output_cmd *)skb->data;
-+      cmd->gpio_num = __cpu_to_le32(gpio_num);
-+      cmd->set = __cpu_to_le32(set);
-+
-+      ath10k_dbg(ar, ATH10K_DBG_WMI, "wmi gpio_output gpio_num 0x%08x set 0x%08x\n",
-+                 gpio_num, set);
-+
-+      return skb;
-+}
-+
- static struct sk_buff *
- ath10k_wmi_op_gen_set_psmode(struct ath10k *ar, u32 vdev_id,
-                            enum wmi_sta_ps_mode psmode)
-@@ -10274,6 +10317,9 @@ static const struct wmi_ops wmi_ops = {
-       .fw_stats_fill = ath10k_wmi_main_op_fw_stats_fill,
-       .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
-       .gen_echo = ath10k_wmi_op_gen_echo,
-+      .gen_gpio_config = ath10k_wmi_op_gen_gpio_config,
-+      .gen_gpio_output = ath10k_wmi_op_gen_gpio_output,
-+
-       /* .gen_bcn_tmpl not implemented */
-       /* .gen_prb_tmpl not implemented */
-       /* .gen_p2p_go_bcn_ie not implemented */
-@@ -10344,6 +10390,8 @@ static const struct wmi_ops wmi_10_1_ops
-       .fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill,
-       .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
-       .gen_echo = ath10k_wmi_op_gen_echo,
-+      .gen_gpio_config = ath10k_wmi_op_gen_gpio_config,
-+      .gen_gpio_output = ath10k_wmi_op_gen_gpio_output,
-       /* .gen_bcn_tmpl not implemented */
-       /* .gen_prb_tmpl not implemented */
-       /* .gen_p2p_go_bcn_ie not implemented */
-@@ -10423,6 +10471,8 @@ static const struct wmi_ops wmi_10_2_ops
-       .gen_delba_send = ath10k_wmi_op_gen_delba_send,
-       .fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill,
-       .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
-+      .gen_gpio_config = ath10k_wmi_op_gen_gpio_config,
-+      .gen_gpio_output = ath10k_wmi_op_gen_gpio_output,
-       /* .gen_pdev_enable_adaptive_cca not implemented */
- };
-@@ -10494,6 +10544,8 @@ static const struct wmi_ops wmi_10_2_4_o
-               ath10k_wmi_op_gen_pdev_enable_adaptive_cca,
-       .get_vdev_subtype = ath10k_wmi_10_2_4_op_get_vdev_subtype,
-       .gen_bb_timing = ath10k_wmi_10_2_4_op_gen_bb_timing,
-+      .gen_gpio_config = ath10k_wmi_op_gen_gpio_config,
-+      .gen_gpio_output = ath10k_wmi_op_gen_gpio_output,
-       /* .gen_bcn_tmpl not implemented */
-       /* .gen_prb_tmpl not implemented */
-       /* .gen_p2p_go_bcn_ie not implemented */
-@@ -10576,6 +10628,8 @@ static const struct wmi_ops wmi_10_4_ops
-       .gen_pdev_bss_chan_info_req = ath10k_wmi_10_2_op_gen_pdev_bss_chan_info,
-       .gen_echo = ath10k_wmi_op_gen_echo,
-       .gen_pdev_get_tpc_config = ath10k_wmi_10_2_4_op_gen_pdev_get_tpc_config,
-+      .gen_gpio_config = ath10k_wmi_op_gen_gpio_config,
-+      .gen_gpio_output = ath10k_wmi_op_gen_gpio_output,
- };
- int ath10k_wmi_attach(struct ath10k *ar)
---- a/ath10k-6.10/wmi.h
-+++ b/ath10k-6.10/wmi.h
-@@ -3137,6 +3137,41 @@ enum wmi_10_4_feature_mask {
- };
-+/* WMI_GPIO_CONFIG_CMDID */
-+enum {
-+      WMI_GPIO_PULL_NONE,
-+      WMI_GPIO_PULL_UP,
-+      WMI_GPIO_PULL_DOWN,
-+};
-+
-+enum {
-+      WMI_GPIO_INTTYPE_DISABLE,
-+      WMI_GPIO_INTTYPE_RISING_EDGE,
-+      WMI_GPIO_INTTYPE_FALLING_EDGE,
-+      WMI_GPIO_INTTYPE_BOTH_EDGE,
-+      WMI_GPIO_INTTYPE_LEVEL_LOW,
-+      WMI_GPIO_INTTYPE_LEVEL_HIGH
-+};
-+
-+/* WMI_GPIO_CONFIG_CMDID */
-+struct wmi_gpio_config_cmd {
-+      __le32 gpio_num;             /* GPIO number to be setup */
-+      __le32 input;                /* 0 - Output/ 1 - Input */
-+      __le32 pull_type;            /* Pull type defined above */
-+      __le32 intr_mode;            /* Interrupt mode defined above (Input) */
-+} __packed;
-+
-+/* WMI_GPIO_OUTPUT_CMDID */
-+struct wmi_gpio_output_cmd {
-+      __le32 gpio_num;    /* GPIO number to be setup */
-+      __le32 set;         /* Set the GPIO pin*/
-+} __packed;
-+
-+/* WMI_GPIO_INPUT_EVENTID */
-+struct wmi_gpio_input_event {
-+      __le32 gpio_num;    /* GPIO number which changed state */
-+} __packed;
-+
- struct wmi_ext_resource_config_10_4_cmd {
-       /* contains enum wmi_host_platform_type */
-       __le32 host_platform_config;
index cd1d300b388d1deff632a6618c13d1f63c6b5494..34dd2101b9259830c4dc3f8d48c8b967a393bfb0 100644 (file)
@@ -9,13 +9,13 @@ traffic.
 
 Signed-off-by: Mathias Kresin <[email protected]>
 ---
- ath10k-6.7/core.h | 4 ++++
- ath10k-6.7/leds.c | 4 +---
- ath10k-6.7/mac.c  | 2 +-
+ ath10k-6.14/core.h | 4 ++++
+ ath10k-6.14/leds.c | 4 +---
+ ath10k-6.14/mac.c  | 2 +-
  3 files changed, 6 insertions(+), 4 deletions(-)
 
---- a/ath10k-6.10/core.h
-+++ b/ath10k-6.10/core.h
+--- a/ath10k-6.14/core.h
++++ b/ath10k-6.14/core.h
 @@ -1707,6 +1707,10 @@ struct ath10k {
        u8 csi_data[4096];
        u16 csi_data_len;
@@ -27,8 +27,8 @@ Signed-off-by: Mathias Kresin <[email protected]>
        /* must be last */
        u8 drv_priv[] __aligned(sizeof(void *));
  };
---- a/ath10k-6.10/leds.c
-+++ b/ath10k-6.10/leds.c
+--- a/ath10k-6.14/leds.c
++++ b/ath10k-6.14/leds.c
 @@ -70,7 +70,7 @@ int ath10k_leds_register(struct ath10k *
  
        ar->leds.cdev.name = ar->leds.label;
@@ -38,9 +38,9 @@ Signed-off-by: Mathias Kresin <[email protected]>
  
        ret = led_classdev_register(wiphy_dev(ar->hw->wiphy), &ar->leds.cdev);
        if (ret)
---- a/ath10k-6.10/mac.c
-+++ b/ath10k-6.10/mac.c
-@@ -11631,7 +11631,7 @@ int ath10k_mac_register(struct ath10k *a
+--- a/ath10k-6.14/mac.c
++++ b/ath10k-6.14/mac.c
+@@ -11651,7 +11651,7 @@ int ath10k_mac_register(struct ath10k *a
        ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
  
  #ifdef CPTCFG_MAC80211_LEDS
index 89921d6a342832ca2ed07352404874a66c766bc4..84a74c0d3e569aa436adcd17c380b46c8cd8e18c 100644 (file)
@@ -1,5 +1,5 @@
---- a/ath10k-6.10/wmi.h
-+++ b/ath10k-6.10/wmi.h
+--- a/ath10k-6.14/wmi.h
++++ b/ath10k-6.14/wmi.h
 @@ -6310,7 +6310,7 @@ struct qca9880_set_ctl_table_cmd {
        __le32 ctl_len; /* in bytes.  This may be ignored in firmware,
                         * make sure ctl_info data is sizeof(qca9880_power_ctl) */
index bd25222e1d8ed6113205be409179ccc254077459..31a5161c0a6549845fb396557077dabd8d45da37 100644 (file)
@@ -1,5 +1,5 @@
---- a/ath10k-6.10/htt.h
-+++ b/ath10k-6.10/htt.h
+--- a/ath10k-6.14/htt.h
++++ b/ath10k-6.14/htt.h
 @@ -238,7 +238,11 @@ enum htt_rx_ring_flags {
  };
  
index 708a7caea2562f61d4eabe89d52b15c84528e6f6..6490e3ca9b3b375dfdd9578ba67ee5935462fa76 100644 (file)
@@ -1,5 +1,5 @@
---- a/ath10k-6.10/pci.c
-+++ b/ath10k-6.10/pci.c
+--- a/ath10k-6.14/pci.c
++++ b/ath10k-6.14/pci.c
 @@ -132,7 +132,11 @@ static const struct ce_attr pci_host_ce_
                .flags = CE_ATTR_FLAGS,
                .src_nentries = 0,
index 35026cc0f943d57b122eb87c226f2af16596d68c..3729e0f323939f30a5a0f00d973b76aa5e6346b0 100644 (file)
@@ -13,12 +13,12 @@ own loss detection mechanism.
 
 Signed-off-by: David Bauer <[email protected]>
 ---
- ath10k-6.10/mac.c | 1 -
+ ath10k-6.14/mac.c | 1 -
  1 file changed, 1 deletion(-)
 
---- a/ath10k-6.10/mac.c
-+++ b/ath10k-6.10/mac.c
-@@ -11316,7 +11316,6 @@ int ath10k_mac_register(struct ath10k *a
+--- a/ath10k-6.14/mac.c
++++ b/ath10k-6.14/mac.c
+@@ -11336,7 +11336,6 @@ int ath10k_mac_register(struct ath10k *a
        ieee80211_hw_set(ar->hw, CHANCTX_STA_CSA);
        ieee80211_hw_set(ar->hw, QUEUE_CONTROL);
        ieee80211_hw_set(ar->hw, SUPPORTS_TX_FRAG);
OSZAR »