From 7ec07255339cd7daa9dc05794df120fc64650b31 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 28 May 2015 19:28:41 -0600 Subject: [PATCH 1/2] Missed a couple of function headers --- net/devif/devif.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/net/devif/devif.h b/net/devif/devif.h index 63d3e04b270..d13d9fa83e7 100644 --- a/net/devif/devif.h +++ b/net/devif/devif.h @@ -375,12 +375,45 @@ uint16_t devif_callback_execute(FAR struct net_driver_s *dev, FAR void *pvconn, void devif_send(FAR struct net_driver_s *dev, FAR const void *buf, int len); +/**************************************************************************** + * Name: devif_iob_send + * + * Description: + * Called from socket logic in response to a xmit or poll request from the + * the network interface driver. + * + * This is identical to calling devif_send() except that the data is + * in an I/O buffer chain, rather than a flat buffer. + * + * Assumptions: + * Called from the interrupt level or, at a minimum, with interrupts + * disabled. + * + ****************************************************************************/ + #ifdef CONFIG_NET_IOB struct iob_s; void devif_iob_send(FAR struct net_driver_s *dev, FAR struct iob_s *buf, unsigned int len, unsigned int offset); #endif +/**************************************************************************** + * Name: devif_pkt_send + * + * Description: + * Called from socket logic in order to send a raw packet in response to + * an xmit or poll request from the the network interface driver. + * + * This is almost identical to calling devif_send() except that the data to + * be sent is copied into dev->d_buf (vs. dev->d_appdata), since there is + * no header on the data. + * + * Assumptions: + * Called from the interrupt level or, at a minimum, with interrupts + * disabled. + * + ****************************************************************************/ + #ifdef CONFIG_NET_PKT void devif_pkt_send(FAR struct net_driver_s *dev, FAR const void *buf, unsigned int len); From 0595d54470b56e6e79df5150bf23325b3f8093ea Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 28 May 2015 19:44:04 -0600 Subject: [PATCH 2/2] Correct some comments --- net/devif/devif.h | 10 ++-------- net/devif/devif_callback.c | 10 ++-------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/net/devif/devif.h b/net/devif/devif.h index d13d9fa83e7..620715a3255 100644 --- a/net/devif/devif.h +++ b/net/devif/devif.h @@ -282,8 +282,6 @@ void devif_initialize(void); * * Description: * Configure the pre-allocated callback structures into a free list. - * This is called internally as part of uIP initialization and should not - * be accessed from the application or socket layer. * * Assumptions: * This function is called with interrupts disabled. @@ -297,8 +295,6 @@ void devif_callback_init(void); * * Description: * Allocate a callback container from the free list. - * This is called internally as part of uIP initialization and should not - * be accessed from the application or socket layer. * * Assumptions: * This function is called with interrupts disabled. @@ -312,8 +308,6 @@ FAR struct devif_callback_s *devif_callback_alloc(FAR struct devif_callback_s ** * * Description: * Return a callback container to the free list. - * This is called internally as part of uIP initialization and should not - * be accessed from the application or socket layer. * * Assumptions: * This function is called with interrupts disabled. @@ -328,8 +322,6 @@ void devif_callback_free(FAR struct devif_callback_s *cb, * * Description: * Execute a list of callbacks. - * This is called internally as part of uIP initialization and should not - * be accessed from the application or socket layer. * * Input parameters: * dev - The network device state structure associated with the network @@ -337,6 +329,8 @@ void devif_callback_free(FAR struct devif_callback_s *cb, * pvconn - Holds a reference to the TCP connection structure or the UDP * port structure. May be NULL if the even is not related to a TCP * connection or UDP port. + * flags - The bit set of events to be notified. + * list - The list to traverse in performing the notifications * * Returned value: * The updated flags as modified by the callback functions. diff --git a/net/devif/devif_callback.c b/net/devif/devif_callback.c index 4371aad2c77..3d87b5b1883 100644 --- a/net/devif/devif_callback.c +++ b/net/devif/devif_callback.c @@ -71,8 +71,6 @@ static FAR struct devif_callback_s *g_cbfreelist = NULL; * * Description: * Configure the pre-allocated callback structures into a free list. - * This is called internally as part of uIP initialization and should not - * be accessed from the application or socket layer. * * Assumptions: * This function is called with interrupts disabled. @@ -94,8 +92,6 @@ void devif_callback_init(void) * * Description: * Allocate a callback container from the free list. - * This is called internally as part of uIP initialization and should not - * be accessed from the application or socket layer. * * Assumptions: * This function is called with interrupts disabled. @@ -146,8 +142,6 @@ FAR struct devif_callback_s *devif_callback_alloc(FAR struct devif_callback_s ** * * Description: * Return a callback container to the free list. - * This is called internally as part of uIP initialization and should not - * be accessed from the application or socket layer. * * Assumptions: * This function is called with interrupts disabled. @@ -213,8 +207,6 @@ void devif_callback_free(FAR struct devif_callback_s *cb, * * Description: * Execute a list of callbacks. - * This is called internally as part of uIP initialization and should not - * be accessed from the application or socket layer. * * Input parameters: * dev - The network device state structure associated with the network @@ -222,6 +214,8 @@ void devif_callback_free(FAR struct devif_callback_s *cb, * pvconn - Holds a reference to the TCP connection structure or the UDP * port structure. May be NULL if the even is not related to a TCP * connection or UDP port. + * flags - The bit set of events to be notified. + * list - The list to traverse in performing the notifications * * Returned value: * The updated flags as modified by the callback functions.