RDKBACCL-1940 : Firmware Upgrade is not working - #10
Merged
Conversation
Refactor MAC command to use dynamic interface name from wan_name.txt.
Removed unused variable 'path' from fwupgrade_hal.c
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the firmware-upgrade Xconf fetch path to derive the WAN interface name dynamically (via /nvram/wan_name.txt) instead of relying on a fixed interface, so the device MAC can be determined correctly for the Xconf request.
Changes:
- Remove the hardcoded interface-based MAC lookup macro.
- Add logic to read the WAN interface name from
/nvram/wan_name.txtand build the MAC lookup command dynamically.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
cpokuru
reviewed
Jul 23, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (2)
source/fwupgrade/fwupgrade_hal.c:841
- The interface name read from
sysevent get current_wan_ifnameis only trimmed for\n. If the output includes a trailing\r(CRLF), it will remain and can cause the subsequent ifconfig call to fail. Trim both\rand\n.
g_virtualIfName[strcspn(g_virtualIfName, "\n")] = '\0';
source/fwupgrade/fwupgrade_hal.c:830
- The interface name read from
/nvram/wan_name.txtis only trimmed for\n. If the file uses CRLF line endings, a trailing\rwill remain and break the ifname used later. Trim both\rand\n.
This issue also appears on line 841 of the same file.
g_virtualIfName[strcspn(g_virtualIfName, "\n")] = '\0';
cpokuru
requested changes
Jul 30, 2026
cpokuru
approved these changes
Aug 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Configurable WAN Feature requires dynamic wan details to be fetched from the respective file which contains the details