mac80211: update to version 4.19.23-1
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / ath / 974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch
index e59d45d50807254afe23dbc7d3bc882af13e49a5..50ed63b06577a870210a0b3cd124ea4956ca7028 100644 (file)
@@ -83,10 +83,8 @@ v13:
  12 files changed, 314 insertions(+), 1 deletion(-)
  create mode 100644 drivers/net/wireless/ath/ath10k/leds.c
  create mode 100644 drivers/net/wireless/ath/ath10k/leds.h
-Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/Kconfig
-===================================================================
---- backports-v4.18-rc7.orig/drivers/net/wireless/ath/ath10k/Kconfig
-+++ backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/Kconfig
+--- a/drivers/net/wireless/ath/ath10k/Kconfig
++++ b/drivers/net/wireless/ath/ath10k/Kconfig
 @@ -69,6 +69,16 @@ config ATH10K_DEBUGFS
  
          If unsure, say Y to make it easier to debug problems.
@@ -104,10 +102,8 @@ Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/Kconfig
  config ATH10K_SPECTRAL
        bool "Atheros ath10k spectral scan support"
        depends on ATH10K_DEBUGFS
-Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/Makefile
-===================================================================
---- backports-v4.18-rc7.orig/drivers/net/wireless/ath/ath10k/Makefile
-+++ backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/Makefile
+--- a/drivers/net/wireless/ath/ath10k/Makefile
++++ b/drivers/net/wireless/ath/ath10k/Makefile
 @@ -19,6 +19,7 @@ ath10k_core-$(CPTCFG_ATH10K_SPECTRAL) +=
  ath10k_core-$(CPTCFG_NL80211_TESTMODE) += testmode.o
  ath10k_core-$(CPTCFG_ATH10K_TRACING) += trace.o
@@ -116,11 +112,9 @@ Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/Makefile
  ath10k_core-$(CPTCFG_MAC80211_DEBUGFS) += debugfs_sta.o
  ath10k_core-$(CONFIG_PM) += wow.o
  ath10k_core-$(CONFIG_DEV_COREDUMP) += coredump.o
-Index: backports-v4.18-rc7/local-symbols
-===================================================================
---- backports-v4.18-rc7.orig/local-symbols
-+++ backports-v4.18-rc7/local-symbols
-@@ -147,6 +147,7 @@ ATH10K_DEBUG=
+--- a/local-symbols
++++ b/local-symbols
+@@ -142,6 +142,7 @@ ATH10K_DEBUG=
  ATH10K_DEBUGFS=
  ATH10K_SPECTRAL=
  ATH10K_THERMAL=
@@ -128,10 +122,8 @@ Index: backports-v4.18-rc7/local-symbols
  ATH10K_TRACING=
  ATH10K_DFS_CERTIFIED=
  WCN36XX=
-Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/core.c
-===================================================================
---- backports-v4.18-rc7.orig/drivers/net/wireless/ath/ath10k/core.c
-+++ backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/core.c
+--- a/drivers/net/wireless/ath/ath10k/core.c
++++ b/drivers/net/wireless/ath/ath10k/core.c
 @@ -34,6 +34,7 @@
  #include "testmode.h"
  #include "wmi-ops.h"
@@ -140,7 +132,7 @@ Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/core.c
  
  unsigned int ath10k_debug_mask;
  static unsigned int ath10k_cryptmode_param;
-@@ -66,6 +67,7 @@ static const struct ath10k_hw_params ath
+@@ -64,6 +65,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",
@@ -156,7 +148,7 @@ Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/core.c
                .patch_load_addr = QCA9887_HW_1_0_PATCH_LOAD_ADDR,
                .uart_pin = 7,
                .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
-@@ -288,6 +291,7 @@ static const struct ath10k_hw_params ath
+@@ -293,6 +296,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",
@@ -164,7 +156,7 @@ Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/core.c
                .patch_load_addr = QCA99X0_HW_2_0_PATCH_LOAD_ADDR,
                .uart_pin = 7,
                .otp_exe_param = 0x00000700,
-@@ -325,6 +329,7 @@ static const struct ath10k_hw_params ath
+@@ -331,6 +335,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",
@@ -172,7 +164,7 @@ Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/core.c
                .patch_load_addr = QCA9984_HW_1_0_PATCH_LOAD_ADDR,
                .uart_pin = 7,
                .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
-@@ -367,6 +372,7 @@ static const struct ath10k_hw_params ath
+@@ -374,6 +379,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",
@@ -180,7 +172,7 @@ Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/core.c
                .patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR,
                .uart_pin = 7,
                .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
