ramips: explicitly disable built-in switch for lan-only devices
authorSungbo Eo <mans0n@gorani.run>
Sat, 25 Apr 2020 09:11:12 +0000 (18:11 +0900)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Mon, 27 Apr 2020 20:54:51 +0000 (22:54 +0200)
Commit 8f6334eb947a ("ramips: explicitly disable built-in switch when needed")
did not fix rt288x and rt3883 devices. This patch deals with them.

While at it, consolidate duplicate cases in interface setup.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
target/linux/ramips/rt288x/base-files/etc/board.d/02_network
target/linux/ramips/rt305x/base-files/etc/board.d/02_network
target/linux/ramips/rt3883/base-files/etc/board.d/02_network

index 0cc0e0b28b6989403b3fdb0ab703914d81786868..a769bdbc43c0276b76ef7d943b316a9b5f591a78 100755 (executable)
@@ -26,6 +26,8 @@ ramips_setup_interfaces()
                ;;
        buffalo,wli-tx4-ag300n|\
        dlink,dap-1522-a1)
+               ucidef_add_switch "switch0"
+               ucidef_add_switch_attr "switch0" "enable" "false"
                ucidef_set_interface_lan "eth0"
                ;;
        *)
index d6ba16f7a8b2cb20717940e215a4673586657aeb..5f18aa98f531538a9724db32d4fb026a0ea32c8f 100755 (executable)
@@ -48,6 +48,7 @@ ramips_setup_interfaces()
        hame,mpr-a2|\
        hauppauge,broadway|\
        hootoo,ht-tm02|\
+       huawei,d105|\
        intenso,memory2move|\
        netgear,wnce2001|\
        tenda,3g150b|\
@@ -109,11 +110,6 @@ ramips_setup_interfaces()
                ucidef_add_switch "switch0" \
                        "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan:5" "6@eth0"
                ;;
-       huawei,d105)
-               ucidef_add_switch "switch0"
-               ucidef_add_switch_attr "switch0" "enable" "false"
-               ucidef_set_interface_lan "eth0"
-               ;;
        huawei,hg255d)
                ucidef_add_switch "switch0" \
                        "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "0:wan" "6@eth0"
index 873c72cea39fd8468ca40dc2bdaa869a54576ad5..5f364cfc0f481cc540072c23f13c367a623aac4a 100755 (executable)
@@ -27,6 +27,8 @@ ramips_setup_interfaces()
                ;;
        loewe,wmdr-143n|\
        omnima,hpm)
+               ucidef_add_switch "switch0"
+               ucidef_add_switch_attr "switch0" "enable" "false"
                ucidef_set_interface_lan "eth0"
                ;;
        samsung,cy-swr1100)