Skip to content

Bpi-mac-address changes to be merged to main branch - #12

Open
anatar818 wants to merge 18 commits into
mainfrom
develop
Open

Bpi-mac-address changes to be merged to main branch#12
anatar818 wants to merge 18 commits into
mainfrom
develop

Conversation

@anatar818

Copy link
Copy Markdown
Contributor

All our rdk-next is poitint to main branch, hence creating request to pull the changes to main branch

anatar818 and others added 18 commits July 22, 2025 15:01
brlan0 interface MAC ID is changing upon every device reboot , added changes in the existing mac address code to generate  mac address for brlan0 based upon the serial number which is unique same as for other interfaces like wifi0 etc
RDKBACCL-863 : brlan0 interface MAC ID is changing upon every device reboot
Reason for change: Added required interface list to support ctrl and ext
Test procedure: Tested with daisy chain
Risks: None

Signed-off-by: keerthana.p <keerthana_pandurangan@comcast.com>
RDKBACCL-1004 : Need to add logic of wifi constant mac for EM builds
Reason for change:
    Integrating gw_lan_refresh utility for banana pi.
Test Procedure:
    Execute gw_lan_refresh command from the device console and verify that lan ports are refreshing are not.
Risks: None

Signed-off-by: Prabhudas Gannavarapu <prabhudas_gannavarapu@comcast.com>
RDKBACCL-870: Integrating "gw-lan-refresh" utility for banana pi
Reason for change:
    Adding Preceding # for Headings.
Risks: None

Signed-off-by: Prabhudas Gannavarapu <prabhudas_gannavarapu@comcast.com>
RDKBACCL-870: Integrating "gw-lan-refresh" utility for banana pi
…tionality

Reason for change: Add support of BH,iot vap's in InterfaceMap and scripts
Test Procedure: Build successful
Risks: Low

Signed-off-by: keerthana.p <keerthana_pandurangan@comcast.com>
RDKBACCL-1050 : Increment Vap's number and validate the EasyMesh functionality
…cted in brlan0

Reason for change:
    Due to change in ethernet lan interfaces, modified gw_lan_refresh code accordingly.
Test Procedure:
    Execute gw_lan_refresh from the console and verify three lan ports are refreshed or not.
Risks: None

Signed-off-by: Prabhudas Gannavarapu <prabhudas_gannavarapu@comcast.com>
RDKBACCL-1144: LAN IP change via tr181 parameter is not getting reflected in brlan0
band
Reason for change: Added 6g interfaces list in default struct to have
unique macaddress during bootup
Test Procedure: Build successful
Risks: Low

Signed-off-by: keerthana.p <keerthana_pandurangan@comcast.com>
RDKBACCL-771 : Wifi interfaces should have constant unique MAC for 6G
Reason for change:
     Adding required changes to support rfcMgr for BPI
Test Procedure:
     Verify RFC feature is working or not. Feature should work and generate dcmrfc logs.
Risks: None

Signed-off-by: Prabhudas Gannavarapu <prabhudas_gannavarapu@comcast.com>
RDKBACCL-1343: Utilizing rfcmgr for BPI
… in RDK-B

On extender builds (CONFIG_EXTENDER), trigger WPS PBC on the station
AccessPoint.16 interface instead of FH AP.1/AP.2.

