firmware-utils: mkfwimage: fix more errors
[openwrt/openwrt.git] / package / kernel / ath10k-ct / patches / 202-ath10k-4.16-use-tpt-trigger-by-default.patch
1 From 79c9d7aabae1d1da9eea97d83b61e1517a8a2221 Mon Sep 17 00:00:00 2001
2 From: Mathias Kresin <dev@kresin.me>
3 Date: Fri, 22 Jun 2018 18:59:44 +0200
4 Subject: [PATCH] ath10k: use tpt LED trigger by default
5
6 Use the tpt LED trigger for each created phy led. Ths way LEDs attached
7 to the ath10k GPIO pins are indicating the phy status and blink on
8 traffic.
9
10 Signed-off-by: Mathias Kresin <dev@kresin.me>
11 ---
12 ath10k-4.16/core.h | 4 ++++
13 ath10k-4.16/leds.c | 4 +---
14 ath10k-4.16/mac.c | 2 +-
15 3 files changed, 6 insertions(+), 4 deletions(-)
16
17 --- a/ath10k-4.19/core.h
18 +++ b/ath10k-4.19/core.h
19 @@ -1487,6 +1487,10 @@ struct ath10k {
20 u8 csi_data[4096];
21 u16 csi_data_len;
22
23 +#ifdef CPTCFG_MAC80211_LEDS
24 + const char *led_default_trigger;
25 +#endif
26 +
27 /* must be last */
28 u8 drv_priv[0] __aligned(sizeof(void *));
29 };
30 --- a/ath10k-4.19/leds.c
31 +++ b/ath10k-4.19/leds.c
32 @@ -81,9 +81,7 @@ int ath10k_leds_register(struct ath10k *
33
34 ar->leds.cdev.name = ar->leds.label;
35 ar->leds.cdev.brightness_set_blocking = ath10k_leds_set_brightness_blocking;
36 -
37 - /* FIXME: this assignment doesn't make sense as it's NULL, remove it? */
38 - ar->leds.cdev.default_trigger = ar->leds.wifi_led.default_trigger;
39 + ar->leds.cdev.default_trigger = ar->led_default_trigger;
40
41 ret = led_classdev_register(wiphy_dev(ar->hw->wiphy), &ar->leds.cdev);
42 if (ret)
43 --- a/ath10k-4.19/mac.c
44 +++ b/ath10k-4.19/mac.c
45 @@ -9963,7 +9963,7 @@ int ath10k_mac_register(struct ath10k *a
46 wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
47
48 #ifdef CPTCFG_MAC80211_LEDS
49 - ieee80211_create_tpt_led_trigger(ar->hw,
50 + ar->led_default_trigger = ieee80211_create_tpt_led_trigger(ar->hw,
51 IEEE80211_TPT_LEDTRIG_FL_RADIO, ath10k_tpt_blink,
52 ARRAY_SIZE(ath10k_tpt_blink));
53 #endif
54 --- a/ath10k-5.2/core.h
55 +++ b/ath10k-5.2/core.h
56 @@ -1538,6 +1538,10 @@ struct ath10k {
57 u8 csi_data[4096];
58 u16 csi_data_len;
59
60 +#ifdef CPTCFG_MAC80211_LEDS
61 + const char *led_default_trigger;
62 +#endif
63 +
64 /* must be last */
65 u8 drv_priv[0] __aligned(sizeof(void *));
66 };
67 --- a/ath10k-5.2/leds.c
68 +++ b/ath10k-5.2/leds.c
69 @@ -81,9 +81,7 @@ int ath10k_leds_register(struct ath10k *
70
71 ar->leds.cdev.name = ar->leds.label;
72 ar->leds.cdev.brightness_set_blocking = ath10k_leds_set_brightness_blocking;
73 -
74 - /* FIXME: this assignment doesn't make sense as it's NULL, remove it? */
75 - ar->leds.cdev.default_trigger = ar->leds.wifi_led.default_trigger;
76 + ar->leds.cdev.default_trigger = ar->led_default_trigger;
77
78 ret = led_classdev_register(wiphy_dev(ar->hw->wiphy), &ar->leds.cdev);
79 if (ret)
80 --- a/ath10k-5.2/mac.c
81 +++ b/ath10k-5.2/mac.c
82 @@ -10163,7 +10163,7 @@ int ath10k_mac_register(struct ath10k *a
83 ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
84
85 #ifdef CPTCFG_MAC80211_LEDS
86 - ieee80211_create_tpt_led_trigger(ar->hw,
87 + ar->led_default_trigger = ieee80211_create_tpt_led_trigger(ar->hw,
88 IEEE80211_TPT_LEDTRIG_FL_RADIO, ath10k_tpt_blink,
89 ARRAY_SIZE(ath10k_tpt_blink));
90 #endif