ath10k-ct: switch to version 5.2
[openwrt/openwrt.git] / package / kernel / ath10k-ct / patches / 201-ath10k-4.16_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch
index 617505def9c79996085f63c646a96e75c37fba26..d5041b2a7afa2972c53dfa2bae5716d575f8f485 100644 (file)
@@ -82,11 +82,11 @@ v13:
  12 files changed, 314 insertions(+), 1 deletion(-)
  create mode 100644 ath10k-4.16/leds.c
  create mode 100644 ath10k-4.16/leds.h
---- a/ath10k-4.16/Kconfig
-+++ b/ath10k-4.16/Kconfig
-@@ -60,6 +60,16 @@ config ATH10K_SPECTRAL
-       ---help---
-         Say Y to enable access to the FFT/spectral data via debugfs.
+--- a/ath10k-4.19/Kconfig
++++ b/ath10k-4.19/Kconfig
+@@ -64,6 +64,16 @@ config ATH10K_DEBUGFS
+         If unsure, say Y to make it easier to debug problems.
  
 +config ATH10K_LEDS
 +      bool "Atheros ath10k LED support"
@@ -98,11 +98,11 @@ v13:
 +      ---help---
 +        This option is necessary, if you want LED support for chipset connected led pins. If unsure, say N.
 +
- config ATH10K_TRACING
-       bool "Atheros ath10k tracing support"
-       depends on ATH10K
---- a/ath10k-4.16/Makefile
-+++ b/ath10k-4.16/Makefile
+ config ATH10K_SPECTRAL
+       bool "Atheros ath10k spectral scan support"
+       depends on ATH10K_DEBUGFS
+--- a/ath10k-4.19/Makefile
++++ b/ath10k-4.19/Makefile
 @@ -19,6 +19,7 @@ ath10k_core-$(CONFIG_ATH10K_SPECTRAL) +=
  ath10k_core-$(CONFIG_NL80211_TESTMODE) += testmode.o
  ath10k_core-$(CONFIG_ATH10K_TRACING) += trace.o
@@ -111,9 +111,9 @@ v13:
  ath10k_core-$(CONFIG_MAC80211_DEBUGFS) += debugfs_sta.o
  ath10k_core-$(CONFIG_PM) += wow.o
  ath10k_core-$(CONFIG_DEV_COREDUMP) += coredump.o
---- a/ath10k-4.16/core.c
-+++ b/ath10k-4.16/core.c
-@@ -34,6 +34,7 @@
+--- a/ath10k-4.19/core.c
++++ b/ath10k-4.19/core.c
+@@ -35,6 +35,7 @@
  #include "testmode.h"
  #include "wmi-ops.h"
  #include "coredump.h"
@@ -121,7 +121,7 @@ v13:
  
  /* Disable ath10k-ct DBGLOG output by default */
  unsigned int ath10k_debug_mask = ATH10K_DBG_NO_DBGLOG;
-@@ -73,6 +74,7 @@ static const struct ath10k_hw_params ath
+@@ -72,6 +73,7 @@ static const struct ath10k_hw_params ath
                .id = QCA988X_HW_2_0_VERSION,
                .dev_id = QCA988X_2_0_DEVICE_ID,
                .name = "qca988x hw2.0",
@@ -129,7 +129,7 @@ v13:
                .patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR,
                .uart_pin = 7,
                .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
-@@ -131,6 +133,7 @@ static const struct ath10k_hw_params ath
+@@ -137,6 +139,7 @@ static const struct ath10k_hw_params ath
                .id = QCA9887_HW_1_0_VERSION,
                .dev_id = QCA9887_1_0_DEVICE_ID,
                .name = "qca9887 hw1.0",
@@ -137,7 +137,7 @@ v13:
                .patch_load_addr = QCA9887_HW_1_0_PATCH_LOAD_ADDR,
                .uart_pin = 7,
                .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
