xiaoxiang781216 commented on code in PR #18031:
URL: https://github.com/apache/nuttx/pull/18031#discussion_r2711118765


##########
include/sys/boardctl.h:
##########
@@ -478,6 +479,14 @@ struct boardioc_reset_cause_s
 };
 #endif
 
+#ifdef CONFIG_BOARDCTL_MACADDR
+struct boardioc_macaddr_s
+{
+  uint8_t ifname[IFNAMSIZ];
+  uint8_t macaddr[RADIO_MAX_ADDRLEN];

Review Comment:
   do you need include some header file?



##########
boards/boardctl.c:
##########
@@ -906,6 +906,25 @@ int boardctl(unsigned int cmd, uintptr_t arg)
         break;
 #endif
 
+#ifdef CONFIG_BOARDCTL_MACADDR
+      /* CMD:           BOARDIOC_MACADDR
+       * DESCRIPTION:   Get the network driver mac address.
+       * ARG:           A pointer to an instance of struct
+       *                boardioc_macaddr_s.
+       * CONFIGURATION: CONFIG_BOARDCTL_MACADDR
+       * DEPENDENCIES:  Board logic must provide board_macaddr()
+       */
+
+      case BOARDIOC_MACADDR:
+        {
+          FAR struct boardioc_macaddr_s *req =
+            (FAR struct boardioc_macaddr_s *)arg;
+
+          ret = board_macaddr((FAR const char *)req->ifname, req->macaddr);

Review Comment:
   ```suggestion
             ret = board_macaddr(req->ifname, req->macaddr);
   ```



##########
include/sys/boardctl.h:
##########
@@ -478,6 +479,14 @@ struct boardioc_reset_cause_s
 };
 #endif
 
+#ifdef CONFIG_BOARDCTL_MACADDR
+struct boardioc_macaddr_s
+{
+  uint8_t ifname[IFNAMSIZ];

Review Comment:
   ```suggestion
     char ifname[IFNAMSIZ];
   ```



-- 
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]

Reply via email to