summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuxiao Zhang <yuxiaozhang@google.com>2025-08-26 00:28:08 +0300
committerYuxiao Zhang <yuxiaozhang@google.com>2025-08-26 21:44:04 +0300
commita8a08aaa5117fc6b7a295b75d5d9117dbe370ba6 (patch)
treebf29c3c00bdef8412b9eeb00176847d27e132e51
parent176a0992cdc8b0a11a376ceb479e2b7fb03f2dc5 (diff)
downloadopenbmc-a8a08aaa5117fc6b7a295b75d5d9117dbe370ba6.tar.xz
meta-google: usb-network: add standard l2 bridge dev
Tested: links a correctly setup and bridged: 15: gusbem1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master l2br state UP mode DEFAULT group default qlen 1000 link/ether aa:53:c8:4b:be:05 brd ff:ff:ff:ff:ff:ff 16: enu1u5u1u3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master l2br state UNKNOWN mode DEFAULT group default qlen 1000 link/ether d6:c5:4e:6b:eb:e9 brd ff:ff:ff:ff:ff:ff 18: enu1u3u1u3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master l2br state UNKNOWN mode DEFAULT group default qlen 1000 link/ether 4a:1a:97:b1:79:1e brd ff:ff:ff:ff:ff:ff Change-Id: Ia426d520e29c1d8bacf152ae445eb504e2930b45 Signed-off-by: Yuxiao Zhang <yuxiaozhang@google.com>
-rwxr-xr-xmeta-google/recipes-google/networking/google-usb-network/usb_network.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/meta-google/recipes-google/networking/google-usb-network/usb_network.sh b/meta-google/recipes-google/networking/google-usb-network/usb_network.sh
index 6b5f505e00..46956eeb25 100755
--- a/meta-google/recipes-google/networking/google-usb-network/usb_network.sh
+++ b/meta-google/recipes-google/networking/google-usb-network/usb_network.sh
@@ -64,6 +64,16 @@ Cost=85
EOF
fi
+ # Add standard l2 bridge configuration if this is a relevant device
+ if (( ID_VENDOR == 0x18d1 && ID_PRODUCT == 0x22c )); then
+ cat >>/run/systemd/network/+-bmc-"${IFACE_NAME}".network <<EOF
+[Network]
+Bridge=l2br
+[Bridge]
+Cost=85
+EOF
+ fi
+
# Ignore any failures due to systemd being unavailable at boot
# shellcheck disable=SC2119
gbmc_net_networkd_reload || true