ath79: mikrotik: add rssileds support for Routerboard 911G and RB912UAG
authorLech Perczak <lech.perczak@gmail.com>
Sat, 18 Nov 2023 15:54:18 +0000 (16:54 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 7 Jan 2024 00:19:56 +0000 (01:19 +0100)
LEDs 1 through 5 are used for RSSI monitoring on factory firmware.
Reflect that by creating appropriate rssileds configuration.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
target/linux/ath79/image/mikrotik.mk
target/linux/ath79/mikrotik/base-files/etc/board.d/01_leds

index 1bd1323f073c570c644a25fdb7f88dda3ba33698..06a2417faae44117d487156cba0fc3dadf658ea4 100644 (file)
@@ -34,6 +34,7 @@ define Device/mikrotik_routerboard-911g-xhpnd
   DEVICE_MODEL := RouterBOARD 911G-2HPnD
   DEVICE_ALT0_VENDOR := Mikrotik
   DEVICE_ALT0_MODEL := RouterBOARD 911G-5HPnD
+  DEVICE_PACKAGES += rssileds
   SUPPORTED_DEVICES += rb-912uag-2hpnd
 endef
 TARGET_DEVICES += mikrotik_routerboard-911g-xhpnd
@@ -44,7 +45,7 @@ define Device/mikrotik_routerboard-912uag-2hpnd
   DEVICE_MODEL := RouterBOARD 912UAG-2HPnD
   DEVICE_ALT0_VENDOR := Mikrotik
   DEVICE_ALT0_MODEL := RouterBOARD 912UAG-5HPnD
-  DEVICE_PACKAGES += kmod-usb-ehci kmod-usb2
+  DEVICE_PACKAGES += kmod-usb-ehci kmod-usb2 rssileds
   SUPPORTED_DEVICES += rb-912uag-2hpnd
 endef
 TARGET_DEVICES += mikrotik_routerboard-912uag-2hpnd
index 66fa2ee6acdf8abc9ab29ffc86b4e6089edca95d..16cb6284451acb23e061547cf45914883d6498ec 100644 (file)
@@ -16,6 +16,15 @@ mikrotik,routerboard-lhg-5nd)
        ucidef_set_led_rssi "rssimediumhigh" "rssimediumhigh" "green:rssimediumhigh" "wlan0" "60" "100"
        ucidef_set_led_rssi "rssihigh" "rssihigh" "green:rssihigh" "wlan0" "80" "100"
        ;;
+mikrotik,routerboard-911g-xhpnd|\
+mikrotik,routerboard-912uag-2hpnd)
+       ucidef_set_rssimon "wlan0" "200000" "1"
+       ucidef_set_led_rssi "rssilow" "rssilow" "green:led1" "wlan0" "1" "100"
+       ucidef_set_led_rssi "rssimediumlow" "rssimediumlow" "green:led2" "wlan0" "20" "100"
+       ucidef_set_led_rssi "rssimedium" "rssimedium" "green:led3" "wlan0" "40" "100"
+       ucidef_set_led_rssi "rssimediumhigh" "rssimediumhigh" "green:led4" "wlan0" "60" "100"
+       ucidef_set_led_rssi "rssihigh" "rssihigh" "green:led5" "wlan0" "80" "100"
+       ;;
 mikrotik,routerboard-750-r2|\
 mikrotik,routerboard-951ui-2hnd|\
 mikrotik,routerboard-951ui-2nd|\