-@@ -275,6 +278,7 @@ static const struct ath10k_hw_params ath
+@@ -301,6 +304,7 @@ static const struct ath10k_hw_params ath
                .id = QCA99X0_HW_2_0_DEV_VERSION,
                .dev_id = QCA99X0_2_0_DEVICE_ID,
                .name = "qca99x0 hw2.0",
@@ -145,7 +145,7 @@ v13:
                .patch_load_addr = QCA99X0_HW_2_0_PATCH_LOAD_ADDR,
                .uart_pin = 7,
                .otp_exe_param = 0x00000700,
-@@ -309,6 +313,7 @@ static const struct ath10k_hw_params ath
+@@ -339,6 +343,7 @@ static const struct ath10k_hw_params ath
                .id = QCA9984_HW_1_0_DEV_VERSION,
                .dev_id = QCA9984_1_0_DEVICE_ID,
                .name = "qca9984/qca9994 hw1.0",
@@ -153,7 +153,7 @@ v13:
                .patch_load_addr = QCA9984_HW_1_0_PATCH_LOAD_ADDR,
                .uart_pin = 7,
                .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
-@@ -348,6 +353,7 @@ static const struct ath10k_hw_params ath
+@@ -382,6 +387,7 @@ static const struct ath10k_hw_params ath
                .id = QCA9888_HW_2_0_DEV_VERSION,
                .dev_id = QCA9888_2_0_DEVICE_ID,
                .name = "qca9888 hw2.0",
@@ -161,7 +161,7 @@ v13:
                .patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR,
                .uart_pin = 7,
                .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
