acassis commented on code in PR #12612:
URL: https://github.com/apache/nuttx/pull/12612#discussion_r1662940200


##########
arch/xtensa/src/esp32/esp32_openeth.c:
##########
@@ -772,21 +468,14 @@ int esp32_openeth_initialize(void)
       abort();
     }
 
-  /* Get the interface structure associated with this interface number. */
+  /* Initialize the driver structure */
 
-  priv = &g_openeth;
+  memset(priv, 0, sizeof(struct openeth_priv_s));
 
-  /* Initialize the driver structure */
+  dev->ops = &g_ops;
 
-  memset(priv, 0, sizeof(struct openeth_driver_s));
-  priv->dev.d_ifup = openeth_ifup;       /* I/F up (new IP address) callback */
-  priv->dev.d_ifdown = openeth_ifdown;   /* I/F down callback */
-  priv->dev.d_txavail = openeth_txavail; /* New TX data callback */
-#ifdef CONFIG_NET_MCASTGROUP
-  priv->dev.d_addmac = openeth_addmac; /* Add multicast MAC address */
-  priv->dev.d_rmmac = openeth_rmmac;   /* Remove multicast MAC address */
-#endif
-  priv->dev.d_private = priv; /* Used to recover private state from dev */
+  dev->quota[NETPKT_TX] = 1;
+  dev->quota[NETPKT_RX] = 1;

Review Comment:
   Why to hard-code quota to 1? Please include some comments here



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