You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "anchao (via GitHub)" <gi...@apache.org> on 2023/01/30 03:20:12 UTC

[GitHub] [nuttx] anchao commented on a diff in pull request #8333: net/tcp: reuse common api to replace some ip select code

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


##########
net/netdev/netdev_txnotify.c:
##########
@@ -57,17 +57,9 @@
 #ifdef CONFIG_NET_IPv4
 void netdev_ipv4_txnotify(in_addr_t lipaddr, in_addr_t ripaddr)
 {
-  FAR struct net_driver_s *dev;
-
   /* Find the device driver that serves the subnet of the remote address */
 
-  dev = netdev_findby_ripv4addr(lipaddr, ripaddr);
-  if (dev && dev->d_txavail)
-    {
-      /* Notify the device driver that new TX data is available. */
-
-      dev->d_txavail(dev);
-    }
+  netdev_txnotify_dev(netdev_findby_ripv4addr(lipaddr, ripaddr));

Review Comment:
   Yes, so we can reuse the checking code from netdev_txnotify_dev() and remove the redundant check



-- 
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-unsubscribe@nuttx.apache.org

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