anchao commented on code in PR #7768:
URL: https://github.com/apache/nuttx/pull/7768#discussion_r1038956488


##########
include/nuttx/net/netdev.h:
##########
@@ -157,17 +157,12 @@
 #  define NETDEV_ERRORS(dev)
 #endif
 
-/* There are some helper pointers for accessing the contents of the Ethernet
- * headers
- */
-
-#define ETHBUF ((FAR struct eth_hdr_s *)&dev->d_buf[0])
-
 /* There are some helper pointers for accessing the contents of the IP
  * headers
  */
 
-#define IPBUF(hl) ((FAR void *)&dev->d_buf[NET_LL_HDRLEN(dev) + (hl)])
+#define IPBUF(hl) ((FAR void *)\
+                   &dev->d_iob->io_data[CONFIG_NET_LL_GUARDSIZE + (hl)])
 
 #define IPv4BUF ((FAR struct ipv4_hdr_s *)IPBUF(0))
 #define IPv6BUF ((FAR struct ipv6_hdr_s *)IPBUF(0))

Review Comment:
   IPv4BUF/IPv6BUF/IPBUF are referenced by other directories



-- 
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: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to