]> git.ipfire.org Git - thirdparty/openwrt.git/commit
realtek: rtl931x: fix setting number of leds per port 19241/head
authorJonas Jelonek <jelonek.jonas@gmail.com>
Wed, 18 Jun 2025 21:40:03 +0000 (21:40 +0000)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 13 Jul 2025 14:47:42 +0000 (16:47 +0200)
commit6432b411805fad2e35ad2f3726bcb9d4cd58ce89
treeedb7e692753d3345df33b0e5864135dd97f12f05
parent655eb05699975fff2e1df96bf80cb284d3215ec3
realtek: rtl931x: fix setting number of leds per port

In rtl931x_led_init, the number of leds per port is not properly set. It
currently uses a hardcoded value of 1 which seems to be taken initially
from a specific device. This hardcoded value assumes any port always has
exactly two leds.

The RTL930x variant - rtl930x_led_init - does a better job at this. So
take it and use it for RTL931x too with the corresponding register.
While at it, rename the function to a proper naming scheme.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19241
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c