Skip to content

RDKBACCL-867: brlan0 not getting ip when switched from bridge mode to… - #277

Open
manigandanj wants to merge 4 commits into
rdkcentral:developfrom
manigandanj:RDKBACCL-867_remove_workaround
Open

RDKBACCL-867: brlan0 not getting ip when switched from bridge mode to…#277
manigandanj wants to merge 4 commits into
rdkcentral:developfrom
manigandanj:RDKBACCL-867_remove_workaround

Conversation

@manigandanj

Copy link
Copy Markdown
Contributor

… router mode in Bananapi

Reason for change: Removing workaround fix.
Test procedure: Tested bridgemode to routermode switching
Risks: None

@manigandanj
manigandanj marked this pull request as draft November 7, 2025 14:09
… router mode in Bananapi

Reason for change: Aligning to latest code. Removing workaround fix.
Test procedure: Tested the transition between bridgemode and routermode.
Risks: None

Signed-off-by: Manigandan Gopalakrishnan <Manigandan_Gopalakrishnan@comcast.com>
@manigandanj
manigandanj force-pushed the RDKBACCL-867_remove_workaround branch from 739a5b0 to 2f6b5dc Compare April 20, 2026 13:48
@manigandanj
manigandanj marked this pull request as ready for review April 30, 2026 12:01
@manigandanj manigandanj changed the title RDKBACCL-867: brlan0 not getting ip when switched from bridge mode to… RDKBDEV-3436, RDKBACCL-867: brlan0 not getting ip when switched from bridge mode to… Apr 30, 2026
@manigandanj manigandanj changed the title RDKBDEV-3436, RDKBACCL-867: brlan0 not getting ip when switched from bridge mode to… RDKBACCL-867: brlan0 not getting ip when switched from bridge mode to… Apr 30, 2026

@cpokuru cpokuru left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change tested with Non MLO build

cpokuru
cpokuru previously approved these changes Aug 6, 2026
Copilot AI lite review requested due to automatic review settings August 7, 2026 13:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates BananaPi bridge/router mode switching to remove a prior workaround for brlan0 not getting an IP when transitioning from bridge mode to router mode, by aligning bridge membership handling and default MultiLAN/L2Net port configuration.

Changes:

  • Update service_bridge_bpi.sh to unconditionally add/remove wifi0/wifi1/wifi2 and mld0 from the LAN bridge during mode transitions.
  • Update bbhm_def_cfg_banana.xml L2Net bridge membership/port definitions to use lan1/lan2/lan3 and wifi0/wifi1/wifi2, and adjust PrimaryLAN_brport accordingly.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
meta-rdk-mtk-bpir4/recipes-ccsp/util/utopia/service_bridge_bpi.sh Adjusts bridge membership changes during start/stop (WiFi + MLD handling) as part of mode switching.
meta-rdk-mtk-bpir4/recipes-ccsp/ccsp/ccsp-psm/bbhm_def_cfg_banana.xml Updates default L2Net/MultiLAN interface membership and bridge port numbering to match BananaPi interface naming.
Suppressed comments (1)

meta-rdk-mtk-bpir4/recipes-ccsp/util/utopia/service_bridge_bpi.sh:635

  • These brctl addif calls are now unconditional. If wifi0/wifi1/wifi2 or mld0 do not exist yet, this will log errors and leave interfaces un-added. Guarding on /sys/class/net/ keeps the new behavior (no iwconfig dependency) while avoiding spurious failures.
  echo "brctl addif $bridge_name wifi0 wifi1 wifi2"
  brctl addif "$bridge_name" wifi0
  brctl addif "$bridge_name" wifi1
  brctl addif "$bridge_name" wifi2
  brctl addif "$bridge_name" mld0

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread meta-rdk-mtk-bpir4/recipes-ccsp/util/utopia/service_bridge_bpi.sh
Copilot AI review requested due to automatic review settings August 10, 2026 02:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Suppressed comments (3)

meta-rdk-mtk-bpir4/recipes-ccsp/util/utopia/service_bridge_bpi.sh:610

  • Unconditionally removing interfaces from the bridge can emit errors (and return non-zero) when wifi0/wifi1/wifi2/mld0 are not yet created. Guard on interface existence (and update the log message to include mld0) to keep bridge transitions robust and logs clean.
  echo "brctl delif $bridge_name wifi0 wifi1 wifi2"
  brctl delif "$bridge_name" wifi0
  brctl delif "$bridge_name" wifi1
  brctl delif "$bridge_name" wifi2
  brctl delif "$bridge_name" mld0

meta-rdk-mtk-bpir4/recipes-ccsp/util/utopia/service_bridge_bpi.sh:635

  • Unconditionally adding interfaces to the bridge can emit errors (and return non-zero) when wifi0/wifi1/wifi2/mld0 are not yet created. Guard on interface existence (and update the log message to include mld0) to keep bridge transitions robust and logs clean.
  echo "brctl addif $bridge_name wifi0 wifi1 wifi2"
  brctl addif "$bridge_name" wifi0
  brctl addif "$bridge_name" wifi1
  brctl addif "$bridge_name" wifi2
  brctl addif "$bridge_name" mld0

meta-rdk-mtk-bpir4/recipes-ccsp/ccsp/ccsp-psm/bbhm_def_cfg_banana.xml:319

  • dmsb.l2net.1.Members.SW is set to a single space, but other empty Members.SW records in this same file are empty (e.g., dmsb.l2net.2.Members.SW). Use an empty value for consistency and to avoid consumers treating whitespace as a value.
  <Record name="dmsb.l2net.1.Members.SW" type="astr"> </Record>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants