-
Notifications
You must be signed in to change notification settings - Fork 1.5k
boards/boardctl: Add BOARDIOC_NET_GETMAC command #18031
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
13627105546
wants to merge
1
commit into
apache:master
Choose a base branch
from
13627105546:topic/netinit-wifimac
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+67
−1
Conversation
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
jerpelea
previously approved these changes
Jan 20, 2026
e979139 to
e97eee7
Compare
jerpelea
previously approved these changes
Jan 20, 2026
e97eee7 to
2078d72
Compare
8d1a92a to
f4cfe96
Compare
xiaoxiang781216
previously approved these changes
Jan 20, 2026
f4cfe96 to
0cd5410
Compare
xiaoxiang781216
requested changes
Jan 21, 2026
0cd5410 to
46010d1
Compare
This commit adds a new boardctl command BOARDIOC_MACADDR to retrieve the MAC address of the network interface. The board_macaddr function needs to be implemented by the board logic. Signed-off-by: daichuan <daichuan@xiaomi.com>
46010d1 to
7bdef73
Compare
| struct boardioc_macaddr_s | ||
| { | ||
| FAR const char *ifname; | ||
| FAR uint8_t *mac; |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chnage to macaddr[RADIO_MAX_ADDRLEN]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area: Documentation
Improvements or additions to documentation
Area: OS Components
OS Components issues
Size: S
The size of the change in this PR is small
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.
This commit adds a new boardctl command BOARDIOC_NET_GETMAC to retrieve the MAC address of the network interface. The board_get_netmac function needs to be implemented by the board logic.
Note: Please adhere to Contributing Guidelines.
Summary
This PR introduces a new boardctl command BOARDIOC_NET_GETMAC to allow applications (like netinit ) to retrieve the network interface MAC address from the board-specific logic.
Why In some embedded scenarios, the MAC address (especially for Wi-Fi) is stored in board-specific storage (e.g., OTP, NVM, or a config file) and needs to be retrieved by the network initialization logic at runtime. Currently, there is no standard boardctl command for this purpose.
Impact
Testing