Signed-off-by: Somanath Bulusu <bsomanath@plume.com>
RDKBWIFI-388: Add support for onboarding extender using WPS mechanism in RDK-B
Copilot AI review requested due to automatic review settings July 23, 2026 23:11
for (port = CCSP_HAL_ETHSW_EthPort2; port <= max_phy_eth_ports; port++)
{
// Disable the port
DBG_PRINT("%s(): setting admin status down for port %d\n", __FUNCTION__, port);
for (port = CCSP_HAL_ETHSW_EthPort2; port <= max_phy_eth_ports; port++)
{
// Enable the port
DBG_PRINT("%s(): setting admin status up for port %d\n", __FUNCTION__, port);

rbusError_t err = rbus_setBoolean(handle, param, true);
if (err != RBUS_ERROR_SUCCESS) {
DBG_PRINT("Failed to set %s: %d\n", param, err);
if (err != RBUS_ERROR_SUCCESS) {
DBG_PRINT("Failed to set %s: %d\n", param, err);
} else {
DBG_PRINT("Successfully set %s\n", param);
rbusError_t err;
err = rbus_open(&handle, "gw_lan_refresh");
if (err != RBUS_ERROR_SUCCESS) {
DBG_PRINT("Failed to initialize RBus: %d\n", err);
{
if (argc == 2) {
if (strncmp (argv[1], "ethsw", strlen ("ethsw")) == 0) {
DBG_PRINT ("[%s] calling to update ethsw setting \n",argv[0]);
DBG_PRINT ("[%s] calling to update ethsw setting \n",argv[0]);
refresh_external_switch();
}else if (strncmp (argv[1], "wifi", strlen ("wifi")) == 0) {
DBG_PRINT ("[%s] calling to update wifi setting \n",argv[0]);

}
}else {
DBG_PRINT("gw_lan_refresh \n");

Copilot AI left a comment

Copy link
Copy Markdown

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 brings BPI/RDKB-related networking utility updates into main, including new helpers/utilities for MAC retrieval and LAN/WiFi refresh behavior, plus extender-specific WPS handling.

Changes:

  • Added rfc-utils/mtlsUtils helper APIs to fetch base MAC addresses for RDKB builds.
  • Updated rdkb-bpi-mac interface-to-MAC mapping for WiFi (including additional sub-interfaces under _EM_BUILD_).
  • Added a new gw_lan_refresh utility and updated WPS monitor behavior for CONFIG_EXTENDER.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
rfc-utils/mtlsUtils.h New header exposing RDKB MAC helper APIs.
rfc-utils/mtlsUtils.cpp New implementation for fetching/trimming base MAC and logging.
rdkb-bpi-mac/source/main.cpp Updates WiFi interface index mapping and adds _EM_BUILD_ sub-interfaces.
rdk-wps-monitor/source/button_callback.c Adds CONFIG_EXTENDER behavior to trigger station WPS DM path.
gw-lan-refresh/source/gw_lan_refresh.c New utility to refresh LAN switch ports and kick WiFi associations via RBUS.
gw-lan-refresh/Readme Documentation/sample output for the new gw_lan_refresh utility.
Comments suppressed due to low confidence (2)

rfc-utils/mtlsUtils.cpp:67

  • After moving extern "C" to only cover C headers, the closing extern "C" block at the bottom should be removed; otherwise the file ends with an unmatched/incorrect linkage block.
#ifdef __cplusplus
}
#endif

gw-lan-refresh/source/gw_lan_refresh.c:117

  • The else branch for an unrecognized argument is empty, so invalid CLI usage fails silently. Print a short usage message and return a non-zero exit code.
        else {
            
        }

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

Comment thread rfc-utils/mtlsUtils.h
Comment on lines +28 to +42
#ifdef __cplusplus
extern "C" {
#endif

#include <system_utils.h>
#include <urlHelper.h>

#if defined(RDKB_SUPPORT)
std::string getErouterMac();
std::string geteCMMac();
#endif

#ifdef __cplusplus
}
#endif
Comment thread rfc-utils/mtlsUtils.cpp
Comment on lines +23 to +29
#include "ccsp/platform_hal.h"

#ifdef __cplusplus
extern "C" {
#endif

#define BUF_SIZE 64
Comment thread rfc-utils/mtlsUtils.cpp
}
}

RDK_LOG(RDK_LOG_INFO, LOG_RFCMGR, "[%s] Recevied eRouterMac(eSTBMac): %s\n", __FUNCTION__,erouterMac.c_str());
Comment on lines +73 to +77
#ifdef CONFIG_EXTENDER
// Set WPS Push Button for Station Interface
log_message(LOG_INFO, "WPS button pressed on device %s - triggering WPS action for station", device);
set_wps_push_button(handle, "Device.WiFi.AccessPoint.16.WPS.X_CISCO_COM_ActivatePushButton");
#else
Comment on lines +95 to +97
if (err != RBUS_ERROR_SUCCESS) {
DBG_PRINT("Failed to initialize RBus: %d\n", err);
}
Comment thread gw-lan-refresh/Readme
Comment on lines +1 to +5
# Description
This code implements an application to refresh the lan clients connected ports for updating the DHCP configuration.

# Core Functionality
The program is to refresh all the eth ports except the port which is associated with WAN for BPI R4 device. As part of the refresh it will restart wifi clients using "X_CISCO_COM_KickAssocDevices" DM.
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.

7 participants