realtek: use upstream recommendation for secondary CPU start
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / rt2x00 / 612-rt2x00-add-throughput-LED-trigger.patch
1 From 208be6e22eba13408a0a3eb4c02256bc9ddfaf48 Mon Sep 17 00:00:00 2001
2 From: Daniel Golle <daniel@makrotopia.org>
3 Date: Mon, 16 Dec 2019 20:47:06 +0100
4 Subject: [PATCH 02/16] rt2x00: add throughput LED trigger
5 To: linux-wireless@vger.kernel.org,
6 Stanislaw Gruszka <stf_xl@wp.pl>,
7 Helmut Schaa <helmut.schaa@googlemail.com>
8 Cc: Kalle Valo <kvalo@kernel.org>,
9 David S. Miller <davem@davemloft.net>,
10 Eric Dumazet <edumazet@google.com>,
11 Jakub Kicinski <kuba@kernel.org>,
12 Paolo Abeni <pabeni@redhat.com>,
13 Johannes Berg <johannes.berg@intel.com>
14
15 From: David Bauer <mail@david-bauer.net>
16
17 This adds a (currently missing) throughput LED trigger for the rt2x00
18 driver. Previously, LED triggers had to be assigned to the netdev, which
19 was limited to a single VAP.
20
21 Tested-by: Christoph Krapp <achterin@googlemail.com>
22 Signed-off-by: David Bauer <mail@david-bauer.net>
23 ---
24 drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | 18 ++++++++++++++++++
25 1 file changed, 18 insertions(+)
26
27 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
28 +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
29 @@ -1125,6 +1125,19 @@ static void rt2x00lib_remove_hw(struct r
30 kfree(rt2x00dev->spec.channels_info);
31 }
32
33 +static const struct ieee80211_tpt_blink rt2x00_tpt_blink[] = {
34 + { .throughput = 0 * 1024, .blink_time = 334 },
35 + { .throughput = 1 * 1024, .blink_time = 260 },
36 + { .throughput = 2 * 1024, .blink_time = 220 },
37 + { .throughput = 5 * 1024, .blink_time = 190 },
38 + { .throughput = 10 * 1024, .blink_time = 170 },
39 + { .throughput = 25 * 1024, .blink_time = 150 },
40 + { .throughput = 54 * 1024, .blink_time = 130 },
41 + { .throughput = 120 * 1024, .blink_time = 110 },
42 + { .throughput = 265 * 1024, .blink_time = 80 },
43 + { .throughput = 586 * 1024, .blink_time = 50 },
44 +};
45 +
46 static int rt2x00lib_probe_hw(struct rt2x00_dev *rt2x00dev)
47 {
48 struct hw_mode_spec *spec = &rt2x00dev->spec;
49 @@ -1206,6 +1219,11 @@ static int rt2x00lib_probe_hw(struct rt2
50
51 #undef RT2X00_TASKLET_INIT
52
53 + ieee80211_create_tpt_led_trigger(rt2x00dev->hw,
54 + IEEE80211_TPT_LEDTRIG_FL_RADIO,
55 + rt2x00_tpt_blink,
56 + ARRAY_SIZE(rt2x00_tpt_blink));
57 +
58 /*
59 * Register HW.
60 */