Message ID | 73f5ba4134e621462a26186449400cf0c1ac1730.1663445157.git.daniel@makrotopia.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 47c40fd2440e1e30f13fae3836df4658517813aa |
Delegated to: | Kalle Valo |
Headers | show |
Series | rt2x00: OpenWrt patches improving MT7620 (and more) | expand |
Daniel Golle <daniel@makrotopia.org> wrote: > From: David Bauer <mail@david-bauer.net> > > This adds a (currently missing) throughput LED trigger for the rt2x00 > driver. Previously, LED triggers had to be assigned to the netdev, which > was limited to a single VAP. > > Tested-by: Christoph Krapp <achterin@googlemail.com> > Signed-off-by: David Bauer <mail@david-bauer.net> > Acked-by: Stanislaw Gruszka <stf_xl@wp.pl> This is missing Daniel's s-o-b.
Kalle Valo <kvalo@kernel.org> writes: > Daniel Golle <daniel@makrotopia.org> wrote: > >> From: David Bauer <mail@david-bauer.net> >> >> This adds a (currently missing) throughput LED trigger for the rt2x00 >> driver. Previously, LED triggers had to be assigned to the netdev, which >> was limited to a single VAP. >> >> Tested-by: Christoph Krapp <achterin@googlemail.com> >> Signed-off-by: David Bauer <mail@david-bauer.net> >> Acked-by: Stanislaw Gruszka <stf_xl@wp.pl> > > This is missing Daniel's s-o-b. Otherwise the patchset looked good to me. Daniel, if you can give your s-o-b as a reply to this mail I can then add it during commit.
On Thu, Sep 22, 2022 at 08:00:13AM +0300, Kalle Valo wrote: > Kalle Valo <kvalo@kernel.org> writes: > > > Daniel Golle <daniel@makrotopia.org> wrote: > > > >> From: David Bauer <mail@david-bauer.net> > >> > >> This adds a (currently missing) throughput LED trigger for the rt2x00 > >> driver. Previously, LED triggers had to be assigned to the netdev, which > >> was limited to a single VAP. > >> > >> Tested-by: Christoph Krapp <achterin@googlemail.com> > >> Signed-off-by: David Bauer <mail@david-bauer.net> > >> Acked-by: Stanislaw Gruszka <stf_xl@wp.pl> > > > > This is missing Daniel's s-o-b. > > Otherwise the patchset looked good to me. Daniel, if you can give your > s-o-b as a reply to this mail I can then add it during commit. Signed-off-by: Daniel Golle <daniel@makrotopia.org> Thank you! > > -- > https://patchwork.kernel.org/project/linux-wireless/list/ > > https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c index e95c101c271113..3a035afcf7f99c 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c @@ -1093,6 +1093,19 @@ static void rt2x00lib_remove_hw(struct rt2x00_dev *rt2x00dev) kfree(rt2x00dev->spec.channels_info); } +static const struct ieee80211_tpt_blink rt2x00_tpt_blink[] = { + { .throughput = 0 * 1024, .blink_time = 334 }, + { .throughput = 1 * 1024, .blink_time = 260 }, + { .throughput = 2 * 1024, .blink_time = 220 }, + { .throughput = 5 * 1024, .blink_time = 190 }, + { .throughput = 10 * 1024, .blink_time = 170 }, + { .throughput = 25 * 1024, .blink_time = 150 }, + { .throughput = 54 * 1024, .blink_time = 130 }, + { .throughput = 120 * 1024, .blink_time = 110 }, + { .throughput = 265 * 1024, .blink_time = 80 }, + { .throughput = 586 * 1024, .blink_time = 50 }, +}; + static int rt2x00lib_probe_hw(struct rt2x00_dev *rt2x00dev) { struct hw_mode_spec *spec = &rt2x00dev->spec; @@ -1174,6 +1187,11 @@ static int rt2x00lib_probe_hw(struct rt2x00_dev *rt2x00dev) #undef RT2X00_TASKLET_INIT + ieee80211_create_tpt_led_trigger(rt2x00dev->hw, + IEEE80211_TPT_LEDTRIG_FL_RADIO, + rt2x00_tpt_blink, + ARRAY_SIZE(rt2x00_tpt_blink)); + /* * Register HW. */