mac80211: Update to version 5.4-rc2
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / ath / 930-ath10k_add_tpt_led_trigger.patch
1 --- a/drivers/net/wireless/ath/ath10k/mac.c
2 +++ b/drivers/net/wireless/ath/ath10k/mac.c
3 @@ -8671,6 +8671,21 @@ static int ath10k_mac_init_rd(struct ath
4 return 0;
5 }
6
7 +#ifdef CPTCFG_MAC80211_LEDS
8 +static const struct ieee80211_tpt_blink ath10k_tpt_blink[] = {
9 + { .throughput = 0 * 1024, .blink_time = 334 },
10 + { .throughput = 1 * 1024, .blink_time = 260 },
11 + { .throughput = 2 * 1024, .blink_time = 220 },
12 + { .throughput = 5 * 1024, .blink_time = 190 },
13 + { .throughput = 10 * 1024, .blink_time = 170 },
14 + { .throughput = 25 * 1024, .blink_time = 150 },
15 + { .throughput = 54 * 1024, .blink_time = 130 },
16 + { .throughput = 120 * 1024, .blink_time = 110 },
17 + { .throughput = 265 * 1024, .blink_time = 80 },
18 + { .throughput = 586 * 1024, .blink_time = 50 },
19 +};
20 +#endif
21 +
22 int ath10k_mac_register(struct ath10k *ar)
23 {
24 static const u32 cipher_suites[] = {
25 @@ -8997,6 +9012,12 @@ int ath10k_mac_register(struct ath10k *a
26
27 ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
28
29 +#ifdef CPTCFG_MAC80211_LEDS
30 + ieee80211_create_tpt_led_trigger(ar->hw,
31 + IEEE80211_TPT_LEDTRIG_FL_RADIO, ath10k_tpt_blink,
32 + ARRAY_SIZE(ath10k_tpt_blink));
33 +#endif
34 +
35 ret = ieee80211_register_hw(ar->hw);
36 if (ret) {
37 ath10k_err(ar, "failed to register ieee80211: %d\n", ret);