File tree Expand file tree Collapse file tree 4 files changed +45
-1
lines changed
Expand file tree Collapse file tree 4 files changed +45
-1
lines changed Original file line number Diff line number Diff line change @@ -5322,6 +5322,14 @@ config BOARDCTL_START_CPU
53225322 Architecture specific logic must provide the board_start_cpu()
53235323 interface.
53245324
5325+ config BOARDCTL_NET_GETMAC
5326+ bool "Get network MAC address"
5327+ default n
5328+ ---help---
5329+ Enables support for the BOARDIOC_NET_GETMAC boardctl() command.
5330+ Architecture specific logic must provide the board_get_netmac()
5331+ interface.
5332+
53255333config BOARDCTL_IOCTL
53265334 bool "Board-specific boardctl() commands"
53275335 default n
Original file line number Diff line number Diff line change @@ -906,6 +906,21 @@ int boardctl(unsigned int cmd, uintptr_t arg)
906906 break ;
907907#endif
908908
909+ #ifdef CONFIG_BOARDCTL_NET_GETMAC
910+ /* CMD: BOARDIOC_NET_GETMAC
911+ * DESCRIPTION: Get the network driver mac address.
912+ * ARG: The mac address.
913+ * CONFIGURATION: CONFIG_BOARDCTL_NET_GETMAC
914+ * DEPENDENCIES: Board logic must provide board_get_netmac()
915+ */
916+
917+ case BOARDIOC_NET_GETMAC :
918+ {
919+ ret = board_get_netmac (0 , (FAR uint8_t * )arg );
920+ }
921+ break ;
922+ #endif
923+
909924 default :
910925 {
911926#ifdef CONFIG_BOARDCTL_IOCTL
Original file line number Diff line number Diff line change @@ -635,6 +635,26 @@ void board_autoled_off(int led);
635635# define board_autoled_off (led )
636636#endif
637637
638+ /****************************************************************************
639+ * Name: board_get_netmac
640+ *
641+ * Description:
642+ * Get the network driver mac address.
643+ *
644+ * Input Parameters:
645+ * iface - The interface index.
646+ * mac - The mac address.
647+ *
648+ * Returned Value:
649+ * Zero (OK) is returned on success; a negated errno value is returned on
650+ * any failure.
651+ *
652+ ****************************************************************************/
653+
654+ #ifdef CONFIG_BOARDCTL_NET_GETMAC
655+ int board_get_netmac (int iface , FAR uint8_t * mac );
656+ #endif
657+
638658/****************************************************************************
639659 * Name: board_userled_initialize
640660 *
Original file line number Diff line number Diff line change 216216#define BOARDIOC_RESET_CAUSE _BOARDIOC(0x0015)
217217#define BOARDIOC_IRQ_AFFINITY _BOARDIOC(0x0016)
218218#define BOARDIOC_START_CPU _BOARDIOC(0x0017)
219+ #define BOARDIOC_NET_GETMAC _BOARDIOC(0x0018)
219220
220221/* If CONFIG_BOARDCTL_IOCTL=y, then board-specific commands will be support.
221222 * In this case, all commands not recognized by boardctl() will be forwarded
224225 * User defined board commands may begin with this value:
225226 */
226227
227- #define BOARDIOC_USER _BOARDIOC(0x0018 )
228+ #define BOARDIOC_USER _BOARDIOC(0x0019 )
228229
229230/****************************************************************************
230231 * Public Type Definitions
You can’t perform that action at this time.
0 commit comments