-@@ -3084,6 +3090,10 @@ int ath10k_core_start(struct ath10k *ar,
+@@ -3167,6 +3173,10 @@ int ath10k_core_start(struct ath10k *ar,
                        ath10k_wmi_check_apply_board_power_ctl_table(ar);
        }
  
@@ -172,7 +172,7 @@ v13:
        return 0;
  
  err_hif_stop:
-@@ -3330,9 +3340,18 @@ static void ath10k_core_register_work(st
+@@ -3421,9 +3431,18 @@ static void ath10k_core_register_work(st
                goto err_spectral_destroy;
        }
  
@@ -191,7 +191,7 @@ v13:
  err_spectral_destroy:
        ath10k_spectral_destroy(ar);
  err_debug_destroy:
-@@ -3390,6 +3409,8 @@ void ath10k_core_unregister(struct ath10
+@@ -3481,6 +3500,8 @@ void ath10k_core_unregister(struct ath10
        if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags))
                return;
  
@@ -200,9 +200,9 @@ v13:
        ath10k_thermal_unregister(ar);
        /* Stop spectral before unregistering from mac80211 to remove the
         * relayfs debugfs file cleanly. Otherwise the parent debugfs tree
---- a/ath10k-4.16/core.h
-+++ b/ath10k-4.16/core.h
-@@ -24,6 +24,7 @@
+--- a/ath10k-4.19/core.h
++++ b/ath10k-4.19/core.h
+@@ -25,6 +25,7 @@
  #include <linux/pci.h>
  #include <linux/uuid.h>
  #include <linux/time.h>
@@ -210,7 +210,15 @@ v13:
  
  #include "htt.h"
  #include "htc.h"
-@@ -1273,6 +1274,13 @@ struct ath10k {
+@@ -1137,7 +1138,6 @@ struct ath10k {
+       u32 low_5ghz_chan;
+       u32 high_5ghz_chan;
+       bool ani_enabled;
+-
+       bool p2p;
+       bool ct_all_pkts_htt; /* CT firmware only: native-wifi for all pkts */
+@@ -1388,6 +1388,13 @@ struct ath10k {
        } testmode;
  
        struct {
@@ -224,9 +232,9 @@ v13:
                /* protected by data_lock */
                u32 fw_crash_counter;
                u32 fw_warm_reset_counter;
---- a/ath10k-4.16/hw.h
-+++ b/ath10k-4.16/hw.h
-@@ -499,6 +499,7 @@ struct ath10k_hw_params {
+--- a/ath10k-4.19/hw.h
++++ b/ath10k-4.19/hw.h
+@@ -508,6 +508,7 @@ struct ath10k_hw_params {
        const char *name;
        u32 patch_load_addr;
        int uart_pin;
@@ -235,7 +243,7 @@ v13:
  
        /* Type of hw cycle counter wraparound logic, for more info
 --- /dev/null
-+++ b/ath10k-4.16/leds.c
++++ b/ath10k-4.19/leds.c
 @@ -0,0 +1,103 @@
 +/*
 + * Copyright (c) 2005-2011 Atheros Communications Inc.
@@ -341,7 +349,7 @@ v13:
 +}
 +
 --- /dev/null
-+++ b/ath10k-4.16/leds.h
++++ b/ath10k-4.19/leds.h
 @@ -0,0 +1,41 @@
 +/*
 + * Copyright (c) 2018, The Linux Foundation. All rights reserved.
@@ -384,9 +392,9 @@ v13:
 +
 +#endif
 +#endif /* _LEDS_H_ */
---- a/ath10k-4.16/mac.c
-+++ b/ath10k-4.16/mac.c
-@@ -33,6 +33,7 @@
+--- a/ath10k-4.19/mac.c
++++ b/ath10k-4.19/mac.c
+@@ -34,6 +34,7 @@
  #include "wmi-tlv.h"
  #include "wmi-ops.h"
  #include "wow.h"
@@ -394,19 +402,20 @@ v13:
  
  /*********/
  /* Rates */
---- a/ath10k-4.16/wmi-ops.h
-+++ b/ath10k-4.16/wmi-ops.h
-@@ -199,6 +199,9 @@ struct wmi_ops {
-                                       (struct ath10k *ar,
-                                        enum wmi_bss_survey_req_type type);
+--- a/ath10k-4.19/wmi-ops.h
++++ b/ath10k-4.19/wmi-ops.h
+@@ -218,7 +218,10 @@ struct wmi_ops {
        struct sk_buff *(*gen_echo)(struct ath10k *ar, u32 value);
+       struct sk_buff *(*gen_pdev_get_tpc_table_cmdid)(struct ath10k *ar,
+                                                       u32 param);
 +      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);
-@@ -983,6 +986,35 @@ ath10k_wmi_force_fw_hang(struct ath10k *
+@@ -1079,6 +1082,35 @@ ath10k_wmi_force_fw_hang(struct ath10k *
        return ath10k_wmi_cmd_send(ar, skb, ar->wmi.cmd->force_fw_hang_cmdid);
  }
  
@@ -442,9 +451,9 @@ v13:
  static inline int
  ath10k_wmi_dbglog_cfg(struct ath10k *ar, u64 module_enable, u32 log_level)
  {
---- a/ath10k-4.16/wmi-tlv.c
-+++ b/ath10k-4.16/wmi-tlv.c
-@@ -3729,6 +3729,8 @@ static const struct wmi_ops wmi_tlv_ops
+--- a/ath10k-4.19/wmi-tlv.c
++++ b/ath10k-4.19/wmi-tlv.c
+@@ -3976,6 +3976,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,
@@ -453,9 +462,9 @@ v13:
  };
  
  static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = {
---- a/ath10k-4.16/wmi.c
-+++ b/ath10k-4.16/wmi.c
-@@ -7593,6 +7593,49 @@ ath10k_wmi_op_gen_peer_set_param(struct
+--- a/ath10k-4.19/wmi.c
++++ b/ath10k-4.19/wmi.c
+@@ -8070,6 +8070,49 @@ ath10k_wmi_op_gen_peer_set_param(struct
        return skb;
  }
  
@@ -505,7 +514,7 @@ v13:
  static struct sk_buff *
  ath10k_wmi_op_gen_set_psmode(struct ath10k *ar, u32 vdev_id,
                             enum wmi_sta_ps_mode psmode)
-@@ -9235,6 +9278,9 @@ static const struct wmi_ops wmi_ops = {
+@@ -9821,6 +9864,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,
@@ -515,7 +524,7 @@ v13:
        /* .gen_bcn_tmpl not implemented */
        /* .gen_prb_tmpl not implemented */
        /* .gen_p2p_go_bcn_ie not implemented */
-@@ -9305,6 +9351,8 @@ static const struct wmi_ops wmi_10_1_ops
+@@ -9891,6 +9937,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,
@@ -524,7 +533,7 @@ v13:
        /* .gen_bcn_tmpl not implemented */
        /* .gen_prb_tmpl not implemented */
        /* .gen_p2p_go_bcn_ie not implemented */
-@@ -9383,6 +9431,8 @@ static const struct wmi_ops wmi_10_2_ops
+@@ -9969,6 +10017,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,
@@ -533,7 +542,7 @@ v13:
        /* .gen_pdev_enable_adaptive_cca not implemented */
  };
  
-@@ -9453,6 +9503,8 @@ static const struct wmi_ops wmi_10_2_4_o
+@@ -10039,6 +10089,8 @@ static const struct wmi_ops wmi_10_2_4_o
        .gen_pdev_enable_adaptive_cca =
                ath10k_wmi_op_gen_pdev_enable_adaptive_cca,
        .get_vdev_subtype = ath10k_wmi_10_2_4_op_get_vdev_subtype,
@@ -542,7 +551,7 @@ v13:
        /* .gen_bcn_tmpl not implemented */
        /* .gen_prb_tmpl not implemented */
        /* .gen_p2p_go_bcn_ie not implemented */
-@@ -9529,6 +9581,8 @@ static const struct wmi_ops wmi_10_4_ops
+@@ -10119,6 +10171,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,
@@ -551,9 +560,9 @@ v13:
  };
  
  int ath10k_wmi_attach(struct ath10k *ar)
---- a/ath10k-4.16/wmi.h
-+++ b/ath10k-4.16/wmi.h
-@@ -3013,6 +3013,41 @@ enum wmi_10_4_feature_mask {
+--- a/ath10k-4.19/wmi.h
++++ b/ath10k-4.19/wmi.h
+@@ -3044,6 +3044,41 @@ enum wmi_10_4_feature_mask {
  
  };
  
@@ -595,9 +604,9 @@ v13:
  struct wmi_ext_resource_config_10_4_cmd {
        /* contains enum wmi_host_platform_type */
        __le32 host_platform_config;
---- a/ath10k-4.19/Kconfig
-+++ b/ath10k-4.19/Kconfig
-@@ -64,6 +64,16 @@ config ATH10K_DEBUGFS
+--- a/ath10k-5.2/Kconfig
++++ b/ath10k-5.2/Kconfig
+@@ -66,6 +66,16 @@ config ATH10K_DEBUGFS
  
          If unsure, say Y to make it easier to debug problems.
  
@@ -614,8 +623,8 @@ v13:
  config ATH10K_SPECTRAL
        bool "Atheros ath10k spectral scan support"
        depends on ATH10K_DEBUGFS
---- a/ath10k-4.19/Makefile
-+++ b/ath10k-4.19/Makefile
+--- a/ath10k-5.2/Makefile
++++ b/ath10k-5.2/Makefile
 @@ -19,6 +19,7 @@ ath10k_core-$(CONFIG_ATH10K_SPECTRAL) +=
  ath10k_core-$(CONFIG_NL80211_TESTMODE) += testmode.o
  ath10k_core-$(CONFIG_ATH10K_TRACING) += trace.o
@@ -624,9 +633,9 @@ v13:
  ath10k_core-$(CONFIG_MAC80211_DEBUGFS) += debugfs_sta.o
  ath10k_core-$(CONFIG_PM) += wow.o
  ath10k_core-$(CONFIG_DEV_COREDUMP) += coredump.o
---- a/ath10k-4.19/core.c
-+++ b/ath10k-4.19/core.c
-@@ -35,6 +35,7 @@
+--- a/ath10k-5.2/core.c
++++ b/ath10k-5.2/core.c
+@@ -25,6 +25,7 @@
  #include "testmode.h"
  #include "wmi-ops.h"
  #include "coredump.h"
@@ -634,47 +643,47 @@ v13:
  
  /* Disable ath10k-ct DBGLOG output by default */
  unsigned int ath10k_debug_mask = ATH10K_DBG_NO_DBGLOG;
-@@ -72,6 +73,7 @@ static const struct ath10k_hw_params ath
-               .id = QCA988X_HW_2_0_VERSION,
+@@ -63,6 +64,7 @@ static const struct ath10k_hw_params ath
                .dev_id = QCA988X_2_0_DEVICE_ID,
+               .bus = ATH10K_BUS_PCI,
                .name = "qca988x hw2.0",
 +              .led_pin = 1,
                .patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR,
                .uart_pin = 7,
                .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
-@@ -137,6 +139,7 @@ static const struct ath10k_hw_params ath
-               .id = QCA9887_HW_1_0_VERSION,
+@@ -131,6 +133,7 @@ static const struct ath10k_hw_params ath
                .dev_id = QCA9887_1_0_DEVICE_ID,
+               .bus = ATH10K_BUS_PCI,
                .name = "qca9887 hw1.0",
 +              .led_pin = 1,
                .patch_load_addr = QCA9887_HW_1_0_PATCH_LOAD_ADDR,
                .uart_pin = 7,
                .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
-@@ -301,6 +304,7 @@ static const struct ath10k_hw_params ath
-               .id = QCA99X0_HW_2_0_DEV_VERSION,
+@@ -305,6 +308,7 @@ static const struct ath10k_hw_params ath
                .dev_id = QCA99X0_2_0_DEVICE_ID,
+               .bus = ATH10K_BUS_PCI,
                .name = "qca99x0 hw2.0",
 +              .led_pin = 17,
                .patch_load_addr = QCA99X0_HW_2_0_PATCH_LOAD_ADDR,
                .uart_pin = 7,
                .otp_exe_param = 0x00000700,
-@@ -339,6 +343,7 @@ static const struct ath10k_hw_params ath
-               .id = QCA9984_HW_1_0_DEV_VERSION,
+@@ -345,6 +349,7 @@ static const struct ath10k_hw_params ath
                .dev_id = QCA9984_1_0_DEVICE_ID,
+               .bus = ATH10K_BUS_PCI,
                .name = "qca9984/qca9994 hw1.0",
 +              .led_pin = 17,
                .patch_load_addr = QCA9984_HW_1_0_PATCH_LOAD_ADDR,
                .uart_pin = 7,
                .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
-@@ -382,6 +387,7 @@ static const struct ath10k_hw_params ath
-               .id = QCA9888_HW_2_0_DEV_VERSION,
+@@ -392,6 +397,7 @@ static const struct ath10k_hw_params ath
                .dev_id = QCA9888_2_0_DEVICE_ID,
+               .bus = ATH10K_BUS_PCI,
                .name = "qca9888 hw2.0",
 +              .led_pin = 17,
                .patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR,
                .uart_pin = 7,
                .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
-@@ -3147,6 +3153,10 @@ int ath10k_core_start(struct ath10k *ar,
+@@ -3446,6 +3452,10 @@ int ath10k_core_start(struct ath10k *ar,
                        ath10k_wmi_check_apply_board_power_ctl_table(ar);
        }
  
@@ -685,7 +694,7 @@ v13:
        return 0;
  
  err_hif_stop:
-@@ -3401,9 +3411,18 @@ static void ath10k_core_register_work(st
+@@ -3702,9 +3712,18 @@ static void ath10k_core_register_work(st
                goto err_spectral_destroy;
        }
  
@@ -704,7 +713,7 @@ v13:
  err_spectral_destroy:
        ath10k_spectral_destroy(ar);
  err_debug_destroy:
-@@ -3461,6 +3480,8 @@ void ath10k_core_unregister(struct ath10
+@@ -3764,6 +3783,8 @@ void ath10k_core_unregister(struct ath10
        if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags))
                return;
  
@@ -713,9 +722,9 @@ v13:
        ath10k_thermal_unregister(ar);
        /* Stop spectral before unregistering from mac80211 to remove the
         * relayfs debugfs file cleanly. Otherwise the parent debugfs tree
---- a/ath10k-4.19/core.h
-+++ b/ath10k-4.19/core.h
-@@ -25,6 +25,7 @@
+--- a/ath10k-5.2/core.h
++++ b/ath10k-5.2/core.h
+@@ -14,6 +14,7 @@
  #include <linux/pci.h>
  #include <linux/uuid.h>
  #include <linux/time.h>
@@ -723,15 +732,7 @@ v13:
  
  #include "htt.h"
  #include "htc.h"
-@@ -1132,7 +1133,6 @@ struct ath10k {
-       u32 low_5ghz_chan;
-       u32 high_5ghz_chan;
-       bool ani_enabled;
--
-       bool p2p;
-       bool ct_all_pkts_htt; /* CT firmware only: native-wifi for all pkts */
-@@ -1383,6 +1383,13 @@ struct ath10k {
+@@ -1436,6 +1437,13 @@ struct ath10k {
        } testmode;
  
        struct {
@@ -745,9 +746,9 @@ v13:
                /* protected by data_lock */
                u32 fw_crash_counter;
                u32 fw_warm_reset_counter;
---- a/ath10k-4.19/hw.h
-+++ b/ath10k-4.19/hw.h
-@@ -508,6 +508,7 @@ struct ath10k_hw_params {
+--- a/ath10k-5.2/hw.h
++++ b/ath10k-5.2/hw.h
+@@ -515,6 +515,7 @@ struct ath10k_hw_params {
        const char *name;
        u32 patch_load_addr;
        int uart_pin;
@@ -756,7 +757,7 @@ v13:
  
        /* Type of hw cycle counter wraparound logic, for more info
 --- /dev/null
-+++ b/ath10k-4.19/leds.c
++++ b/ath10k-5.2/leds.c
 @@ -0,0 +1,103 @@
 +/*
 + * Copyright (c) 2005-2011 Atheros Communications Inc.
@@ -862,7 +863,7 @@ v13:
 +}
 +
 --- /dev/null
-+++ b/ath10k-4.19/leds.h
++++ b/ath10k-5.2/leds.h
 @@ -0,0 +1,41 @@
 +/*
 + * Copyright (c) 2018, The Linux Foundation. All rights reserved.
@@ -905,9 +906,9 @@ v13:
 +
 +#endif
 +#endif /* _LEDS_H_ */
---- a/ath10k-4.19/mac.c
-+++ b/ath10k-4.19/mac.c
-@@ -34,6 +34,7 @@
+--- a/ath10k-5.2/mac.c
++++ b/ath10k-5.2/mac.c
+@@ -24,6 +24,7 @@
  #include "wmi-tlv.h"
  #include "wmi-ops.h"
  #include "wow.h"
@@ -915,12 +916,12 @@ v13:
  
  /*********/
  /* Rates */
---- a/ath10k-4.19/wmi-ops.h
-+++ b/ath10k-4.19/wmi-ops.h
+--- a/ath10k-5.2/wmi-ops.h
++++ b/ath10k-5.2/wmi-ops.h
 @@ -218,7 +218,10 @@ struct wmi_ops {
-       struct sk_buff *(*gen_echo)(struct ath10k *ar, u32 value);
-       struct sk_buff *(*gen_pdev_get_tpc_table_cmdid)(struct ath10k *ar,
-                                                       u32 param);
+       struct sk_buff *(*gen_bb_timing)
+                       (struct ath10k *ar,
+                        const struct wmi_bb_timing_cfg_arg *arg);
 +      struct sk_buff *(*gen_gpio_config)(struct ath10k *ar, u32 gpio_num,
 +                                         u32 input, u32 pull_type, u32 intr_mode);
  
@@ -928,7 +929,7 @@ v13:
  };
  
  int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id);
-@@ -1079,6 +1082,35 @@ ath10k_wmi_force_fw_hang(struct ath10k *
+@@ -1105,6 +1108,35 @@ ath10k_wmi_force_fw_hang(struct ath10k *
        return ath10k_wmi_cmd_send(ar, skb, ar->wmi.cmd->force_fw_hang_cmdid);
  }
  
@@ -964,9 +965,9 @@ v13:
  static inline int
  ath10k_wmi_dbglog_cfg(struct ath10k *ar, u64 module_enable, u32 log_level)
  {
---- a/ath10k-4.19/wmi-tlv.c
-+++ b/ath10k-4.19/wmi-tlv.c
-@@ -3976,6 +3976,8 @@ static const struct wmi_ops wmi_tlv_ops
+--- a/ath10k-5.2/wmi-tlv.c
++++ b/ath10k-5.2/wmi-tlv.c
+@@ -4309,6 +4309,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,
@@ -975,9 +976,9 @@ v13:
  };
  
  static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = {
---- a/ath10k-4.19/wmi.c
-+++ b/ath10k-4.19/wmi.c
-@@ -8070,6 +8070,49 @@ ath10k_wmi_op_gen_peer_set_param(struct
+--- a/ath10k-5.2/wmi.c
++++ b/ath10k-5.2/wmi.c
+@@ -8286,6 +8286,49 @@ ath10k_wmi_op_gen_peer_set_param(struct
        return skb;
  }
  
@@ -1027,7 +1028,7 @@ v13:
  static struct sk_buff *
  ath10k_wmi_op_gen_set_psmode(struct ath10k *ar, u32 vdev_id,
                             enum wmi_sta_ps_mode psmode)
-@@ -9821,6 +9864,9 @@ static const struct wmi_ops wmi_ops = {
+@@ -10058,6 +10101,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,
@@ -1037,7 +1038,7 @@ v13:
        /* .gen_bcn_tmpl not implemented */
        /* .gen_prb_tmpl not implemented */
        /* .gen_p2p_go_bcn_ie not implemented */
-@@ -9891,6 +9937,8 @@ static const struct wmi_ops wmi_10_1_ops
+@@ -10128,6 +10174,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,
@@ -1046,7 +1047,7 @@ v13:
        /* .gen_bcn_tmpl not implemented */
        /* .gen_prb_tmpl not implemented */
        /* .gen_p2p_go_bcn_ie not implemented */
-@@ -9969,6 +10017,8 @@ static const struct wmi_ops wmi_10_2_ops
+@@ -10207,6 +10255,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,
@@ -1055,16 +1056,16 @@ v13:
        /* .gen_pdev_enable_adaptive_cca not implemented */
  };
  
-@@ -10039,6 +10089,8 @@ static const struct wmi_ops wmi_10_2_4_o
-       .gen_pdev_enable_adaptive_cca =
+@@ -10278,6 +10328,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 */
-@@ -10119,6 +10171,8 @@ static const struct wmi_ops wmi_10_4_ops
+@@ -10359,6 +10411,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,
@@ -1073,9 +1074,9 @@ v13:
  };
  
  int ath10k_wmi_attach(struct ath10k *ar)
---- a/ath10k-4.19/wmi.h
-+++ b/ath10k-4.19/wmi.h
-@@ -3041,6 +3041,41 @@ enum wmi_10_4_feature_mask {
+--- a/ath10k-5.2/wmi.h
++++ b/ath10k-5.2/wmi.h
+@@ -3103,6 +3103,41 @@ enum wmi_10_4_feature_mask {
  
  };