13627105546 opened a new pull request, #18031: URL: https://github.com/apache/nuttx/pull/18031
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](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).* ## 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. - Add BOARDIOC_NET_GETMAC definition in include/sys/boardctl.h . - Add board_get_netmac function prototype in include/nuttx/board.h . - Implement dispatch logic for BOARDIOC_NET_GETMAC in boards/boardctl.c . ## Impact - Users : No direct impact unless BOARDIOC_NET_GETMAC is used. - Compatibility : Backward compatible. ## Testing - Verified compilation with valid board configuration. - Used by the companion PR in nuttx-apps (PR #3315) to fetch Wi-Fi MAC address. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