-@@ -2428,6 +2434,10 @@ int ath10k_core_start(struct ath10k *ar,
+@@ -2441,6 +2447,10 @@ int ath10k_core_start(struct ath10k *ar,
        if (status)
                goto err_hif_stop;
  
@@ -191,7 +183,7 @@ Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/core.c
        return 0;
  
  err_hif_stop:
-@@ -2682,9 +2692,18 @@ static void ath10k_core_register_work(st
+@@ -2695,9 +2705,18 @@ static void ath10k_core_register_work(st
                goto err_spectral_destroy;
        }
  
@@ -210,7 +202,7 @@ Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/core.c
  err_spectral_destroy:
        ath10k_spectral_destroy(ar);
  err_debug_destroy:
-@@ -2728,6 +2747,8 @@ void ath10k_core_unregister(struct ath10
+@@ -2741,6 +2760,8 @@ void ath10k_core_unregister(struct ath10
        if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags))
                return;
  
@@ -219,10 +211,8 @@ Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/core.c
        ath10k_thermal_unregister(ar);
        /* Stop spectral before unregistering from mac80211 to remove the
         * relayfs debugfs file cleanly. Otherwise the parent debugfs tree
-Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/core.h
-===================================================================
---- backports-v4.18-rc7.orig/drivers/net/wireless/ath/ath10k/core.h
-+++ backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/core.h
+--- a/drivers/net/wireless/ath/ath10k/core.h
++++ b/drivers/net/wireless/ath/ath10k/core.h
 @@ -25,6 +25,7 @@
  #include <linux/pci.h>
  #include <linux/uuid.h>
@@ -231,7 +221,7 @@ Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/core.h
  
  #include "htt.h"
  #include "htc.h"
-@@ -902,7 +903,6 @@ struct ath10k {
+@@ -908,7 +909,6 @@ struct ath10k {
        u32 low_5ghz_chan;
        u32 high_5ghz_chan;
        bool ani_enabled;
@@ -239,7 +229,7 @@ Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/core.h
        bool p2p;
  
        struct {
-@@ -1093,6 +1093,13 @@ struct ath10k {
+@@ -1099,6 +1099,13 @@ struct ath10k {
        } testmode;
  
        struct {
@@ -253,10 +243,8 @@ Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/core.h
                /* protected by data_lock */
                u32 fw_crash_counter;
                u32 fw_warm_reset_counter;
-Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/hw.h
-===================================================================
---- backports-v4.18-rc7.orig/drivers/net/wireless/ath/ath10k/hw.h
-+++ backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/hw.h
+--- a/drivers/net/wireless/ath/ath10k/hw.h
++++ b/drivers/net/wireless/ath/ath10k/hw.h
 @@ -504,6 +504,7 @@ struct ath10k_hw_params {
        const char *name;
        u32 patch_load_addr;
@@ -265,10 +253,8 @@ Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/hw.h
        u32 otp_exe_param;
  
        /* Type of hw cycle counter wraparound logic, for more info
-Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/leds.c
-===================================================================
 --- /dev/null
-+++ backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/leds.c
++++ b/drivers/net/wireless/ath/ath10k/leds.c
 @@ -0,0 +1,103 @@
 +/*
 + * Copyright (c) 2005-2011 Atheros Communications Inc.
@@ -373,10 +359,8 @@ Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/leds.c
 +      led_classdev_unregister(&ar->leds.cdev);
 +}
 +
-Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/leds.h
-===================================================================
 --- /dev/null
-+++ backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/leds.h
++++ b/drivers/net/wireless/ath/ath10k/leds.h
 @@ -0,0 +1,41 @@
 +/*
 + * Copyright (c) 2018, The Linux Foundation. All rights reserved.
@@ -419,10 +403,8 @@ Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/leds.h
 +
 +#endif
 +#endif /* _LEDS_H_ */
-Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/mac.c
-===================================================================
---- backports-v4.18-rc7.orig/drivers/net/wireless/ath/ath10k/mac.c
-+++ backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/mac.c
+--- a/drivers/net/wireless/ath/ath10k/mac.c
++++ b/drivers/net/wireless/ath/ath10k/mac.c
 @@ -33,6 +33,7 @@
  #include "wmi-tlv.h"
  #include "wmi-ops.h"
@@ -431,11 +413,9 @@ Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/mac.c
  
  /*********/
  /* Rates */
-Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/wmi-ops.h
-===================================================================
---- backports-v4.18-rc7.orig/drivers/net/wireless/ath/ath10k/wmi-ops.h
-+++ backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/wmi-ops.h
-@@ -214,7 +214,10 @@ struct wmi_ops {
+--- a/drivers/net/wireless/ath/ath10k/wmi-ops.h
++++ b/drivers/net/wireless/ath/ath10k/wmi-ops.h
+@@ -216,7 +216,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);
@@ -446,7 +426,7 @@ Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/wmi-ops.h
  };
  
  int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id);
-@@ -1042,6 +1045,35 @@ ath10k_wmi_force_fw_hang(struct ath10k *
+@@ -1054,6 +1057,35 @@ ath10k_wmi_force_fw_hang(struct ath10k *
        return ath10k_wmi_cmd_send(ar, skb, ar->wmi.cmd->force_fw_hang_cmdid);
  }
  
@@ -482,11 +462,9 @@ Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/wmi-ops.h
  static inline int
  ath10k_wmi_dbglog_cfg(struct ath10k *ar, u64 module_enable, u32 log_level)
  {
-Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/wmi-tlv.c
-===================================================================
---- backports-v4.18-rc7.orig/drivers/net/wireless/ath/ath10k/wmi-tlv.c
-+++ backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/wmi-tlv.c
-@@ -3909,6 +3909,8 @@ static const struct wmi_ops wmi_tlv_ops
+--- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c
++++ b/drivers/net/wireless/ath/ath10k/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,
@@ -495,11 +473,9 @@ Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/wmi-tlv.c
  };
  
  static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = {
-Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/wmi.c
-===================================================================
---- backports-v4.18-rc7.orig/drivers/net/wireless/ath/ath10k/wmi.c
-+++ backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/wmi.c
-@@ -7115,6 +7115,49 @@ ath10k_wmi_op_gen_peer_set_param(struct
+--- a/drivers/net/wireless/ath/ath10k/wmi.c
++++ b/drivers/net/wireless/ath/ath10k/wmi.c
+@@ -7177,6 +7177,49 @@ ath10k_wmi_op_gen_peer_set_param(struct
        return skb;
  }
  
@@ -549,7 +525,7 @@ Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/wmi.c
  static struct sk_buff *
  ath10k_wmi_op_gen_set_psmode(struct ath10k *ar, u32 vdev_id,
                             enum wmi_sta_ps_mode psmode)
-@@ -8726,6 +8769,9 @@ static const struct wmi_ops wmi_ops = {
+@@ -8788,6 +8831,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,
@@ -559,7 +535,7 @@ Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/wmi.c
        /* .gen_bcn_tmpl not implemented */
        /* .gen_prb_tmpl not implemented */
        /* .gen_p2p_go_bcn_ie not implemented */
-@@ -8796,6 +8842,8 @@ static const struct wmi_ops wmi_10_1_ops
+@@ -8858,6 +8904,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,
@@ -568,7 +544,7 @@ Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/wmi.c
        /* .gen_bcn_tmpl not implemented */
        /* .gen_prb_tmpl not implemented */
        /* .gen_p2p_go_bcn_ie not implemented */
-@@ -8867,6 +8915,8 @@ static const struct wmi_ops wmi_10_2_ops
+@@ -8929,6 +8977,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,
@@ -577,7 +553,7 @@ Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/wmi.c
        /* .gen_pdev_enable_adaptive_cca not implemented */
  };
  
-@@ -8937,6 +8987,8 @@ static const struct wmi_ops wmi_10_2_4_o
+@@ -8999,6 +9049,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,
@@ -586,7 +562,7 @@ Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/wmi.c
        /* .gen_bcn_tmpl not implemented */
        /* .gen_prb_tmpl not implemented */
        /* .gen_p2p_go_bcn_ie not implemented */
-@@ -9016,6 +9068,8 @@ static const struct wmi_ops wmi_10_4_ops
+@@ -9078,6 +9130,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,
@@ -595,11 +571,9 @@ Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/wmi.c
  };
  
  int ath10k_wmi_attach(struct ath10k *ar)
-Index: backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/wmi.h
-===================================================================
---- backports-v4.18-rc7.orig/drivers/net/wireless/ath/ath10k/wmi.h
-+++ backports-v4.18-rc7/drivers/net/wireless/ath/ath10k/wmi.h
-@@ -2941,6 +2941,41 @@ enum wmi_10_4_feature_mask {
+--- a/drivers/net/wireless/ath/ath10k/wmi.h
++++ b/drivers/net/wireless/ath/ath10k/wmi.h
+@@ -2942,6 +2942,41 @@ enum wmi_10_4_feature_mask {
  
  };