mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2025-02-05 22:33:04 +00:00
ramips: mt7621: bringup dsa master on preinit
DSA requires master netdev to be up before any of its slave ports. Bring it up during preinit so that the first lan port can be used on failsafe. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
This commit is contained in:
parent
838f1fbb50
commit
4d979a4d19
@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
mt7621_bringup_dsa_master() {
|
||||
local board=$(board_name)
|
||||
local masterif
|
||||
|
||||
case "$board" in
|
||||
ubiquiti,edgerouterx|\
|
||||
ubiquiti,edgerouterx-sfp)
|
||||
masterif="dsa"
|
||||
;;
|
||||
*)
|
||||
masterif="eth0"
|
||||
;;
|
||||
esac
|
||||
|
||||
ifconfig $masterif up
|
||||
}
|
||||
|
||||
boot_hook_add preinit_main mt7621_bringup_dsa_master
|
Loading…
Reference in New Issue
Block a user