From 7bf6b5972419d95745b894bf86a20de45883ca7f Mon Sep 17 00:00:00 2001 From: David Bauer Date: Sat, 2 Feb 2019 00:34:43 +0100 Subject: ramips: various Netgear R6120 fixes The R6120 has no 5GHz WLAN LED, the assigned GPIO in fact controls the WAN LED. Renames the LED accordingly in the device-tree. Removes the 5GHz WLAN LED trigger. Adds the correct WAN port LED trigger. ---- Currently, the MAC address for the Netgear R6120 is read from the NVRAM partition. The offset for the MAC address however is not consistent across devices or firmware versions. Switch to using the factory partition like all other Netgear devices do. ---- The LAN ports of the R6120 are labled in reverse on the casing. Adjust LuCI switchport numbering accordingly. ---- The WiFi eeprom offsets for the R6120 are currently wrong (5GHz offset is bigger than the partition itself). Fixes poor performance on 2.4 and 5 GHz. Signed-off-by: David Bauer --- target/linux/ramips/base-files/etc/board.d/01_leds | 2 +- target/linux/ramips/base-files/etc/board.d/02_network | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'target/linux/ramips/base-files') diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index 4e2d534c99..f19d6be6e8 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -252,8 +252,8 @@ mzk-ex750np) ;; netgear,r6120) ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x0f" + ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x10" ucidef_set_led_wlan "wlan2g" "WiFi 2.4GHz" "$boardname:green:wlan2g" "phy0tpt" - ucidef_set_led_wlan "wlan5g" "WiFi 5GHz" "$boardname:green:wlan5g" "phy1tpt" ;; oy-0001) set_wifi_led "$boardname:green:wifi" diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index d84e738e89..fca3398f2d 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -108,7 +108,6 @@ ramips_setup_interfaces() mtc,wr1201|\ mzk-750dhp|\ mzk-w300nh2|\ - netgear,r6120|\ nixcore-x1-8M|\ nixcore-x1-16M|\ oy-0001|\ @@ -341,6 +340,10 @@ ramips_setup_interfaces() "0:lan" "1:lan" "2:lan" "3:lan" "6t@eth0" ucidef_set_interface_wan "usb0" ;; + netgear,r6120) + ucidef_add_switch "switch0" \ + "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan" "6@eth0" + ;; hc5761) ucidef_add_switch "switch0" \ "1:lan" "4:lan" "0:wan" "6@eth0" -- cgit v1.2.3