From fce2a79abd27aa3b55f36445c09ff6a169c43081 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 27 Jun 2014 16:48:12 -0600 Subject: [PATCH] Rename uip_driver_s net_driver_s --- Documentation/NuttX.png | Bin 4961 -> 4960 bytes Documentation/NuttX2-b.png | Bin 1559 -> 1558 bytes Documentation/NuttX2.png | Bin 3441 -> 3440 bytes Documentation/NuttX320.png | Bin 4151 -> 4150 bytes Documentation/NuttXScreenShot.jpg | Bin 5872 -> 5870 bytes Documentation/NuttxPortingGuide.html | 4 +- Documentation/acronyms.txt | 86 +++++++++++------------ arch/arm/src/c5471/c5471_ethernet.c | 32 ++++----- arch/arm/src/kinetis/kinetis_enet.c | 26 +++---- arch/arm/src/lpc17xx/lpc17_ethernet.c | 26 +++---- arch/arm/src/sam34/sam_emac.c | 38 +++++----- arch/arm/src/sama5/sam_emaca.c | 38 +++++----- arch/arm/src/sama5/sam_emacb.c | 38 +++++----- arch/arm/src/sama5/sam_gmac.c | 38 +++++----- arch/arm/src/stm32/stm32_eth.c | 36 +++++----- arch/arm/src/tiva/tiva_ethernet.c | 26 +++---- arch/hc/src/m9s12/m9s12_ethernet.c | 26 +++---- arch/mips/src/pic32mx/pic32mx-ethernet.c | 26 +++---- arch/sim/src/up_uipdriver.c | 4 +- arch/z80/src/common/up_internal.h | 2 +- arch/z80/src/ez80/ez80_emac.c | 28 ++++---- drivers/net/cs89x0.c | 24 +++---- drivers/net/dm90x0.c | 26 +++---- drivers/net/e1000.c | 26 +++---- drivers/net/enc28j60.c | 26 +++---- drivers/net/encx24j600.c | 30 ++++---- drivers/net/skeleton.c | 26 +++---- drivers/net/slip.c | 26 +++---- drivers/net/vnet.c | 26 +++---- include/nuttx/net/arp.h | 6 +- include/nuttx/net/cs89x0.h | 2 +- include/nuttx/net/igmp.h | 6 +- include/nuttx/net/net.h | 8 +-- include/nuttx/net/netdev.h | 36 +++++----- include/nuttx/net/pkt.h | 4 +- include/nuttx/net/tcp.h | 2 +- include/nuttx/net/udp.h | 2 +- include/nuttx/net/uip.h | 4 +- net/README.txt | 76 ++++++++++---------- net/arp/arp_inout.c | 6 +- net/connect.c | 4 +- net/getsockname.c | 2 +- net/icmp/icmp.h | 6 +- net/icmp/icmp_input.c | 2 +- net/icmp/icmp_ping.c | 2 +- net/icmp/icmp_poll.c | 2 +- net/icmp/icmp_send.c | 2 +- net/igmp/igmp.h | 18 ++--- net/igmp/igmp_group.c | 8 +-- net/igmp/igmp_initialize.c | 2 +- net/igmp/igmp_input.c | 2 +- net/igmp/igmp_join.c | 2 +- net/igmp/igmp_leave.c | 2 +- net/igmp/igmp_mcastmac.c | 4 +- net/igmp/igmp_poll.c | 4 +- net/igmp/igmp_send.c | 2 +- net/net_close.c | 2 +- net/net_poll.c | 2 +- net/net_sendfile.c | 4 +- net/netdev/netdev.h | 6 +- net/netdev/netdev_carrier.c | 4 +- net/netdev/netdev_count.c | 2 +- net/netdev/netdev_findbyaddr.c | 8 +-- net/netdev/netdev_findbyname.c | 4 +- net/netdev/netdev_foreach.c | 2 +- net/netdev/netdev_ioctl.c | 12 ++-- net/netdev/netdev_register.c | 4 +- net/netdev/netdev_rxnotify.c | 2 +- net/netdev/netdev_txnotify.c | 2 +- net/netdev/netdev_unregister.c | 6 +- net/pkt/pkt.h | 4 +- net/pkt/pkt_callback.c | 2 +- net/pkt/pkt_input.c | 2 +- net/pkt/pkt_poll.c | 2 +- net/pkt/pkt_send.c | 4 +- net/recvfrom.c | 20 +++--- net/route/netdev_router.c | 8 +-- net/route/route.h | 6 +- net/sendto.c | 2 +- net/tcp/tcp.h | 20 +++--- net/tcp/tcp_appsend.c | 4 +- net/tcp/tcp_callback.c | 4 +- net/tcp/tcp_input.c | 2 +- net/tcp/tcp_listen.c | 2 +- net/tcp/tcp_poll.c | 2 +- net/tcp/tcp_send.c | 10 +-- net/tcp/tcp_send_buffered.c | 2 +- net/tcp/tcp_send_unbuffered.c | 2 +- net/tcp/tcp_timer.c | 2 +- net/udp/Kconfig | 2 +- net/udp/udp.h | 8 +-- net/udp/udp_callback.c | 2 +- net/udp/udp_input.c | 2 +- net/udp/udp_poll.c | 2 +- net/udp/udp_send.c | 2 +- net/uip/uip.h | 8 +-- net/uip/uip_callback.c | 2 +- net/uip/uip_input.c | 2 +- net/uip/uip_iobsend.c | 2 +- net/uip/uip_pktsend.c | 2 +- net/uip/uip_poll.c | 16 ++--- net/uip/uip_send.c | 2 +- net/utils/net_chksum.c | 17 ++--- 103 files changed, 565 insertions(+), 564 deletions(-) diff --git a/Documentation/NuttX.png b/Documentation/NuttX.png index 360e657dd20f3c2326d8a06b1f96e974f9a5099d..93c8aa5860f0044cdbef593ed4feb29f2b722010 100644 GIT binary patch delta 13 UcmaE;_CSrLGr-S%BWsK>042`^r2qf` delta 14 VcmaE$_E3$rGr-TCcOy%TFaRl)1hN1C diff --git a/Documentation/NuttX2-b.png b/Documentation/NuttX2-b.png index 5bdab5c29de3f300e5178a7245cc4f13d5162766..8dc51072f8b2f72424b7dc11e87a974acc14ebc1 100644 GIT binary patch delta 13 UcmbQvGmVF(Gr-S%BdZV_02~4Xh5!Hn delta 14 VcmbQnGo6REGr-TCcO#1s8vq{w1Csy% diff --git a/Documentation/NuttX2.png b/Documentation/NuttX2.png index 422d1191fd21bbeafc908d5742a919a39e3d0211..4ce69ec5f49d1eaa245f8d4bf207e564337a3361 100644 GIT binary patch delta 13 Ucmew;^+AfIGr-S%BWn&X048Asw*UYD delta 14 Vcmew$^-+qoGr-TCcOy#$*V-q0Le133IJ1l2YCPh diff --git a/Documentation/NuttxPortingGuide.html b/Documentation/NuttxPortingGuide.html index b156c113744..f8f59cb82e6 100644 --- a/Documentation/NuttxPortingGuide.html +++ b/Documentation/NuttxPortingGuide.html @@ -2926,13 +2926,13 @@

6.3.1 Ethernet Device Drivers

include/nuttx/net/netdev.h. All structures and APIs needed to work with Ethernet drivers are provided in this header file. - The structure struct uip_driver_s defines the interface and is passed to uIP via + The structure struct net_driver_s defines the interface and is passed to uIP via netdev_register().

  • - int netdev_register(FAR struct uip_driver_s *dev);. + int netdev_register(FAR struct net_driver_s *dev);. Each Ethernet driver registers itself by calling netdev_register().

  • diff --git a/Documentation/acronyms.txt b/Documentation/acronyms.txt index eb78239ceaa..31a95dfe9b8 100755 --- a/Documentation/acronyms.txt +++ b/Documentation/acronyms.txt @@ -1,43 +1,43 @@ -AIC Advanced Interrupt Controller (Atmel SAM) -ADC Analog to Digital Conversion -ARP Address Resolution Protocol (networking) -BCH Block to Character -CAN Controller Area Network -DEVIF Device Interface (networking) -DAC Digital to Analog Conversion -DEV Device -DRAM Dynamic RAM -FAT File Allocation Table -FTL FLASH Translation Layer -I2C Inter-Integrated Circuit -I2S Inter IC Sound -ICMP Internet Control Message Protocol (networking) -IOB I/O Buffer (networking) -LIBC The "C" Library -MM Memory Management/Manager -MMC Multi-Media Card -MMCSD See MMC and SD -MTD Memory Technology Device -NFS Network File System -NETDEV Network Device (networking) -NSH NuttShell -NX NuttX, the NuttX Graphics server (graphics) -NXFFS NuttX Flash File System -NXWM The NuttX Window Manager (graphics) -PID Peripheral ID (Atmel SAM) -PWM Pulse Width Modulation -PKT "Raw" Packet socket (networking) -RAM Random Access Memory -SAIC Secure Advanced Interrupt Controller (Atmel SAM) -SD Secure Digital -SPI Serial Periperhal Interface -TCP Transmission Control Protocol (networking) -TSC Touchscreen Controller -TWI Two-Wire Interface -UDP User Datagram Protocol (networking) -UART Universal Asynchronous Receiver/Transmitter -USB Universal Serial Bus -USART Universal Synchronous/Asynchronous Receiver/Transmitter -WDT Watchdog Timer - - +AIC Advanced Interrupt Controller (Atmel SAM) +ADC Analog to Digital Conversion +ARP Address Resolution Protocol (networking) +BCH Block to Character +CAN Controller Area Network +DEVIF Device Interface (networking) +DAC Digital to Analog Conversion +DEV Device +DRAM Dynamic RAM +FAT File Allocation Table +FTL FLASH Translation Layer +I2C Inter-Integrated Circuit +I2S Inter IC Sound +ICMP Internet Control Message Protocol (networking) +IOB I/O Buffer (networking) +LIBC The "C" Library +MM Memory Management/Manager +MMC Multi-Media Card +MMCSD See MMC and SD +MTD Memory Technology Device +NFS Network File System +NETDEV Network Device (networking) +NSH NuttShell +NX NuttX, the NuttX Graphics server (graphics) +NXFFS NuttX Flash File System +NXWM The NuttX Window Manager (graphics) +PID Peripheral ID (Atmel SAM) +PWM Pulse Width Modulation +PKT "Raw" Packet socket (networking) +RAM Random Access Memory +SAIC Secure Advanced Interrupt Controller (Atmel SAM) +SD Secure Digital +SPI Serial Periperhal Interface +TCP Transmission Control Protocol (networking) +TSC Touchscreen Controller +TWI Two-Wire Interface +UDP User Datagram Protocol (networking) +UART Universal Asynchronous Receiver/Transmitter +USB Universal Serial Bus +USART Universal Synchronous/Asynchronous Receiver/Transmitter +WDT Watchdog Timer + + diff --git a/arch/arm/src/c5471/c5471_ethernet.c b/arch/arm/src/c5471/c5471_ethernet.c index 8220d606b18..eace9d8d006 100644 --- a/arch/arm/src/c5471/c5471_ethernet.c +++ b/arch/arm/src/c5471/c5471_ethernet.c @@ -330,7 +330,7 @@ struct c5471_driver_s /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s c_dev; /* Interface understood by uIP */ + struct net_driver_s c_dev; /* Interface understood by uIP */ }; /**************************************************************************** @@ -359,7 +359,7 @@ static inline void c5471_incrxcpu(struct c5471_driver_s *c5471); /* Common TX logic */ static int c5471_transmit(struct c5471_driver_s *c5471); -static int c5471_uiptxpoll(struct uip_driver_s *dev); +static int c5471_uiptxpoll(struct net_driver_s *dev); /* Interrupt handling */ @@ -380,12 +380,12 @@ static void c5471_txtimeout(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int c5471_ifup(struct uip_driver_s *dev); -static int c5471_ifdown(struct uip_driver_s *dev); -static int c5471_txavail(struct uip_driver_s *dev); +static int c5471_ifup(struct net_driver_s *dev); +static int c5471_ifdown(struct net_driver_s *dev); +static int c5471_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int c5471_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac); -static int c5471_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac); +static int c5471_addmac(struct net_driver_s *dev, FAR const uint8_t *mac); +static int c5471_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac); #endif /* Initialization functions */ @@ -844,7 +844,7 @@ static inline void c5471_incrxcpu(struct c5471_driver_s *c5471) static int c5471_transmit(struct c5471_driver_s *c5471) { - struct uip_driver_s *dev = &c5471->c_dev; + struct net_driver_s *dev = &c5471->c_dev; volatile uint16_t *packetmem; uint16_t framelen; bool bfirstframe; @@ -974,7 +974,7 @@ static int c5471_transmit(struct c5471_driver_s *c5471) * ****************************************************************************/ -static int c5471_uiptxpoll(struct uip_driver_s *dev) +static int c5471_uiptxpoll(struct net_driver_s *dev) { struct c5471_driver_s *c5471 = (struct c5471_driver_s *)dev->d_private; @@ -1126,7 +1126,7 @@ static void c5471_rxstatus(struct c5471_driver_s *c5471) static void c5471_receive(struct c5471_driver_s *c5471) { - struct uip_driver_s *dev = &c5471->c_dev; + struct net_driver_s *dev = &c5471->c_dev; uint16_t *packetmem; bool bmore = true; int packetlen = 0; @@ -1580,7 +1580,7 @@ static void c5471_polltimer(int argc, uint32_t arg, ...) * ****************************************************************************/ -static int c5471_ifup(struct uip_driver_s *dev) +static int c5471_ifup(struct net_driver_s *dev) { struct c5471_driver_s *c5471 = (struct c5471_driver_s *)dev->d_private; volatile uint32_t clearbits; @@ -1640,7 +1640,7 @@ static int c5471_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int c5471_ifdown(struct uip_driver_s *dev) +static int c5471_ifdown(struct net_driver_s *dev) { struct c5471_driver_s *c5471 = (struct c5471_driver_s *)dev->d_private; irqstate_t flags; @@ -1695,7 +1695,7 @@ static int c5471_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int c5471_txavail(struct uip_driver_s *dev) +static int c5471_txavail(struct net_driver_s *dev) { struct c5471_driver_s *c5471 = (struct c5471_driver_s *)dev->d_private; irqstate_t flags; @@ -1742,7 +1742,7 @@ static int c5471_txavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int c5471_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int c5471_addmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct c5471_driver_s *priv = (FAR struct c5471_driver_s *)dev->d_private; @@ -1772,7 +1772,7 @@ static int c5471_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int c5471_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int c5471_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct c5471_driver_s *priv = (FAR struct c5471_driver_s *)dev->d_private; @@ -2066,7 +2066,7 @@ static void c5471_reset(struct c5471_driver_s *c5471) static void c5471_macassign(struct c5471_driver_s *c5471) { - struct uip_driver_s *dev = &c5471->c_dev; + struct net_driver_s *dev = &c5471->c_dev; uint8_t *mptr = dev->d_mac.ether_addr_octet; register uint32_t tmp; diff --git a/arch/arm/src/kinetis/kinetis_enet.c b/arch/arm/src/kinetis/kinetis_enet.c index 6b5a7ef009e..92c411453f9 100644 --- a/arch/arm/src/kinetis/kinetis_enet.c +++ b/arch/arm/src/kinetis/kinetis_enet.c @@ -178,7 +178,7 @@ struct kinetis_driver_s /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s dev; /* Interface understood by uIP */ + struct net_driver_s dev; /* Interface understood by uIP */ /* Statistics */ @@ -224,7 +224,7 @@ static inline uint16_t kinesis_swap16(uint16_t value); static bool kinetics_txringfull(FAR struct kinetis_driver_s *priv); static int kinetis_transmit(FAR struct kinetis_driver_s *priv); -static int kinetis_uiptxpoll(struct uip_driver_s *dev); +static int kinetis_uiptxpoll(struct net_driver_s *dev); /* Interrupt handling */ @@ -239,12 +239,12 @@ static void kinetis_txtimeout(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int kinetis_ifup(struct uip_driver_s *dev); -static int kinetis_ifdown(struct uip_driver_s *dev); -static int kinetis_txavail(struct uip_driver_s *dev); +static int kinetis_ifup(struct net_driver_s *dev); +static int kinetis_ifdown(struct net_driver_s *dev); +static int kinetis_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int kinetis_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac); -static int kinetis_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac); +static int kinetis_addmac(struct net_driver_s *dev, FAR const uint8_t *mac); +static int kinetis_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac); #endif /* PHY/MII support */ @@ -434,7 +434,7 @@ static int kinetis_transmit(FAR struct kinetis_driver_s *priv) * ****************************************************************************/ -static int kinetis_uiptxpoll(struct uip_driver_s *dev) +static int kinetis_uiptxpoll(struct net_driver_s *dev) { FAR struct kinetis_driver_s *priv = (FAR struct kinetis_driver_s *)dev->d_private; @@ -783,7 +783,7 @@ static void kinetis_polltimer(int argc, uint32_t arg, ...) * ****************************************************************************/ -static int kinetis_ifup(struct uip_driver_s *dev) +static int kinetis_ifup(struct net_driver_s *dev) { FAR struct kinetis_driver_s *priv = (FAR struct kinetis_driver_s *)dev->d_private; uint32_t regval; @@ -896,7 +896,7 @@ static int kinetis_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int kinetis_ifdown(struct uip_driver_s *dev) +static int kinetis_ifdown(struct net_driver_s *dev) { FAR struct kinetis_driver_s *priv = (FAR struct kinetis_driver_s *)dev->d_private; irqstate_t flags; @@ -948,7 +948,7 @@ static int kinetis_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int kinetis_txavail(struct uip_driver_s *dev) +static int kinetis_txavail(struct net_driver_s *dev) { FAR struct kinetis_driver_s *priv = (FAR struct kinetis_driver_s *)dev->d_private; irqstate_t flags; @@ -1000,7 +1000,7 @@ static int kinetis_txavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int kinetis_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int kinetis_addmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct kinetis_driver_s *priv = (FAR struct kinetis_driver_s *)dev->d_private; @@ -1029,7 +1029,7 @@ static int kinetis_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int kinetis_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int kinetis_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct kinetis_driver_s *priv = (FAR struct kinetis_driver_s *)dev->d_private; diff --git a/arch/arm/src/lpc17xx/lpc17_ethernet.c b/arch/arm/src/lpc17xx/lpc17_ethernet.c index f52ba65727e..3712d91bde7 100644 --- a/arch/arm/src/lpc17xx/lpc17_ethernet.c +++ b/arch/arm/src/lpc17xx/lpc17_ethernet.c @@ -281,7 +281,7 @@ struct lpc17_driver_s /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s lp_dev; /* Interface understood by uIP */ + struct net_driver_s lp_dev; /* Interface understood by uIP */ }; /**************************************************************************** @@ -325,7 +325,7 @@ static void lpc17_putreg(uint32_t val, uint32_t addr); static int lpc17_txdesc(struct lpc17_driver_s *priv); static int lpc17_transmit(struct lpc17_driver_s *priv); -static int lpc17_uiptxpoll(struct uip_driver_s *dev); +static int lpc17_uiptxpoll(struct net_driver_s *dev); /* Interrupt handling */ @@ -341,12 +341,12 @@ static void lpc17_txtimeout(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int lpc17_ifup(struct uip_driver_s *dev); -static int lpc17_ifdown(struct uip_driver_s *dev); -static int lpc17_txavail(struct uip_driver_s *dev); +static int lpc17_ifup(struct net_driver_s *dev); +static int lpc17_ifdown(struct net_driver_s *dev); +static int lpc17_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int lpc17_addmac(struct uip_driver_s *dev, const uint8_t *mac); -static int lpc17_rmmac(struct uip_driver_s *dev, const uint8_t *mac); +static int lpc17_addmac(struct net_driver_s *dev, const uint8_t *mac); +static int lpc17_rmmac(struct net_driver_s *dev, const uint8_t *mac); #endif /* Initialization functions */ @@ -666,7 +666,7 @@ static int lpc17_transmit(struct lpc17_driver_s *priv) * ****************************************************************************/ -static int lpc17_uiptxpoll(struct uip_driver_s *dev) +static int lpc17_uiptxpoll(struct net_driver_s *dev) { struct lpc17_driver_s *priv = (struct lpc17_driver_s *)dev->d_private; int ret = OK; @@ -1250,7 +1250,7 @@ static void lpc17_polltimer(int argc, uint32_t arg, ...) * ****************************************************************************/ -static int lpc17_ifup(struct uip_driver_s *dev) +static int lpc17_ifup(struct net_driver_s *dev) { struct lpc17_driver_s *priv = (struct lpc17_driver_s *)dev->d_private; uint32_t regval; @@ -1419,7 +1419,7 @@ static int lpc17_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int lpc17_ifdown(struct uip_driver_s *dev) +static int lpc17_ifdown(struct net_driver_s *dev) { struct lpc17_driver_s *priv = (struct lpc17_driver_s *)dev->d_private; irqstate_t flags; @@ -1461,7 +1461,7 @@ static int lpc17_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int lpc17_txavail(struct uip_driver_s *dev) +static int lpc17_txavail(struct net_driver_s *dev) { struct lpc17_driver_s *priv = (struct lpc17_driver_s *)dev->d_private; irqstate_t flags; @@ -1509,7 +1509,7 @@ static int lpc17_txavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int lpc17_addmac(struct uip_driver_s *dev, const uint8_t *mac) +static int lpc17_addmac(struct net_driver_s *dev, const uint8_t *mac) { struct lpc17_driver_s *priv = (struct lpc17_driver_s *)dev->d_private; @@ -1539,7 +1539,7 @@ static int lpc17_addmac(struct uip_driver_s *dev, const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int lpc17_rmmac(struct uip_driver_s *dev, const uint8_t *mac) +static int lpc17_rmmac(struct net_driver_s *dev, const uint8_t *mac) { struct lpc17_driver_s *priv = (struct lpc17_driver_s *)dev->d_private; diff --git a/arch/arm/src/sam34/sam_emac.c b/arch/arm/src/sam34/sam_emac.c index e5d527b0749..58ed1e7be41 100644 --- a/arch/arm/src/sam34/sam_emac.c +++ b/arch/arm/src/sam34/sam_emac.c @@ -259,7 +259,7 @@ struct sam_emac_s /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s dev; /* Interface understood by uIP */ + struct net_driver_s dev; /* Interface understood by uIP */ /* Used to track transmit and receive descriptors */ @@ -345,7 +345,7 @@ static void sam_buffer_free(struct sam_emac_s *priv); /* Common TX logic */ static int sam_transmit(struct sam_emac_s *priv); -static int sam_uiptxpoll(struct uip_driver_s *dev); +static int sam_uiptxpoll(struct net_driver_s *dev); static void sam_dopoll(struct sam_emac_s *priv); /* Interrupt handling */ @@ -362,12 +362,12 @@ static void sam_txtimeout(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int sam_ifup(struct uip_driver_s *dev); -static int sam_ifdown(struct uip_driver_s *dev); -static int sam_txavail(struct uip_driver_s *dev); +static int sam_ifup(struct net_driver_s *dev); +static int sam_ifdown(struct net_driver_s *dev); +static int sam_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int sam_addmac(struct uip_driver_s *dev, const uint8_t *mac); -static int sam_rmmac(struct uip_driver_s *dev, const uint8_t *mac); +static int sam_addmac(struct net_driver_s *dev, const uint8_t *mac); +static int sam_rmmac(struct net_driver_s *dev, const uint8_t *mac); #endif /* PHY Initialization */ @@ -695,7 +695,7 @@ static void sam_buffer_free(struct sam_emac_s *priv) static int sam_transmit(struct sam_emac_s *priv) { - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; volatile struct emac_txdesc_s *txdesc; uint32_t regval; uint32_t status; @@ -808,7 +808,7 @@ static int sam_transmit(struct sam_emac_s *priv) * ****************************************************************************/ -static int sam_uiptxpoll(struct uip_driver_s *dev) +static int sam_uiptxpoll(struct net_driver_s *dev) { struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; @@ -863,7 +863,7 @@ static int sam_uiptxpoll(struct uip_driver_s *dev) static void sam_dopoll(struct sam_emac_s *priv) { - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; /* Check if the there are any free TX descriptors. We cannot perform the * TX poll if we do not have buffering for another packet. @@ -903,7 +903,7 @@ static void sam_dopoll(struct sam_emac_s *priv) static int sam_recvframe(struct sam_emac_s *priv) { struct emac_rxdesc_s *rxdesc; - struct uip_driver_s *dev; + struct net_driver_s *dev; const uint8_t *src; uint8_t *dest; uint32_t rxndx; @@ -1108,7 +1108,7 @@ static int sam_recvframe(struct sam_emac_s *priv) static void sam_receive(struct sam_emac_s *priv) { - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; /* Loop while while sam_recvframe() successfully retrieves valid * EMAC frames. @@ -1507,7 +1507,7 @@ static void sam_txtimeout(int argc, uint32_t arg, ...) static void sam_polltimer(int argc, uint32_t arg, ...) { struct sam_emac_s *priv = (struct sam_emac_s *)arg; - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; /* Check if the there are any free TX descriptors. We cannot perform the * TX poll if we do not have buffering for another packet. @@ -1542,7 +1542,7 @@ static void sam_polltimer(int argc, uint32_t arg, ...) * ****************************************************************************/ -static int sam_ifup(struct uip_driver_s *dev) +static int sam_ifup(struct net_driver_s *dev) { struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; int ret; @@ -1612,7 +1612,7 @@ static int sam_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int sam_ifdown(struct uip_driver_s *dev) +static int sam_ifdown(struct net_driver_s *dev) { struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; irqstate_t flags; @@ -1662,7 +1662,7 @@ static int sam_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int sam_txavail(struct uip_driver_s *dev) +static int sam_txavail(struct net_driver_s *dev) { struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; irqstate_t flags; @@ -1707,7 +1707,7 @@ static int sam_txavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int sam_addmac(struct uip_driver_s *dev, const uint8_t *mac) +static int sam_addmac(struct net_driver_s *dev, const uint8_t *mac) { struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; @@ -1741,7 +1741,7 @@ static int sam_addmac(struct uip_driver_s *dev, const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int sam_rmmac(struct uip_driver_s *dev, const uint8_t *mac) +static int sam_rmmac(struct net_driver_s *dev, const uint8_t *mac) { struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; @@ -2697,7 +2697,7 @@ static void sam_emac_reset(struct sam_emac_s *priv) static void sam_macaddress(struct sam_emac_s *priv) { - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; uint32_t regval; nllvdbg("%s MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", diff --git a/arch/arm/src/sama5/sam_emaca.c b/arch/arm/src/sama5/sam_emaca.c index 77d1fc742c7..3ec595cdf78 100644 --- a/arch/arm/src/sama5/sam_emaca.c +++ b/arch/arm/src/sama5/sam_emaca.c @@ -264,7 +264,7 @@ struct sam_emac_s /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s dev; /* Interface understood by uIP */ + struct net_driver_s dev; /* Interface understood by uIP */ /* Used to track transmit and receive descriptors */ @@ -350,7 +350,7 @@ static void sam_buffer_free(struct sam_emac_s *priv); /* Common TX logic */ static int sam_transmit(struct sam_emac_s *priv); -static int sam_uiptxpoll(struct uip_driver_s *dev); +static int sam_uiptxpoll(struct net_driver_s *dev); static void sam_dopoll(struct sam_emac_s *priv); /* Interrupt handling */ @@ -367,12 +367,12 @@ static void sam_txtimeout(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int sam_ifup(struct uip_driver_s *dev); -static int sam_ifdown(struct uip_driver_s *dev); -static int sam_txavail(struct uip_driver_s *dev); +static int sam_ifup(struct net_driver_s *dev); +static int sam_ifdown(struct net_driver_s *dev); +static int sam_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int sam_addmac(struct uip_driver_s *dev, const uint8_t *mac); -static int sam_rmmac(struct uip_driver_s *dev, const uint8_t *mac); +static int sam_addmac(struct net_driver_s *dev, const uint8_t *mac); +static int sam_rmmac(struct net_driver_s *dev, const uint8_t *mac); #endif /* PHY Initialization */ @@ -700,7 +700,7 @@ static void sam_buffer_free(struct sam_emac_s *priv) static int sam_transmit(struct sam_emac_s *priv) { - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; volatile struct emac_txdesc_s *txdesc; uintptr_t virtaddr; uint32_t regval; @@ -818,7 +818,7 @@ static int sam_transmit(struct sam_emac_s *priv) * ****************************************************************************/ -static int sam_uiptxpoll(struct uip_driver_s *dev) +static int sam_uiptxpoll(struct net_driver_s *dev) { struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; @@ -873,7 +873,7 @@ static int sam_uiptxpoll(struct uip_driver_s *dev) static void sam_dopoll(struct sam_emac_s *priv) { - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; /* Check if the there are any free TX descriptors. We cannot perform the * TX poll if we do not have buffering for another packet. @@ -913,7 +913,7 @@ static void sam_dopoll(struct sam_emac_s *priv) static int sam_recvframe(struct sam_emac_s *priv) { struct emac_rxdesc_s *rxdesc; - struct uip_driver_s *dev; + struct net_driver_s *dev; const uint8_t *src; uint8_t *dest; uintptr_t physaddr; @@ -1148,7 +1148,7 @@ static int sam_recvframe(struct sam_emac_s *priv) static void sam_receive(struct sam_emac_s *priv) { - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; /* Loop while while sam_recvframe() successfully retrieves valid * EMAC frames. @@ -1548,7 +1548,7 @@ static void sam_txtimeout(int argc, uint32_t arg, ...) static void sam_polltimer(int argc, uint32_t arg, ...) { struct sam_emac_s *priv = (struct sam_emac_s *)arg; - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; /* Check if the there are any free TX descriptors. We cannot perform the * TX poll if we do not have buffering for another packet. @@ -1583,7 +1583,7 @@ static void sam_polltimer(int argc, uint32_t arg, ...) * ****************************************************************************/ -static int sam_ifup(struct uip_driver_s *dev) +static int sam_ifup(struct net_driver_s *dev) { struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; int ret; @@ -1653,7 +1653,7 @@ static int sam_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int sam_ifdown(struct uip_driver_s *dev) +static int sam_ifdown(struct net_driver_s *dev) { struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; irqstate_t flags; @@ -1703,7 +1703,7 @@ static int sam_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int sam_txavail(struct uip_driver_s *dev) +static int sam_txavail(struct net_driver_s *dev) { struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; irqstate_t flags; @@ -1748,7 +1748,7 @@ static int sam_txavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int sam_addmac(struct uip_driver_s *dev, const uint8_t *mac) +static int sam_addmac(struct net_driver_s *dev, const uint8_t *mac) { struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; @@ -1782,7 +1782,7 @@ static int sam_addmac(struct uip_driver_s *dev, const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int sam_rmmac(struct uip_driver_s *dev, const uint8_t *mac) +static int sam_rmmac(struct net_driver_s *dev, const uint8_t *mac) { struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; @@ -2747,7 +2747,7 @@ static void sam_emac_reset(struct sam_emac_s *priv) static void sam_macaddress(struct sam_emac_s *priv) { - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; uint32_t regval; nllvdbg("%s MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", diff --git a/arch/arm/src/sama5/sam_emacb.c b/arch/arm/src/sama5/sam_emacb.c index 7df889bad1a..70f505b8b97 100644 --- a/arch/arm/src/sama5/sam_emacb.c +++ b/arch/arm/src/sama5/sam_emacb.c @@ -387,7 +387,7 @@ struct sam_emac_s /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s dev; /* Interface understood by uIP */ + struct net_driver_s dev; /* Interface understood by uIP */ /* Constant and configured attributes of the EMAC */ @@ -438,7 +438,7 @@ static void sam_buffer_free(struct sam_emac_s *priv); /* Common TX logic */ static int sam_transmit(struct sam_emac_s *priv); -static int sam_uiptxpoll(struct uip_driver_s *dev); +static int sam_uiptxpoll(struct net_driver_s *dev); static void sam_dopoll(struct sam_emac_s *priv); /* Interrupt handling */ @@ -461,12 +461,12 @@ static void sam_txtimeout(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int sam_ifup(struct uip_driver_s *dev); -static int sam_ifdown(struct uip_driver_s *dev); -static int sam_txavail(struct uip_driver_s *dev); +static int sam_ifup(struct net_driver_s *dev); +static int sam_ifdown(struct net_driver_s *dev); +static int sam_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int sam_addmac(struct uip_driver_s *dev, const uint8_t *mac); -static int sam_rmmac(struct uip_driver_s *dev, const uint8_t *mac); +static int sam_addmac(struct net_driver_s *dev, const uint8_t *mac); +static int sam_rmmac(struct net_driver_s *dev, const uint8_t *mac); #endif /* PHY Initialization */ @@ -1009,7 +1009,7 @@ static void sam_buffer_free(struct sam_emac_s *priv) static int sam_transmit(struct sam_emac_s *priv) { - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; volatile struct emac_txdesc_s *txdesc; uintptr_t virtaddr; uint32_t regval; @@ -1127,7 +1127,7 @@ static int sam_transmit(struct sam_emac_s *priv) * ****************************************************************************/ -static int sam_uiptxpoll(struct uip_driver_s *dev) +static int sam_uiptxpoll(struct net_driver_s *dev) { struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; @@ -1182,7 +1182,7 @@ static int sam_uiptxpoll(struct uip_driver_s *dev) static void sam_dopoll(struct sam_emac_s *priv) { - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; /* Check if the there are any free TX descriptors. We cannot perform the * TX poll if we do not have buffering for another packet. @@ -1222,7 +1222,7 @@ static void sam_dopoll(struct sam_emac_s *priv) static int sam_recvframe(struct sam_emac_s *priv) { struct emac_rxdesc_s *rxdesc; - struct uip_driver_s *dev; + struct net_driver_s *dev; const uint8_t *src; uint8_t *dest; uintptr_t physaddr; @@ -1457,7 +1457,7 @@ static int sam_recvframe(struct sam_emac_s *priv) static void sam_receive(struct sam_emac_s *priv) { - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; /* Loop while while sam_recvframe() successfully retrieves valid * EMAC frames. @@ -1887,7 +1887,7 @@ static void sam_txtimeout(int argc, uint32_t arg, ...) static void sam_polltimer(int argc, uint32_t arg, ...) { struct sam_emac_s *priv = (struct sam_emac_s *)arg; - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; /* Check if the there are any free TX descriptors. We cannot perform the * TX poll if we do not have buffering for another packet. @@ -1922,7 +1922,7 @@ static void sam_polltimer(int argc, uint32_t arg, ...) * ****************************************************************************/ -static int sam_ifup(struct uip_driver_s *dev) +static int sam_ifup(struct net_driver_s *dev) { struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; int ret; @@ -1992,7 +1992,7 @@ static int sam_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int sam_ifdown(struct uip_driver_s *dev) +static int sam_ifdown(struct net_driver_s *dev) { struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; irqstate_t flags; @@ -2042,7 +2042,7 @@ static int sam_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int sam_txavail(struct uip_driver_s *dev) +static int sam_txavail(struct net_driver_s *dev) { struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; irqstate_t flags; @@ -2087,7 +2087,7 @@ static int sam_txavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int sam_addmac(struct uip_driver_s *dev, const uint8_t *mac) +static int sam_addmac(struct net_driver_s *dev, const uint8_t *mac) { struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; @@ -2121,7 +2121,7 @@ static int sam_addmac(struct uip_driver_s *dev, const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int sam_rmmac(struct uip_driver_s *dev, const uint8_t *mac) +static int sam_rmmac(struct net_driver_s *dev, const uint8_t *mac) { struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; @@ -3350,7 +3350,7 @@ static void sam_emac_reset(struct sam_emac_s *priv) static void sam_macaddress(struct sam_emac_s *priv) { - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; uint32_t regval; nllvdbg("%s MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", diff --git a/arch/arm/src/sama5/sam_gmac.c b/arch/arm/src/sama5/sam_gmac.c index f30b527261b..2c2d0415a03 100644 --- a/arch/arm/src/sama5/sam_gmac.c +++ b/arch/arm/src/sama5/sam_gmac.c @@ -190,7 +190,7 @@ struct sam_gmac_s /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s dev; /* Interface understood by uIP */ + struct net_driver_s dev; /* Interface understood by uIP */ /* Used to track transmit and receive descriptors */ @@ -275,7 +275,7 @@ static void sam_buffer_free(struct sam_gmac_s *priv); /* Common TX logic */ static int sam_transmit(struct sam_gmac_s *priv); -static int sam_uiptxpoll(struct uip_driver_s *dev); +static int sam_uiptxpoll(struct net_driver_s *dev); static void sam_dopoll(struct sam_gmac_s *priv); /* Interrupt handling */ @@ -292,12 +292,12 @@ static void sam_txtimeout(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int sam_ifup(struct uip_driver_s *dev); -static int sam_ifdown(struct uip_driver_s *dev); -static int sam_txavail(struct uip_driver_s *dev); +static int sam_ifup(struct net_driver_s *dev); +static int sam_ifdown(struct net_driver_s *dev); +static int sam_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int sam_addmac(struct uip_driver_s *dev, const uint8_t *mac); -static int sam_rmmac(struct uip_driver_s *dev, const uint8_t *mac); +static int sam_addmac(struct net_driver_s *dev, const uint8_t *mac); +static int sam_rmmac(struct net_driver_s *dev, const uint8_t *mac); #endif /* PHY Initialization */ @@ -631,7 +631,7 @@ static void sam_buffer_free(struct sam_gmac_s *priv) static int sam_transmit(struct sam_gmac_s *priv) { - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; volatile struct gmac_txdesc_s *txdesc; uintptr_t virtaddr; uint32_t regval; @@ -750,7 +750,7 @@ static int sam_transmit(struct sam_gmac_s *priv) * ****************************************************************************/ -static int sam_uiptxpoll(struct uip_driver_s *dev) +static int sam_uiptxpoll(struct net_driver_s *dev) { struct sam_gmac_s *priv = (struct sam_gmac_s *)dev->d_private; @@ -805,7 +805,7 @@ static int sam_uiptxpoll(struct uip_driver_s *dev) static void sam_dopoll(struct sam_gmac_s *priv) { - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; /* Check if the there are any free TX descriptors. We cannot perform the * TX poll if we do not have buffering for another packet. @@ -845,7 +845,7 @@ static void sam_dopoll(struct sam_gmac_s *priv) static int sam_recvframe(struct sam_gmac_s *priv) { volatile struct gmac_rxdesc_s *rxdesc; - struct uip_driver_s *dev; + struct net_driver_s *dev; const uint8_t *src; uint8_t *dest; uintptr_t physaddr; @@ -1078,7 +1078,7 @@ static int sam_recvframe(struct sam_gmac_s *priv) static void sam_receive(struct sam_gmac_s *priv) { - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; /* Loop while while sam_recvframe() successfully retrieves valid * GMAC frames. @@ -1500,7 +1500,7 @@ static void sam_txtimeout(int argc, uint32_t arg, ...) static void sam_polltimer(int argc, uint32_t arg, ...) { struct sam_gmac_s *priv = (struct sam_gmac_s *)arg; - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; /* Check if the there are any free TX descriptors. We cannot perform the * TX poll if we do not have buffering for another packet. @@ -1535,7 +1535,7 @@ static void sam_polltimer(int argc, uint32_t arg, ...) * ****************************************************************************/ -static int sam_ifup(struct uip_driver_s *dev) +static int sam_ifup(struct net_driver_s *dev) { struct sam_gmac_s *priv = (struct sam_gmac_s *)dev->d_private; int ret; @@ -1608,7 +1608,7 @@ static int sam_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int sam_ifdown(struct uip_driver_s *dev) +static int sam_ifdown(struct net_driver_s *dev) { struct sam_gmac_s *priv = (struct sam_gmac_s *)dev->d_private; irqstate_t flags; @@ -1658,7 +1658,7 @@ static int sam_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int sam_txavail(struct uip_driver_s *dev) +static int sam_txavail(struct net_driver_s *dev) { struct sam_gmac_s *priv = (struct sam_gmac_s *)dev->d_private; irqstate_t flags; @@ -1703,7 +1703,7 @@ static int sam_txavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int sam_addmac(struct uip_driver_s *dev, const uint8_t *mac) +static int sam_addmac(struct net_driver_s *dev, const uint8_t *mac) { struct sam_gmac_s *priv = (struct sam_gmac_s *)dev->d_private; @@ -1737,7 +1737,7 @@ static int sam_addmac(struct uip_driver_s *dev, const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int sam_rmmac(struct uip_driver_s *dev, const uint8_t *mac) +static int sam_rmmac(struct net_driver_s *dev, const uint8_t *mac) { struct sam_gmac_s *priv = (struct sam_gmac_s *)dev->d_private; @@ -2801,7 +2801,7 @@ static void sam_gmac_reset(struct sam_gmac_s *priv) static void sam_macaddress(struct sam_gmac_s *priv) { - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; uint32_t regval; nllvdbg("%s MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", diff --git a/arch/arm/src/stm32/stm32_eth.c b/arch/arm/src/stm32/stm32_eth.c index 0d86cd605a7..a17d140db4a 100644 --- a/arch/arm/src/stm32/stm32_eth.c +++ b/arch/arm/src/stm32/stm32_eth.c @@ -572,7 +572,7 @@ struct stm32_ethmac_s /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s dev; /* Interface understood by uIP */ + struct net_driver_s dev; /* Interface understood by uIP */ /* Used to track transmit and receive descriptors */ @@ -627,7 +627,7 @@ static inline bool stm32_isfreebuffer(FAR struct stm32_ethmac_s *priv); /* Common TX logic */ static int stm32_transmit(FAR struct stm32_ethmac_s *priv); -static int stm32_uiptxpoll(struct uip_driver_s *dev); +static int stm32_uiptxpoll(struct net_driver_s *dev); static void stm32_dopoll(FAR struct stm32_ethmac_s *priv); /* Interrupt handling */ @@ -650,12 +650,12 @@ static void stm32_txtimeout(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int stm32_ifup(struct uip_driver_s *dev); -static int stm32_ifdown(struct uip_driver_s *dev); -static int stm32_txavail(struct uip_driver_s *dev); +static int stm32_ifup(struct net_driver_s *dev); +static int stm32_ifdown(struct net_driver_s *dev); +static int stm32_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int stm32_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac); -static int stm32_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac); +static int stm32_addmac(struct net_driver_s *dev, FAR const uint8_t *mac); +static int stm32_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac); #endif /* Descriptor Initialization */ @@ -1159,7 +1159,7 @@ static int stm32_transmit(FAR struct stm32_ethmac_s *priv) * ****************************************************************************/ -static int stm32_uiptxpoll(struct uip_driver_s *dev) +static int stm32_uiptxpoll(struct net_driver_s *dev) { FAR struct stm32_ethmac_s *priv = (FAR struct stm32_ethmac_s *)dev->d_private; @@ -1240,7 +1240,7 @@ static int stm32_uiptxpoll(struct uip_driver_s *dev) static void stm32_dopoll(FAR struct stm32_ethmac_s *priv) { - FAR struct uip_driver_s *dev = &priv->dev; + FAR struct net_driver_s *dev = &priv->dev; /* Check if the next TX descriptor is owned by the Ethernet DMA or * CPU. We cannot perform the TX poll if we are unable to accept @@ -1503,7 +1503,7 @@ static int stm32_recvframe(FAR struct stm32_ethmac_s *priv) if ((rxdesc->rdes0 & ETH_RDES0_ES) == 0) { - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; /* Get the Frame Length of the received packet: substruct 4 * bytes of the CRC @@ -1587,7 +1587,7 @@ static int stm32_recvframe(FAR struct stm32_ethmac_s *priv) static void stm32_receive(FAR struct stm32_ethmac_s *priv) { - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; /* Loop while while stm32_recvframe() successfully retrieves valid * Ethernet frames. @@ -1964,7 +1964,7 @@ static void stm32_txtimeout(int argc, uint32_t arg, ...) static void stm32_polltimer(int argc, uint32_t arg, ...) { FAR struct stm32_ethmac_s *priv = (FAR struct stm32_ethmac_s *)arg; - FAR struct uip_driver_s *dev = &priv->dev; + FAR struct net_driver_s *dev = &priv->dev; /* Check if the next TX descriptor is owned by the Ethernet DMA or CPU. We * cannot perform the timer poll if we are unable to accept another packet @@ -2031,7 +2031,7 @@ static void stm32_polltimer(int argc, uint32_t arg, ...) * ****************************************************************************/ -static int stm32_ifup(struct uip_driver_s *dev) +static int stm32_ifup(struct net_driver_s *dev) { FAR struct stm32_ethmac_s *priv = (FAR struct stm32_ethmac_s *)dev->d_private; int ret; @@ -2077,7 +2077,7 @@ static int stm32_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int stm32_ifdown(struct uip_driver_s *dev) +static int stm32_ifdown(struct net_driver_s *dev) { FAR struct stm32_ethmac_s *priv = (FAR struct stm32_ethmac_s *)dev->d_private; irqstate_t flags; @@ -2127,7 +2127,7 @@ static int stm32_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int stm32_txavail(struct uip_driver_s *dev) +static int stm32_txavail(struct net_driver_s *dev) { FAR struct stm32_ethmac_s *priv = (FAR struct stm32_ethmac_s *)dev->d_private; irqstate_t flags; @@ -2216,7 +2216,7 @@ static uint32_t stm32_calcethcrc(const uint8_t *data, size_t length) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int stm32_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int stm32_addmac(struct net_driver_s *dev, FAR const uint8_t *mac) { uint32_t crc; uint32_t hashindex; @@ -2273,7 +2273,7 @@ static int stm32_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int stm32_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int stm32_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac) { uint32_t crc; uint32_t hashindex; @@ -3303,7 +3303,7 @@ static int stm32_macconfig(FAR struct stm32_ethmac_s *priv) static void stm32_macaddress(FAR struct stm32_ethmac_s *priv) { - FAR struct uip_driver_s *dev = &priv->dev; + FAR struct net_driver_s *dev = &priv->dev; uint32_t regval; nllvdbg("%s MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", diff --git a/arch/arm/src/tiva/tiva_ethernet.c b/arch/arm/src/tiva/tiva_ethernet.c index adb9a8312e7..773e6cbb3a2 100644 --- a/arch/arm/src/tiva/tiva_ethernet.c +++ b/arch/arm/src/tiva/tiva_ethernet.c @@ -207,7 +207,7 @@ struct tiva_driver_s /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s ld_dev; /* Interface understood by uIP */ + struct net_driver_s ld_dev; /* Interface understood by uIP */ }; /**************************************************************************** @@ -238,7 +238,7 @@ static uint16_t tiva_phyread(struct tiva_driver_s *priv, int regaddr); /* Common TX logic */ static int tiva_transmit(struct tiva_driver_s *priv); -static int tiva_uiptxpoll(struct uip_driver_s *dev); +static int tiva_uiptxpoll(struct net_driver_s *dev); /* Interrupt handling */ @@ -253,12 +253,12 @@ static void tiva_txtimeout(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int tiva_ifup(struct uip_driver_s *dev); -static int tiva_ifdown(struct uip_driver_s *dev); -static int tiva_txavail(struct uip_driver_s *dev); +static int tiva_ifup(struct net_driver_s *dev); +static int tiva_ifdown(struct net_driver_s *dev); +static int tiva_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int tiva_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac); -static int tiva_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac); +static int tiva_addmac(struct net_driver_s *dev, FAR const uint8_t *mac); +static int tiva_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac); #endif /**************************************************************************** @@ -593,7 +593,7 @@ static int tiva_transmit(struct tiva_driver_s *priv) * ****************************************************************************/ -static int tiva_uiptxpoll(struct uip_driver_s *dev) +static int tiva_uiptxpoll(struct net_driver_s *dev) { struct tiva_driver_s *priv = (struct tiva_driver_s *)dev->d_private; int ret = OK; @@ -1024,7 +1024,7 @@ static void tiva_polltimer(int argc, uint32_t arg, ...) * ****************************************************************************/ -static int tiva_ifup(struct uip_driver_s *dev) +static int tiva_ifup(struct net_driver_s *dev) { struct tiva_driver_s *priv = (struct tiva_driver_s *)dev->d_private; irqstate_t flags; @@ -1180,7 +1180,7 @@ static int tiva_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int tiva_ifdown(struct uip_driver_s *dev) +static int tiva_ifdown(struct net_driver_s *dev) { struct tiva_driver_s *priv = (struct tiva_driver_s *)dev->d_private; irqstate_t flags; @@ -1265,7 +1265,7 @@ static int tiva_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int tiva_txavail(struct uip_driver_s *dev) +static int tiva_txavail(struct net_driver_s *dev) { struct tiva_driver_s *priv = (struct tiva_driver_s *)dev->d_private; irqstate_t flags; @@ -1311,7 +1311,7 @@ static int tiva_txavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int tiva_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int tiva_addmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct tiva_driver_s *priv = (FAR struct tiva_driver_s *)dev->d_private; @@ -1341,7 +1341,7 @@ static int tiva_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int tiva_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int tiva_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct tiva_driver_s *priv = (FAR struct tiva_driver_s *)dev->d_private; diff --git a/arch/hc/src/m9s12/m9s12_ethernet.c b/arch/hc/src/m9s12/m9s12_ethernet.c index 759c2819dbe..6d572503bfe 100644 --- a/arch/hc/src/m9s12/m9s12_ethernet.c +++ b/arch/hc/src/m9s12/m9s12_ethernet.c @@ -96,7 +96,7 @@ struct emac_driver_s /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s d_dev; /* Interface understood by uIP */ + struct net_driver_s d_dev; /* Interface understood by uIP */ }; /**************************************************************************** @@ -112,7 +112,7 @@ static struct emac_driver_s g_emac[CONFIG_HCS12_NINTERFACES]; /* Common TX logic */ static int emac_transmit(FAR struct emac_driver_s *priv); -static int emac_uiptxpoll(struct uip_driver_s *dev); +static int emac_uiptxpoll(struct net_driver_s *dev); /* Interrupt handling */ @@ -127,12 +127,12 @@ static void emac_txtimeout(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int emac_ifup(struct uip_driver_s *dev); -static int emac_ifdown(struct uip_driver_s *dev); -static int emac_txavail(struct uip_driver_s *dev); +static int emac_ifup(struct net_driver_s *dev); +static int emac_ifdown(struct net_driver_s *dev); +static int emac_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int emac_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac); -static int emac_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac); +static int emac_addmac(struct net_driver_s *dev, FAR const uint8_t *mac); +static int emac_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac); #endif /**************************************************************************** @@ -202,7 +202,7 @@ static int emac_transmit(FAR struct emac_driver_s *priv) * ****************************************************************************/ -static int emac_uiptxpoll(struct uip_driver_s *dev) +static int emac_uiptxpoll(struct net_driver_s *dev) { FAR struct emac_driver_s *priv = (FAR struct emac_driver_s *)dev->d_private; @@ -452,7 +452,7 @@ static void emac_polltimer(int argc, uint32_t arg, ...) * ****************************************************************************/ -static int emac_ifup(struct uip_driver_s *dev) +static int emac_ifup(struct net_driver_s *dev) { FAR struct emac_driver_s *priv = (FAR struct emac_driver_s *)dev->d_private; @@ -489,7 +489,7 @@ static int emac_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int emac_ifdown(struct uip_driver_s *dev) +static int emac_ifdown(struct net_driver_s *dev) { FAR struct emac_driver_s *priv = (FAR struct emac_driver_s *)dev->d_private; irqstate_t flags; @@ -535,7 +535,7 @@ static int emac_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int emac_txavail(struct uip_driver_s *dev) +static int emac_txavail(struct net_driver_s *dev) { FAR struct emac_driver_s *priv = (FAR struct emac_driver_s *)dev->d_private; irqstate_t flags; @@ -580,7 +580,7 @@ static int emac_txavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int emac_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int emac_addmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct emac_driver_s *priv = (FAR struct emac_driver_s *)dev->d_private; @@ -609,7 +609,7 @@ static int emac_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int emac_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int emac_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct emac_driver_s *priv = (FAR struct emac_driver_s *)dev->d_private; diff --git a/arch/mips/src/pic32mx/pic32mx-ethernet.c b/arch/mips/src/pic32mx/pic32mx-ethernet.c index 6288e6b5276..808aba4cec0 100644 --- a/arch/mips/src/pic32mx/pic32mx-ethernet.c +++ b/arch/mips/src/pic32mx/pic32mx-ethernet.c @@ -353,7 +353,7 @@ struct pic32mx_driver_s /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s pd_dev; /* Interface understood by uIP */ + struct net_driver_s pd_dev; /* Interface understood by uIP */ /* Descriptors and packet buffers */ @@ -410,7 +410,7 @@ static struct pic32mx_rxdesc_s *pic32mx_rxdesc(struct pic32mx_driver_s *priv); /* Common TX logic */ static int pic32mx_transmit(struct pic32mx_driver_s *priv); -static int pic32mx_uiptxpoll(struct uip_driver_s *dev); +static int pic32mx_uiptxpoll(struct net_driver_s *dev); static void pic32mx_poll(struct pic32mx_driver_s *priv); static void pic32mx_timerpoll(struct pic32mx_driver_s *priv); @@ -428,12 +428,12 @@ static void pic32mx_txtimeout(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int pic32mx_ifup(struct uip_driver_s *dev); -static int pic32mx_ifdown(struct uip_driver_s *dev); -static int pic32mx_txavail(struct uip_driver_s *dev); +static int pic32mx_ifup(struct net_driver_s *dev); +static int pic32mx_ifdown(struct net_driver_s *dev); +static int pic32mx_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int pic32mx_addmac(struct uip_driver_s *dev, const uint8_t *mac); -static int pic32mx_rmmac(struct uip_driver_s *dev, const uint8_t *mac); +static int pic32mx_addmac(struct net_driver_s *dev, const uint8_t *mac); +static int pic32mx_rmmac(struct net_driver_s *dev, const uint8_t *mac); #endif /* PHY initialization functions */ @@ -1132,7 +1132,7 @@ static int pic32mx_transmit(struct pic32mx_driver_s *priv) * ****************************************************************************/ -static int pic32mx_uiptxpoll(struct uip_driver_s *dev) +static int pic32mx_uiptxpoll(struct net_driver_s *dev) { struct pic32mx_driver_s *priv = (struct pic32mx_driver_s *)dev->d_private; int ret = OK; @@ -1864,7 +1864,7 @@ static void pic32mx_polltimer(int argc, uint32_t arg, ...) * ****************************************************************************/ -static int pic32mx_ifup(struct uip_driver_s *dev) +static int pic32mx_ifup(struct net_driver_s *dev) { struct pic32mx_driver_s *priv = (struct pic32mx_driver_s *)dev->d_private; uint32_t regval; @@ -2166,7 +2166,7 @@ static int pic32mx_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int pic32mx_ifdown(struct uip_driver_s *dev) +static int pic32mx_ifdown(struct net_driver_s *dev) { struct pic32mx_driver_s *priv = (struct pic32mx_driver_s *)dev->d_private; irqstate_t flags; @@ -2212,7 +2212,7 @@ static int pic32mx_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int pic32mx_txavail(struct uip_driver_s *dev) +static int pic32mx_txavail(struct net_driver_s *dev) { struct pic32mx_driver_s *priv = (struct pic32mx_driver_s *)dev->d_private; irqstate_t flags; @@ -2262,7 +2262,7 @@ static int pic32mx_txavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int pic32mx_addmac(struct uip_driver_s *dev, const uint8_t *mac) +static int pic32mx_addmac(struct net_driver_s *dev, const uint8_t *mac) { struct pic32mx_driver_s *priv = (struct pic32mx_driver_s *)dev->d_private; @@ -2292,7 +2292,7 @@ static int pic32mx_addmac(struct uip_driver_s *dev, const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int pic32mx_rmmac(struct uip_driver_s *dev, const uint8_t *mac) +static int pic32mx_rmmac(struct net_driver_s *dev, const uint8_t *mac) { struct pic32mx_driver_s *priv = (struct pic32mx_driver_s *)dev->d_private; diff --git a/arch/sim/src/up_uipdriver.c b/arch/sim/src/up_uipdriver.c index 9693bc0d217..340b9ebf236 100644 --- a/arch/sim/src/up_uipdriver.c +++ b/arch/sim/src/up_uipdriver.c @@ -84,7 +84,7 @@ struct timer ****************************************************************************/ static struct timer g_periodic_timer; -static struct uip_driver_s g_sim_dev; +static struct net_driver_s g_sim_dev; /**************************************************************************** * Private Functions @@ -115,7 +115,7 @@ static inline int up_comparemac(uint8_t *paddr1, struct ether_addr *paddr2) } #endif -static int sim_uiptxpoll(struct uip_driver_s *dev) +static int sim_uiptxpoll(struct net_driver_s *dev) { /* If the polling resulted in data that should be sent out on the network, * the field d_len is set to a value > 0. diff --git a/arch/z80/src/common/up_internal.h b/arch/z80/src/common/up_internal.h index a4fe041bcd0..c65a5226e44 100644 --- a/arch/z80/src/common/up_internal.h +++ b/arch/z80/src/common/up_internal.h @@ -208,7 +208,7 @@ void up_timerhook(void); int up_netinitialize(void); void up_netuninitialize(void); # ifdef CONFIG_ARCH_MCFILTER -int up_multicastfilter(FAR struct uip_driver_s *dev, FAR uint8_t *mac, bool enable); +int up_multicastfilter(FAR struct net_driver_s *dev, FAR uint8_t *mac, bool enable); # else # define up_multicastfilter(dev, mac, enable) # endif diff --git a/arch/z80/src/ez80/ez80_emac.c b/arch/z80/src/ez80/ez80_emac.c index 8b343c5c002..68de2457e1a 100644 --- a/arch/z80/src/ez80/ez80_emac.c +++ b/arch/z80/src/ez80/ez80_emac.c @@ -319,7 +319,7 @@ struct ez80emac_driver_s /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s dev; /* Interface understood by uIP */ + struct net_driver_s dev; /* Interface understood by uIP */ }; /**************************************************************************** @@ -355,7 +355,7 @@ static void ez80emac_machash(FAR uint8_t *mac, int *ndx, int *bitno) /* TX/RX logic */ static int ez80emac_transmit(struct ez80emac_driver_s *priv); -static int ez80emac_uiptxpoll(struct uip_driver_s *dev); +static int ez80emac_uiptxpoll(struct net_driver_s *dev); static inline FAR struct ez80emac_desc_s *ez80emac_rwp(void); static inline FAR struct ez80emac_desc_s *ez80emac_rrp(void); @@ -374,12 +374,12 @@ static void ez80emac_txtimeout(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int ez80emac_ifup(struct uip_driver_s *dev); -static int ez80emac_ifdown(struct uip_driver_s *dev); -static int ez80emac_txavail(struct uip_driver_s *dev); +static int ez80emac_ifup(struct net_driver_s *dev); +static int ez80emac_ifdown(struct net_driver_s *dev); +static int ez80emac_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int ez80emac_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac); -static int ez80emac_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac); +static int ez80emac_addmac(struct net_driver_s *dev, FAR const uint8_t *mac); +static int ez80emac_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac); #endif /* Initialization */ @@ -1064,7 +1064,7 @@ static int ez80emac_transmit(struct ez80emac_driver_s *priv) * ****************************************************************************/ -static int ez80emac_uiptxpoll(struct uip_driver_s *dev) +static int ez80emac_uiptxpoll(struct net_driver_s *dev) { struct ez80emac_driver_s *priv = (struct ez80emac_driver_s *)dev->d_private; int ret = 0; @@ -1628,7 +1628,7 @@ static void ez80emac_polltimer(int argc, uint32_t arg, ...) * ****************************************************************************/ -static int ez80emac_ifup(FAR struct uip_driver_s *dev) +static int ez80emac_ifup(FAR struct net_driver_s *dev) { FAR struct ez80emac_driver_s *priv = (FAR struct ez80emac_driver_s *)dev->d_private; uint8_t regval; @@ -1723,7 +1723,7 @@ static int ez80emac_ifup(FAR struct uip_driver_s *dev) * ****************************************************************************/ -static int ez80emac_ifdown(struct uip_driver_s *dev) +static int ez80emac_ifdown(struct net_driver_s *dev) { struct ez80emac_driver_s *priv = (struct ez80emac_driver_s *)dev->d_private; irqstate_t flags; @@ -1775,7 +1775,7 @@ static int ez80emac_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int ez80emac_txavail(struct uip_driver_s *dev) +static int ez80emac_txavail(struct net_driver_s *dev) { struct ez80emac_driver_s *priv = (struct ez80emac_driver_s *)dev->d_private; irqstate_t flags; @@ -1817,7 +1817,7 @@ static int ez80emac_txavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int ez80emac_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int ez80emac_addmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct ez80emac_driver_s *priv = (FAR struct ez80emac_driver_s *)dev->d_private; @@ -1847,7 +1847,7 @@ static int ez80emac_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int ez80emac_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int ez80emac_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct ez80emac_driver_s *priv = (FAR struct ez80emac_driver_s *)dev->d_private; @@ -2173,7 +2173,7 @@ int up_netinitialize(void) ****************************************************************************/ #ifdef CONFIG_ARCH_MCFILTER -int up_multicastfilter(FAR struct uip_driver_s *dev, FAR uint8_t *mac, bool enable) +int up_multicastfilter(FAR struct net_driver_s *dev, FAR uint8_t *mac, bool enable) { FAR struct ez80emac_driver_s *priv = (FAR struct ez80emac_driver_s *)dev->priv; uint8_t regval; diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c index b588f716700..f0bad460017 100644 --- a/drivers/net/cs89x0.c +++ b/drivers/net/cs89x0.c @@ -116,7 +116,7 @@ static void cs89x0_putppreg(struct cs89x0_driver_s *cs89x0, int addr, /* Common TX logic */ static int cs89x0_transmit(struct cs89x0_driver_s *cs89x0); -static int cs89x0_uiptxpoll(struct uip_driver_s *dev); +static int cs89x0_uiptxpoll(struct net_driver_s *dev); /* Interrupt handling */ @@ -134,12 +134,12 @@ static void cs89x0_txtimeout(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int cs89x0_ifup(struct uip_driver_s *dev); -static int cs89x0_ifdown(struct uip_driver_s *dev); -static int cs89x0_txavail(struct uip_driver_s *dev); +static int cs89x0_ifup(struct net_driver_s *dev); +static int cs89x0_ifdown(struct net_driver_s *dev); +static int cs89x0_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int cs89x0_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac); -static int cs89x0_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac); +static int cs89x0_addmac(struct net_driver_s *dev, FAR const uint8_t *mac); +static int cs89x0_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac); #endif /**************************************************************************** @@ -327,7 +327,7 @@ static int cs89x0_transmit(struct cs89x0_driver_s *cs89x0) * ****************************************************************************/ -static int cs89x0_uiptxpoll(struct uip_driver_s *dev) +static int cs89x0_uiptxpoll(struct net_driver_s *dev) { struct cs89x0_driver_s *cs89x0 = (struct cs89x0_driver_s *)dev->d_private; @@ -716,7 +716,7 @@ static void cs89x0_polltimer(int argc, uint32_t arg, ...) * ****************************************************************************/ -static int cs89x0_ifup(struct uip_driver_s *dev) +static int cs89x0_ifup(struct net_driver_s *dev) { struct cs89x0_driver_s *cs89x0 = (struct cs89x0_driver_s *)dev->d_private; @@ -754,7 +754,7 @@ static int cs89x0_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int cs89x0_ifdown(struct uip_driver_s *dev) +static int cs89x0_ifdown(struct net_driver_s *dev) { struct cs89x0_driver_s *cs89x0 = (struct cs89x0_driver_s *)dev->d_private; irqstate_t flags; @@ -795,7 +795,7 @@ static int cs89x0_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int cs89x0_txavail(struct uip_driver_s *dev) +static int cs89x0_txavail(struct net_driver_s *dev) { struct cs89x0_driver_s *cs89x0 = (struct cs89x0_driver_s *)dev->d_private; irqstate_t flags; @@ -837,7 +837,7 @@ static int cs89x0_txavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int cs89x0_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int cs89x0_addmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct cs89x0_driver_s *priv = (FAR struct cs89x0_driver_s *)dev->d_private; @@ -867,7 +867,7 @@ static int cs89x0_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int cs89x0_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int cs89x0_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct cs89x0_driver_s *priv = (FAR struct cs89x0_driver_s *)dev->d_private; diff --git a/drivers/net/dm90x0.c b/drivers/net/dm90x0.c index 48ec70a5e00..2a74ce2cb0a 100644 --- a/drivers/net/dm90x0.c +++ b/drivers/net/dm90x0.c @@ -322,7 +322,7 @@ struct dm9x_driver_s /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s dm_dev; + struct net_driver_s dm_dev; }; /**************************************************************************** @@ -376,7 +376,7 @@ static bool dm9x_rxchecksumready(uint8_t); /* Common TX logic */ static int dm9x_transmit(struct dm9x_driver_s *dm9x); -static int dm9x_uiptxpoll(struct uip_driver_s *dev); +static int dm9x_uiptxpoll(struct net_driver_s *dev); /* Interrupt handling */ @@ -391,12 +391,12 @@ static void dm9x_txtimeout(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int dm9x_ifup(struct uip_driver_s *dev); -static int dm9x_ifdown(struct uip_driver_s *dev); -static int dm9x_txavail(struct uip_driver_s *dev); +static int dm9x_ifup(struct net_driver_s *dev); +static int dm9x_ifdown(struct net_driver_s *dev); +static int dm9x_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int dm9x_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac); -static int dm9x_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac); +static int dm9x_addmac(struct net_driver_s *dev, FAR const uint8_t *mac); +static int dm9x_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac); #endif /* Initialization functions */ @@ -839,7 +839,7 @@ static int dm9x_transmit(struct dm9x_driver_s *dm9x) * ****************************************************************************/ -static int dm9x_uiptxpoll(struct uip_driver_s *dev) +static int dm9x_uiptxpoll(struct net_driver_s *dev) { struct dm9x_driver_s *dm9x = (struct dm9x_driver_s *)dev->d_private; @@ -1360,7 +1360,7 @@ static inline void dm9x_phymode(struct dm9x_driver_s *dm9x) * ****************************************************************************/ -static int dm9x_ifup(struct uip_driver_s *dev) +static int dm9x_ifup(struct net_driver_s *dev) { struct dm9x_driver_s *dm9x = (struct dm9x_driver_s *)dev->d_private; uint8_t netstatus; @@ -1425,7 +1425,7 @@ static int dm9x_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int dm9x_ifdown(struct uip_driver_s *dev) +static int dm9x_ifdown(struct net_driver_s *dev) { struct dm9x_driver_s *dm9x = (struct dm9x_driver_s *)dev->d_private; irqstate_t flags; @@ -1478,7 +1478,7 @@ static int dm9x_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int dm9x_txavail(struct uip_driver_s *dev) +static int dm9x_txavail(struct net_driver_s *dev) { struct dm9x_driver_s *dm9x = (struct dm9x_driver_s *)dev->d_private; irqstate_t flags; @@ -1525,7 +1525,7 @@ static int dm9x_txavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int dm9x_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int dm9x_addmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct dm9x_driver_s *priv = (FAR struct dm9x_driver_s *)dev->d_private; @@ -1555,7 +1555,7 @@ static int dm9x_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int dm9x_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int dm9x_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct dm9x_driver_s *priv = (FAR struct dm9x_driver_s *)dev->d_private; diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c index 87f993ba3d6..982ba29f286 100644 --- a/drivers/net/e1000.c +++ b/drivers/net/e1000.c @@ -125,7 +125,7 @@ struct e1000_dev /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s uip_dev; /* Interface understood by uIP */ + struct net_driver_s uip_dev; /* Interface understood by uIP */ }; struct e1000_dev_head @@ -146,7 +146,7 @@ static struct e1000_dev_head e1000_list = {0}; /* Common TX logic */ static int e1000_transmit(struct e1000_dev *e1000); -static int e1000_uiptxpoll(struct uip_driver_s *dev); +static int e1000_uiptxpoll(struct net_driver_s *dev); /* Interrupt handling */ @@ -159,12 +159,12 @@ static void e1000_txtimeout(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int e1000_ifup(struct uip_driver_s *dev); -static int e1000_ifdown(struct uip_driver_s *dev); -static int e1000_txavail(struct uip_driver_s *dev); +static int e1000_ifup(struct net_driver_s *dev); +static int e1000_ifdown(struct net_driver_s *dev); +static int e1000_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int e1000_addmac(struct uip_driver_s *dev, const uint8_t *mac); -static int e1000_rmmac(struct uip_driver_s *dev, const uint8_t *mac); +static int e1000_addmac(struct net_driver_s *dev, const uint8_t *mac); +static int e1000_rmmac(struct net_driver_s *dev, const uint8_t *mac); #endif /**************************************************************************** @@ -476,7 +476,7 @@ static int e1000_transmit(struct e1000_dev *e1000) * ****************************************************************************/ -static int e1000_uiptxpoll(struct uip_driver_s *dev) +static int e1000_uiptxpoll(struct net_driver_s *dev) { struct e1000_dev *e1000 = (struct e1000_dev *)dev->d_private; int tail = e1000->tx_ring.tail; @@ -705,7 +705,7 @@ static void e1000_polltimer(int argc, uint32_t arg, ...) * ****************************************************************************/ -static int e1000_ifup(struct uip_driver_s *dev) +static int e1000_ifup(struct net_driver_s *dev) { struct e1000_dev *e1000 = (struct e1000_dev *)dev->d_private; @@ -749,7 +749,7 @@ static int e1000_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int e1000_ifdown(struct uip_driver_s *dev) +static int e1000_ifdown(struct net_driver_s *dev) { struct e1000_dev *e1000 = (struct e1000_dev *)dev->d_private; irqstate_t flags; @@ -799,7 +799,7 @@ static int e1000_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int e1000_txavail(struct uip_driver_s *dev) +static int e1000_txavail(struct net_driver_s *dev) { struct e1000_dev *e1000 = (struct e1000_dev *)dev->d_private; int tail = e1000->tx_ring.tail; @@ -846,7 +846,7 @@ static int e1000_txavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int e1000_addmac(struct uip_driver_s *dev, const uint8_t *mac) +static int e1000_addmac(struct net_driver_s *dev, const uint8_t *mac) { /* Add the MAC address to the hardware multicast routing table */ @@ -873,7 +873,7 @@ static int e1000_addmac(struct uip_driver_s *dev, const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int e1000_rmmac(struct uip_driver_s *dev, const uint8_t *mac) +static int e1000_rmmac(struct net_driver_s *dev, const uint8_t *mac) { /* Add the MAC address to the hardware multicast routing table */ diff --git a/drivers/net/enc28j60.c b/drivers/net/enc28j60.c index c657c18c985..52538e57563 100644 --- a/drivers/net/enc28j60.c +++ b/drivers/net/enc28j60.c @@ -247,7 +247,7 @@ struct enc_driver_s /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s dev; /* Interface understood by uIP */ + struct net_driver_s dev; /* Interface understood by uIP */ /* Statistics */ @@ -312,7 +312,7 @@ static void enc_wrphy(FAR struct enc_driver_s *priv, uint8_t phyaddr, /* Common TX logic */ static int enc_transmit(FAR struct enc_driver_s *priv); -static int enc_uiptxpoll(struct uip_driver_s *dev); +static int enc_uiptxpoll(struct net_driver_s *dev); /* Interrupt handling */ @@ -335,12 +335,12 @@ static void enc_polltimer(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int enc_ifup(struct uip_driver_s *dev); -static int enc_ifdown(struct uip_driver_s *dev); -static int enc_txavail(struct uip_driver_s *dev); +static int enc_ifup(struct net_driver_s *dev); +static int enc_ifdown(struct net_driver_s *dev); +static int enc_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int enc_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac); -static int enc_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac); +static int enc_addmac(struct net_driver_s *dev, FAR const uint8_t *mac); +static int enc_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac); #endif /* Initialization */ @@ -1184,7 +1184,7 @@ static int enc_transmit(FAR struct enc_driver_s *priv) * ****************************************************************************/ -static int enc_uiptxpoll(struct uip_driver_s *dev) +static int enc_uiptxpoll(struct net_driver_s *dev) { FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)dev->d_private; @@ -1993,7 +1993,7 @@ static void enc_polltimer(int argc, uint32_t arg, ...) * ****************************************************************************/ -static int enc_ifup(struct uip_driver_s *dev) +static int enc_ifup(struct net_driver_s *dev) { FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)dev->d_private; int ret; @@ -2063,7 +2063,7 @@ static int enc_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int enc_ifdown(struct uip_driver_s *dev) +static int enc_ifdown(struct net_driver_s *dev) { FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)dev->d_private; irqstate_t flags; @@ -2120,7 +2120,7 @@ static int enc_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int enc_txavail(struct uip_driver_s *dev) +static int enc_txavail(struct net_driver_s *dev) { FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)dev->d_private; irqstate_t flags; @@ -2174,7 +2174,7 @@ static int enc_txavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int enc_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int enc_addmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)dev->d_private; @@ -2212,7 +2212,7 @@ static int enc_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int enc_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int enc_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)dev->d_private; diff --git a/drivers/net/encx24j600.c b/drivers/net/encx24j600.c index 8beaf9d7fae..28ed6da521b 100644 --- a/drivers/net/encx24j600.c +++ b/drivers/net/encx24j600.c @@ -260,7 +260,7 @@ struct enc_driver_s /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s dev; /* Interface understood by uIP */ + struct net_driver_s dev; /* Interface understood by uIP */ /* Statistics */ @@ -328,7 +328,7 @@ static void enc_wrphy(FAR struct enc_driver_s *priv, uint8_t phyaddr, static int enc_txenqueue(FAR struct enc_driver_s *priv); static int enc_transmit(FAR struct enc_driver_s *priv); -static int enc_uiptxpoll(struct uip_driver_s *dev); +static int enc_uiptxpoll(struct net_driver_s *dev); /* Common RX logic */ @@ -355,13 +355,13 @@ static void enc_polltimer(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int enc_ifup(struct uip_driver_s *dev); -static int enc_ifdown(struct uip_driver_s *dev); -static int enc_txavail(struct uip_driver_s *dev); -static int enc_rxavail(struct uip_driver_s *dev); +static int enc_ifup(struct net_driver_s *dev); +static int enc_ifdown(struct net_driver_s *dev); +static int enc_txavail(struct net_driver_s *dev); +static int enc_rxavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int enc_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac); -static int enc_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac); +static int enc_addmac(struct net_driver_s *dev, FAR const uint8_t *mac); +static int enc_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac); #endif /* Initialization */ @@ -1196,7 +1196,7 @@ static int enc_txenqueue(FAR struct enc_driver_s *priv) * ****************************************************************************/ -static int enc_uiptxpoll(struct uip_driver_s *dev) +static int enc_uiptxpoll(struct net_driver_s *dev) { FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)dev->d_private; int ret = OK; @@ -2165,7 +2165,7 @@ static void enc_polltimer(int argc, uint32_t arg, ...) * ****************************************************************************/ -static int enc_ifup(struct uip_driver_s *dev) +static int enc_ifup(struct net_driver_s *dev) { FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)dev->d_private; int ret; @@ -2239,7 +2239,7 @@ static int enc_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int enc_ifdown(struct uip_driver_s *dev) +static int enc_ifdown(struct net_driver_s *dev) { FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)dev->d_private; irqstate_t flags; @@ -2297,7 +2297,7 @@ static int enc_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int enc_txavail(struct uip_driver_s *dev) +static int enc_txavail(struct net_driver_s *dev) { FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)dev->d_private; irqstate_t flags; @@ -2352,7 +2352,7 @@ static int enc_txavail(struct uip_driver_s *dev) * ****************************************************************************/ -static int enc_rxavail(struct uip_driver_s *dev) +static int enc_rxavail(struct net_driver_s *dev) { FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)dev->d_private; @@ -2384,7 +2384,7 @@ static int enc_rxavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int enc_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int enc_addmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)dev->d_private; @@ -2422,7 +2422,7 @@ static int enc_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int enc_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int enc_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)dev->d_private; diff --git a/drivers/net/skeleton.c b/drivers/net/skeleton.c index a8283f0fd62..6730e6ef153 100644 --- a/drivers/net/skeleton.c +++ b/drivers/net/skeleton.c @@ -96,7 +96,7 @@ struct skel_driver_s /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s sk_dev; /* Interface understood by uIP */ + struct net_driver_s sk_dev; /* Interface understood by uIP */ }; /**************************************************************************** @@ -112,7 +112,7 @@ static struct skel_driver_s g_skel[CONFIG_skeleton_NINTERFACES]; /* Common TX logic */ static int skel_transmit(FAR struct skel_driver_s *skel); -static int skel_uiptxpoll(struct uip_driver_s *dev); +static int skel_uiptxpoll(struct net_driver_s *dev); /* Interrupt handling */ @@ -127,12 +127,12 @@ static void skel_txtimeout(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int skel_ifup(struct uip_driver_s *dev); -static int skel_ifdown(struct uip_driver_s *dev); -static int skel_txavail(struct uip_driver_s *dev); +static int skel_ifup(struct net_driver_s *dev); +static int skel_ifdown(struct net_driver_s *dev); +static int skel_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int skel_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac); -static int skel_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac); +static int skel_addmac(struct net_driver_s *dev, FAR const uint8_t *mac); +static int skel_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac); #endif /**************************************************************************** @@ -202,7 +202,7 @@ static int skel_transmit(FAR struct skel_driver_s *skel) * ****************************************************************************/ -static int skel_uiptxpoll(struct uip_driver_s *dev) +static int skel_uiptxpoll(struct net_driver_s *dev) { FAR struct skel_driver_s *skel = (FAR struct skel_driver_s *)dev->d_private; @@ -452,7 +452,7 @@ static void skel_polltimer(int argc, uint32_t arg, ...) * ****************************************************************************/ -static int skel_ifup(struct uip_driver_s *dev) +static int skel_ifup(struct net_driver_s *dev) { FAR struct skel_driver_s *skel = (FAR struct skel_driver_s *)dev->d_private; @@ -489,7 +489,7 @@ static int skel_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int skel_ifdown(struct uip_driver_s *dev) +static int skel_ifdown(struct net_driver_s *dev) { FAR struct skel_driver_s *skel = (FAR struct skel_driver_s *)dev->d_private; irqstate_t flags; @@ -535,7 +535,7 @@ static int skel_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int skel_txavail(struct uip_driver_s *dev) +static int skel_txavail(struct net_driver_s *dev) { FAR struct skel_driver_s *skel = (FAR struct skel_driver_s *)dev->d_private; irqstate_t flags; @@ -580,7 +580,7 @@ static int skel_txavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int skel_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int skel_addmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct skel_driver_s *skel = (FAR struct skel_driver_s *)dev->d_private; @@ -609,7 +609,7 @@ static int skel_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int skel_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int skel_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct skel_driver_s *skel = (FAR struct skel_driver_s *)dev->d_private; diff --git a/drivers/net/slip.c b/drivers/net/slip.c index c1d669183da..1a4873e77d8 100644 --- a/drivers/net/slip.c +++ b/drivers/net/slip.c @@ -176,7 +176,7 @@ struct slip_driver_s /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s dev; /* Interface understood by uIP */ + struct net_driver_s dev; /* Interface understood by uIP */ uint8_t rxbuf[CONFIG_NET_BUFSIZE + 2]; uint8_t txbuf[CONFIG_NET_BUFSIZE + 2]; }; @@ -202,7 +202,7 @@ static void slip_semtake(FAR struct slip_driver_s *priv); static void slip_write(FAR struct slip_driver_s *priv, const uint8_t *buffer, int len); static void slip_putc(FAR struct slip_driver_s *priv, int ch); static int slip_transmit(FAR struct slip_driver_s *priv); -static int slip_uiptxpoll(struct uip_driver_s *dev); +static int slip_uiptxpoll(struct net_driver_s *dev); static void slip_txtask(int argc, char *argv[]); /* Packet receiver task */ @@ -213,12 +213,12 @@ static int slip_rxtask(int argc, char *argv[]); /* NuttX callback functions */ -static int slip_ifup(struct uip_driver_s *dev); -static int slip_ifdown(struct uip_driver_s *dev); -static int slip_txavail(struct uip_driver_s *dev); +static int slip_ifup(struct net_driver_s *dev); +static int slip_ifdown(struct net_driver_s *dev); +static int slip_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int slip_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac); -static int slip_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac); +static int slip_addmac(struct net_driver_s *dev, FAR const uint8_t *mac); +static int slip_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac); #endif /**************************************************************************** @@ -419,7 +419,7 @@ static int slip_transmit(FAR struct slip_driver_s *priv) * ****************************************************************************/ -static int slip_uiptxpoll(struct uip_driver_s *dev) +static int slip_uiptxpoll(struct net_driver_s *dev) { FAR struct slip_driver_s *priv = (FAR struct slip_driver_s *)dev->d_private; @@ -760,7 +760,7 @@ static int slip_rxtask(int argc, char *argv[]) * ****************************************************************************/ -static int slip_ifup(struct uip_driver_s *dev) +static int slip_ifup(struct net_driver_s *dev) { FAR struct slip_driver_s *priv = (FAR struct slip_driver_s *)dev->d_private; @@ -790,7 +790,7 @@ static int slip_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int slip_ifdown(struct uip_driver_s *dev) +static int slip_ifdown(struct net_driver_s *dev) { FAR struct slip_driver_s *priv = (FAR struct slip_driver_s *)dev->d_private; @@ -816,7 +816,7 @@ static int slip_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int slip_txavail(struct uip_driver_s *dev) +static int slip_txavail(struct net_driver_s *dev) { FAR struct slip_driver_s *priv = (FAR struct slip_driver_s *)dev->d_private; @@ -851,7 +851,7 @@ static int slip_txavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int slip_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int slip_addmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct slip_driver_s *priv = (FAR struct slip_driver_s *)dev->d_private; @@ -880,7 +880,7 @@ static int slip_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int slip_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int slip_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct slip_driver_s *priv = (FAR struct slip_driver_s *)dev->d_private; diff --git a/drivers/net/vnet.c b/drivers/net/vnet.c index 3770533b40b..31511172202 100644 --- a/drivers/net/vnet.c +++ b/drivers/net/vnet.c @@ -103,7 +103,7 @@ struct vnet_driver_s /* This holds the information visible to uIP/NuttX */ struct rgmp_vnet *vnet; - struct uip_driver_s sk_dev; /* Interface understood by uIP */ + struct net_driver_s sk_dev; /* Interface understood by uIP */ }; /**************************************************************************** @@ -119,7 +119,7 @@ static struct vnet_driver_s g_vnet[CONFIG_VNET_NINTERFACES]; /* Common TX logic */ static int vnet_transmit(FAR struct vnet_driver_s *vnet); -static int vnet_uiptxpoll(struct uip_driver_s *dev); +static int vnet_uiptxpoll(struct net_driver_s *dev); /* Interrupt handling */ @@ -132,12 +132,12 @@ static void vnet_txtimeout(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int vnet_ifup(struct uip_driver_s *dev); -static int vnet_ifdown(struct uip_driver_s *dev); -static int vnet_txavail(struct uip_driver_s *dev); +static int vnet_ifup(struct net_driver_s *dev); +static int vnet_ifdown(struct net_driver_s *dev); +static int vnet_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int vnet_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac); -static int vnet_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac); +static int vnet_addmac(struct net_driver_s *dev, FAR const uint8_t *mac); +static int vnet_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac); #endif /**************************************************************************** @@ -221,7 +221,7 @@ static int vnet_transmit(FAR struct vnet_driver_s *vnet) * ****************************************************************************/ -static int vnet_uiptxpoll(struct uip_driver_s *dev) +static int vnet_uiptxpoll(struct net_driver_s *dev) { FAR struct vnet_driver_s *vnet = (FAR struct vnet_driver_s *)dev->d_private; @@ -441,7 +441,7 @@ static void vnet_polltimer(int argc, uint32_t arg, ...) * ****************************************************************************/ -static int vnet_ifup(struct uip_driver_s *dev) +static int vnet_ifup(struct net_driver_s *dev) { FAR struct vnet_driver_s *vnet = (FAR struct vnet_driver_s *)dev->d_private; @@ -475,7 +475,7 @@ static int vnet_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int vnet_ifdown(struct uip_driver_s *dev) +static int vnet_ifdown(struct net_driver_s *dev) { FAR struct vnet_driver_s *vnet = (FAR struct vnet_driver_s *)dev->d_private; irqstate_t flags; @@ -520,7 +520,7 @@ static int vnet_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int vnet_txavail(struct uip_driver_s *dev) +static int vnet_txavail(struct net_driver_s *dev) { FAR struct vnet_driver_s *vnet = (FAR struct vnet_driver_s *)dev->d_private; irqstate_t flags; @@ -572,7 +572,7 @@ static int vnet_txavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int vnet_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int vnet_addmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct vnet_driver_s *vnet = (FAR struct vnet_driver_s *)dev->d_private; @@ -601,7 +601,7 @@ static int vnet_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int vnet_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int vnet_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct vnet_driver_s *vnet = (FAR struct vnet_driver_s *)dev->d_private; diff --git a/include/nuttx/net/arp.h b/include/nuttx/net/arp.h index 2a257b8bd1a..06f54d9d858 100644 --- a/include/nuttx/net/arp.h +++ b/include/nuttx/net/arp.h @@ -134,7 +134,7 @@ void arp_init(void); ****************************************************************************/ #ifdef CONFIG_NET_ARP_IPIN -void arp_ipin(struct uip_driver_s *dev); +void arp_ipin(struct net_driver_s *dev); #else # define arp_ipin(dev) #endif @@ -152,7 +152,7 @@ void arp_ipin(struct uip_driver_s *dev); * ****************************************************************************/ -void arp_arpin(struct uip_driver_s *dev); +void arp_arpin(struct net_driver_s *dev); /**************************************************************************** * Name: arp_arpin @@ -171,7 +171,7 @@ void arp_arpin(struct uip_driver_s *dev); * ****************************************************************************/ -void arp_out(struct uip_driver_s *dev); +void arp_out(struct net_driver_s *dev); /**************************************************************************** * Function: arp_timer_init diff --git a/include/nuttx/net/cs89x0.h b/include/nuttx/net/cs89x0.h index 2ba876f9b50..f12b364c42c 100644 --- a/include/nuttx/net/cs89x0.h +++ b/include/nuttx/net/cs89x0.h @@ -110,7 +110,7 @@ struct cs89x0_driver_s /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s cs_dev; /* Interface understood by uIP */ + struct net_driver_s cs_dev; /* Interface understood by uIP */ /* Driver statistics */ diff --git a/include/nuttx/net/igmp.h b/include/nuttx/net/igmp.h index fce07b0a64c..67f676c5a99 100644 --- a/include/nuttx/net/igmp.h +++ b/include/nuttx/net/igmp.h @@ -247,10 +247,10 @@ EXTERN uip_ipaddr_t g_allrouters; * ****************************************************************************/ -void igmp_devinit(FAR struct uip_driver_s *dev); -int igmp_joingroup(FAR struct uip_driver_s *dev, +void igmp_devinit(FAR struct net_driver_s *dev); +int igmp_joingroup(FAR struct net_driver_s *dev, FAR const struct in_addr *grpaddr); -int igmp_leavegroup(FAR struct uip_driver_s *dev, +int igmp_leavegroup(FAR struct net_driver_s *dev, FAR const struct in_addr *grpaddr); #undef EXTERN diff --git a/include/nuttx/net/net.h b/include/nuttx/net/net.h index 64602b07345..707a499b004 100644 --- a/include/nuttx/net/net.h +++ b/include/nuttx/net/net.h @@ -125,8 +125,8 @@ struct socketlist /* Callback from netdev_foreach() */ -struct uip_driver_s; /* Forward reference. Defined in nuttx/net/netdev.h */ -typedef int (*netdev_callback_t)(FAR struct uip_driver_s *dev, void *arg); +struct net_driver_s; /* Forward reference. Defined in nuttx/net/netdev.h */ +typedef int (*netdev_callback_t)(FAR struct net_driver_s *dev, void *arg); /**************************************************************************** * Public Data @@ -294,12 +294,12 @@ int net_vfcntl(int sockfd, int cmd, va_list ap); * addresses */ -int netdev_register(FAR struct uip_driver_s *dev); +int netdev_register(FAR struct net_driver_s *dev); /* netdev-unregister.c *********************************************************/ /* Unregister a network device driver. */ -int netdev_unregister(FAR struct uip_driver_s *dev); +int netdev_unregister(FAR struct net_driver_s *dev); /* net_foreach.c ************************************************************/ /* Enumerates all registered network devices */ diff --git a/include/nuttx/net/netdev.h b/include/nuttx/net/netdev.h index cc781a77df5..194d8ea3df6 100644 --- a/include/nuttx/net/netdev.h +++ b/include/nuttx/net/netdev.h @@ -73,14 +73,14 @@ * of this structure. */ -struct uip_driver_s +struct net_driver_s { /* This link is used to maintain a single-linked list of ethernet drivers. * Must be the first field in the structure due to blink type casting. */ #if CONFIG_NSOCKET_DESCRIPTORS > 0 - FAR struct uip_driver_s *flink; + FAR struct net_driver_s *flink; /* This is the name of network device assigned when netdev_register was called. * This name is only used to support socket ioctl lookups by device name @@ -177,15 +177,15 @@ struct uip_driver_s /* Driver callbacks */ - int (*d_ifup)(struct uip_driver_s *dev); - int (*d_ifdown)(struct uip_driver_s *dev); - int (*d_txavail)(struct uip_driver_s *dev); + int (*d_ifup)(struct net_driver_s *dev); + int (*d_ifdown)(struct net_driver_s *dev); + int (*d_txavail)(struct net_driver_s *dev); #ifdef CONFIG_NET_RXAVAIL - int (*d_rxavail)(struct uip_driver_s *dev); + int (*d_rxavail)(struct net_driver_s *dev); #endif #ifdef CONFIG_NET_IGMP - int (*d_addmac)(struct uip_driver_s *dev, FAR const uint8_t *mac); - int (*d_rmmac)(struct uip_driver_s *dev, FAR const uint8_t *mac); + int (*d_addmac)(struct net_driver_s *dev, FAR const uint8_t *mac); + int (*d_rmmac)(struct net_driver_s *dev, FAR const uint8_t *mac); #endif #ifdef CONFIG_NETDEV_PHY_IOCTL int (*d_ioctl)(int cmd, struct mii_ioctl_data *req); @@ -263,7 +263,7 @@ struct uip_driver_s * } */ -int uip_input(struct uip_driver_s *dev); +int uip_input(struct net_driver_s *dev); /* Polling of connections * @@ -315,9 +315,9 @@ int uip_input(struct uip_driver_s *dev); * } */ -typedef int (*uip_poll_callback_t)(struct uip_driver_s *dev); -int uip_poll(struct uip_driver_s *dev, uip_poll_callback_t callback); -int uip_timer(struct uip_driver_s *dev, uip_poll_callback_t callback, int hsec); +typedef int (*uip_poll_callback_t)(struct net_driver_s *dev); +int uip_poll(struct net_driver_s *dev, uip_poll_callback_t callback); +int uip_timer(struct net_driver_s *dev, uip_poll_callback_t callback, int hsec); /* Carrier detection * Call netdev_carrier_on when the carrier has become available and the device @@ -327,8 +327,8 @@ int uip_timer(struct uip_driver_s *dev, uip_poll_callback_t callback, int hsec); * into non operational state. */ -int netdev_carrier_on(FAR struct uip_driver_s *dev); -int netdev_carrier_off(FAR struct uip_driver_s *dev); +int netdev_carrier_on(FAR struct net_driver_s *dev); +int netdev_carrier_off(FAR struct net_driver_s *dev); /* By defining UIP_ARCH_CHKSUM, the architecture can replace up_incr32 * with hardware assisted solutions. @@ -375,7 +375,7 @@ uint16_t uip_chksum(uint16_t *buf, uint16_t len); * buffer. */ -uint16_t uip_ipchksum(struct uip_driver_s *dev); +uint16_t uip_ipchksum(struct net_driver_s *dev); /* Calculate the TCP checksum of the packet in d_buf and d_appdata. * @@ -390,8 +390,8 @@ uint16_t uip_ipchksum(struct uip_driver_s *dev); * to by d_appdata. */ -uint16_t tcp_chksum(struct uip_driver_s *dev); -uint16_t udp_chksum(struct uip_driver_s *dev); -uint16_t icmp_chksum(struct uip_driver_s *dev, int len); +uint16_t tcp_chksum(struct net_driver_s *dev); +uint16_t udp_chksum(struct net_driver_s *dev); +uint16_t icmp_chksum(struct net_driver_s *dev, int len); #endif /* __INCLUDE_NUTTX_NET_NETDEV_H */ diff --git a/include/nuttx/net/pkt.h b/include/nuttx/net/pkt.h index 2dfd85d2d66..843a756e6b4 100644 --- a/include/nuttx/net/pkt.h +++ b/include/nuttx/net/pkt.h @@ -98,7 +98,7 @@ FAR struct pkt_conn_s *pkt_alloc(void); */ void pkt_free(FAR struct pkt_conn_s *conn); -void pkt_poll(FAR struct uip_driver_s *dev, FAR struct pkt_conn_s *conn); -int pkt_input(FAR struct uip_driver_s *dev); +void pkt_poll(FAR struct net_driver_s *dev, FAR struct pkt_conn_s *conn); +int pkt_input(FAR struct net_driver_s *dev); #endif /* __INCLUDE_NUTTX_NET_PKT_H */ diff --git a/include/nuttx/net/tcp.h b/include/nuttx/net/tcp.h index c8c88480604..635f67ce115 100644 --- a/include/nuttx/net/tcp.h +++ b/include/nuttx/net/tcp.h @@ -161,7 +161,7 @@ * file pointers) for the connection. */ -struct uip_driver_s; /* Forward reference */ +struct net_driver_s; /* Forward reference */ struct uip_callback_s; /* Forward reference */ struct tcp_backlog_s; /* Forward reference */ diff --git a/include/nuttx/net/udp.h b/include/nuttx/net/udp.h index fe777913dd3..33f68130c9b 100644 --- a/include/nuttx/net/udp.h +++ b/include/nuttx/net/udp.h @@ -69,7 +69,7 @@ /* Representation of a uIP UDP connection */ -struct uip_driver_s; /* Forward reference */ +struct net_driver_s; /* Forward reference */ struct uip_callback_s; /* Forward reference */ struct udp_conn_s { diff --git a/include/nuttx/net/uip.h b/include/nuttx/net/uip.h index 96b443e3c5d..255c561c794 100644 --- a/include/nuttx/net/uip.h +++ b/include/nuttx/net/uip.h @@ -217,11 +217,11 @@ struct uip_ip_hdr * are and are not handled by the callback. */ -struct uip_driver_s; /* Forward reference */ +struct net_driver_s; /* Forward reference */ struct uip_callback_s { FAR struct uip_callback_s *flink; - uint16_t (*event)(struct uip_driver_s *dev, void *pvconn, void *pvpriv, uint16_t flags); + uint16_t (*event)(struct net_driver_s *dev, void *pvconn, void *pvpriv, uint16_t flags); void *priv; uint16_t flags; }; diff --git a/net/README.txt b/net/README.txt index 7370944c121..f072c0786f5 100644 --- a/net/README.txt +++ b/net/README.txt @@ -1,38 +1,38 @@ -README -====== - -Directory Structure -=================== - - nuttx/ - | - `- net/ - | - +- arp - Address resolution protocol - +- devif - Stack/device interface layer - +- icmp - Internet Control Message Protocol - +- iob - I/O buffering logic - +- netdev - Socket network device interface - +- pkt - "Raw" packet socket support - +- socket - BSD socket interface - +- route - Routing table support - +- tcp - Transmission Control Protocol - +- udp - User Datagram Protocol - `- utils - Miscellaneous utility functions - - - +-------------------------------------------------------------+ - | Application layer | - +-------------------------------------------------------------+ - +-------------------------------------------------------------+ - | Socket layer (socket/) | - +-------------------------------------------------------------+ - +------------++-----------------------------------------------+ - | Network || Protocol stacks (arp, icmp, pkt, tcp, udp) | - | Device |+-----------------------------------------------+ - | Interface |+---------------------------------++------------+ - | (netdev/) ||Network Device Interface (devif/)|| Utilities | - +------------++---------------------------------++------------+ - +-------------------------------------------------------------+ - | Network Device Drivers | - +-------------------------------------------------------------+ +README +====== + +Directory Structure +=================== + + nuttx/ + | + `- net/ + | + +- arp - Address resolution protocol + +- devif - Stack/device interface layer + +- icmp - Internet Control Message Protocol + +- iob - I/O buffering logic + +- netdev - Socket network device interface + +- pkt - "Raw" packet socket support + +- socket - BSD socket interface + +- route - Routing table support + +- tcp - Transmission Control Protocol + +- udp - User Datagram Protocol + `- utils - Miscellaneous utility functions + + + +-------------------------------------------------------------+ + | Application layer | + +-------------------------------------------------------------+ + +-------------------------------------------------------------+ + | Socket layer (socket/) | + +-------------------------------------------------------------+ + +------------++-----------------------------------------------+ + | Network || Protocol stacks (arp, icmp, pkt, tcp, udp) | + | Device |+-----------------------------------------------+ + | Interface |+---------------------------------++------------+ + | (netdev/) ||Network Device Interface (devif/)|| Utilities | + +------------++---------------------------------++------------+ + +-------------------------------------------------------------+ + | Network Device Drivers | + +-------------------------------------------------------------+ diff --git a/net/arp/arp_inout.c b/net/arp/arp_inout.c index d4fb1e0f934..57e081de4a3 100644 --- a/net/arp/arp_inout.c +++ b/net/arp/arp_inout.c @@ -195,7 +195,7 @@ static void arp_dump(struct arp_hdr_s *arp) */ #ifdef CONFIG_NET_ARP_IPIN -void arp_ipin(struct uip_driver_s *dev) +void arp_ipin(struct net_driver_s *dev) { in_addr_t srcipaddr; @@ -232,7 +232,7 @@ void arp_ipin(struct uip_driver_s *dev) * variable d_len. */ -void arp_arpin(struct uip_driver_s *dev) +void arp_arpin(struct net_driver_s *dev) { struct arp_hdr_s *parp = ARPBUF; in_addr_t ipaddr; @@ -321,7 +321,7 @@ void arp_arpin(struct uip_driver_s *dev) * buffer, and the length of the packet is in the field d_len. */ -void arp_out(struct uip_driver_s *dev) +void arp_out(struct net_driver_s *dev) { const struct arp_entry *tabptr = NULL; struct arp_hdr_s *parp = ARPBUF; diff --git a/net/connect.c b/net/connect.c index cb0a1a6060b..0f370106647 100644 --- a/net/connect.c +++ b/net/connect.c @@ -80,7 +80,7 @@ static inline int psock_setup_callbacks(FAR struct socket *psock, FAR struct tcp_connect_s *pstate); static inline void psock_teardown_callbacks(FAR struct tcp_connect_s *pstate, int status); -static uint16_t psock_connect_interrupt(FAR struct uip_driver_s *dev, +static uint16_t psock_connect_interrupt(FAR struct net_driver_s *dev, FAR void *pvconn, FAR void *pvpriv, uint16_t flags); #ifdef CONFIG_NET_IPv6 @@ -181,7 +181,7 @@ static inline void psock_teardown_callbacks(FAR struct tcp_connect_s *pstate, ****************************************************************************/ #ifdef CONFIG_NET_TCP -static uint16_t psock_connect_interrupt(FAR struct uip_driver_s *dev, +static uint16_t psock_connect_interrupt(FAR struct net_driver_s *dev, FAR void *pvconn, FAR void *pvpriv, uint16_t flags) { diff --git a/net/getsockname.c b/net/getsockname.c index 7d39f2cb819..fb05eb5af93 100644 --- a/net/getsockname.c +++ b/net/getsockname.c @@ -100,7 +100,7 @@ int getsockname(int sockfd, FAR struct sockaddr *addr, FAR socklen_t *addrlen) { FAR struct socket *psock = sockfd_socket(sockfd); - FAR struct uip_driver_s *dev; + FAR struct net_driver_s *dev; #if defined(CONFIG_NET_TCP) || defined(CONFIG_NET_UDP) #ifdef CONFIG_NET_IPv6 diff --git a/net/icmp/icmp.h b/net/icmp/icmp.h index fe0376781b2..dd644d9ee4f 100644 --- a/net/icmp/icmp.h +++ b/net/icmp/icmp.h @@ -72,18 +72,18 @@ extern "C" /* Defined in icmp_input.c **************************************************/ -void icmp_input(FAR struct uip_driver_s *dev); +void icmp_input(FAR struct net_driver_s *dev); /* Defined in icmp_poll.c ***************************************************/ #ifdef CONFIG_NET_ICMP_PING -void icmp_poll(FAR struct uip_driver_s *dev); +void icmp_poll(FAR struct net_driver_s *dev); #endif /* CONFIG_NET_ICMP_PING */ /* Defined in icmp_send.c ***************************************************/ #ifdef CONFIG_NET_ICMP_PING -void icmp_send(FAR struct uip_driver_s *dev, FAR uip_ipaddr_t *destaddr); +void icmp_send(FAR struct net_driver_s *dev, FAR uip_ipaddr_t *destaddr); #endif /* CONFIG_NET_ICMP_PING */ #undef EXTERN diff --git a/net/icmp/icmp_input.c b/net/icmp/icmp_input.c index 432582b7082..2958b323fc5 100644 --- a/net/icmp/icmp_input.c +++ b/net/icmp/icmp_input.c @@ -103,7 +103,7 @@ FAR struct uip_callback_s *g_echocallback = NULL; * ****************************************************************************/ -void icmp_input(FAR struct uip_driver_s *dev) +void icmp_input(FAR struct net_driver_s *dev) { FAR struct icmp_iphdr_s *picmp = ICMPBUF; diff --git a/net/icmp/icmp_ping.c b/net/icmp/icmp_ping.c index 5e46f76ceaa..0054f209664 100644 --- a/net/icmp/icmp_ping.c +++ b/net/icmp/icmp_ping.c @@ -152,7 +152,7 @@ static inline int ping_timeout(FAR struct icmp_ping_s *pstate) * ****************************************************************************/ -static uint16_t ping_interrupt(FAR struct uip_driver_s *dev, FAR void *conn, +static uint16_t ping_interrupt(FAR struct net_driver_s *dev, FAR void *conn, FAR void *pvpriv, uint16_t flags) { FAR struct icmp_ping_s *pstate = (struct icmp_ping_s *)pvpriv; diff --git a/net/icmp/icmp_poll.c b/net/icmp/icmp_poll.c index 2beab639d81..af98e26f386 100644 --- a/net/icmp/icmp_poll.c +++ b/net/icmp/icmp_poll.c @@ -86,7 +86,7 @@ * ****************************************************************************/ -void icmp_poll(FAR struct uip_driver_s *dev) +void icmp_poll(FAR struct net_driver_s *dev) { /* Setup for the application callback */ diff --git a/net/icmp/icmp_send.c b/net/icmp/icmp_send.c index a8fe0957898..7ee1fb1fa5b 100644 --- a/net/icmp/icmp_send.c +++ b/net/icmp/icmp_send.c @@ -89,7 +89,7 @@ * ****************************************************************************/ -void icmp_send(FAR struct uip_driver_s *dev, FAR uip_ipaddr_t *destaddr) +void icmp_send(FAR struct net_driver_s *dev, FAR uip_ipaddr_t *destaddr) { FAR struct icmp_iphdr_s *picmp = ICMPBUF; diff --git a/net/igmp/igmp.h b/net/igmp/igmp.h index 1f33fb872e6..2285dbd8b11 100644 --- a/net/igmp/igmp.h +++ b/net/igmp/igmp.h @@ -76,18 +76,18 @@ void igmp_initialize(void); /* Defined in igmp_input.c **************************************************/ -void igmp_input(struct uip_driver_s *dev); +void igmp_input(struct net_driver_s *dev); /* Defined in igmp_group.c **************************************************/ void igmp_grpinit(void); -FAR struct igmp_group_s *igmp_grpalloc(FAR struct uip_driver_s *dev, +FAR struct igmp_group_s *igmp_grpalloc(FAR struct net_driver_s *dev, FAR const uip_ipaddr_t *addr); -FAR struct igmp_group_s *igmp_grpfind(FAR struct uip_driver_s *dev, +FAR struct igmp_group_s *igmp_grpfind(FAR struct net_driver_s *dev, FAR const uip_ipaddr_t *addr); -FAR struct igmp_group_s *igmp_grpallocfind(FAR struct uip_driver_s *dev, +FAR struct igmp_group_s *igmp_grpallocfind(FAR struct net_driver_s *dev, FAR const uip_ipaddr_t *addr); -void igmp_grpfree(FAR struct uip_driver_s *dev, +void igmp_grpfree(FAR struct net_driver_s *dev, FAR struct igmp_group_s *group); /* Defined in igmp_msg.c ****************************************************/ @@ -97,11 +97,11 @@ void igmp_waitmsg(FAR struct igmp_group_s *group, uint8_t msgid); /* Defined in igmp_poll.c ***************************************************/ -void igmp_poll(FAR struct uip_driver_s *dev); +void igmp_poll(FAR struct net_driver_s *dev); /* Defined in igmp_send.c ***************************************************/ -void igmp_send(FAR struct uip_driver_s *dev, FAR struct igmp_group_s *group, +void igmp_send(FAR struct net_driver_s *dev, FAR struct igmp_group_s *group, FAR uip_ipaddr_t *dest); /* Defined in igmp_timer.c **************************************************/ @@ -113,8 +113,8 @@ bool igmp_cmptimer(FAR struct igmp_group_s *group, int maxticks); /* Defined in igmp_mcastmac *************************************************/ -void igmp_addmcastmac(FAR struct uip_driver_s *dev, FAR uip_ipaddr_t *ip); -void igmp_removemcastmac(FAR struct uip_driver_s *dev, FAR uip_ipaddr_t *ip); +void igmp_addmcastmac(FAR struct net_driver_s *dev, FAR uip_ipaddr_t *ip); +void igmp_removemcastmac(FAR struct net_driver_s *dev, FAR uip_ipaddr_t *ip); #undef EXTERN #ifdef __cplusplus diff --git a/net/igmp/igmp_group.c b/net/igmp/igmp_group.c index 85bfa1a0c0d..f0b3e539947 100644 --- a/net/igmp/igmp_group.c +++ b/net/igmp/igmp_group.c @@ -219,7 +219,7 @@ void igmp_grpinit(void) * ****************************************************************************/ -FAR struct igmp_group_s *igmp_grpalloc(FAR struct uip_driver_s *dev, +FAR struct igmp_group_s *igmp_grpalloc(FAR struct net_driver_s *dev, FAR const uip_ipaddr_t *addr) { FAR struct igmp_group_s *group; @@ -282,7 +282,7 @@ FAR struct igmp_group_s *igmp_grpalloc(FAR struct uip_driver_s *dev, * ****************************************************************************/ -FAR struct igmp_group_s *igmp_grpfind(FAR struct uip_driver_s *dev, +FAR struct igmp_group_s *igmp_grpfind(FAR struct net_driver_s *dev, FAR const uip_ipaddr_t *addr) { FAR struct igmp_group_s *group; @@ -323,7 +323,7 @@ FAR struct igmp_group_s *igmp_grpfind(FAR struct uip_driver_s *dev, * ****************************************************************************/ -FAR struct igmp_group_s *igmp_grpallocfind(FAR struct uip_driver_s *dev, +FAR struct igmp_group_s *igmp_grpallocfind(FAR struct net_driver_s *dev, FAR const uip_ipaddr_t *addr) { FAR struct igmp_group_s *group = igmp_grpfind(dev, addr); @@ -349,7 +349,7 @@ FAR struct igmp_group_s *igmp_grpallocfind(FAR struct uip_driver_s *dev, * ****************************************************************************/ -void igmp_grpfree(FAR struct uip_driver_s *dev, FAR struct igmp_group_s *group) +void igmp_grpfree(FAR struct net_driver_s *dev, FAR struct igmp_group_s *group) { net_lock_t flags; diff --git a/net/igmp/igmp_initialize.c b/net/igmp/igmp_initialize.c index 1d751c48782..f0ea8c4b50b 100644 --- a/net/igmp/igmp_initialize.c +++ b/net/igmp/igmp_initialize.c @@ -103,7 +103,7 @@ void igmp_initialize(void) * ****************************************************************************/ -void igmp_devinit(struct uip_driver_s *dev) +void igmp_devinit(struct net_driver_s *dev) { nvdbg("IGMP initializing dev %p\n", dev); DEBUGASSERT(dev->grplist.head == NULL); diff --git a/net/igmp/igmp_input.c b/net/igmp/igmp_input.c index 241294d01f3..76061bb82f3 100644 --- a/net/igmp/igmp_input.c +++ b/net/igmp/igmp_input.c @@ -113,7 +113,7 @@ * ****************************************************************************/ -void igmp_input(struct uip_driver_s *dev) +void igmp_input(struct net_driver_s *dev) { FAR struct igmp_group_s *group; uip_ipaddr_t destipaddr; diff --git a/net/igmp/igmp_join.c b/net/igmp/igmp_join.c index a8d4a19d312..7e3540e079c 100644 --- a/net/igmp/igmp_join.c +++ b/net/igmp/igmp_join.c @@ -122,7 +122,7 @@ * ****************************************************************************/ -int igmp_joingroup(struct uip_driver_s *dev, FAR const struct in_addr *grpaddr) +int igmp_joingroup(struct net_driver_s *dev, FAR const struct in_addr *grpaddr) { struct igmp_group_s *group; diff --git a/net/igmp/igmp_leave.c b/net/igmp/igmp_leave.c index 58e28771c14..65cffc10890 100644 --- a/net/igmp/igmp_leave.c +++ b/net/igmp/igmp_leave.c @@ -129,7 +129,7 @@ * ****************************************************************************/ -int igmp_leavegroup(struct uip_driver_s *dev, FAR const struct in_addr *grpaddr) +int igmp_leavegroup(struct net_driver_s *dev, FAR const struct in_addr *grpaddr) { struct igmp_group_s *group; net_lock_t flags; diff --git a/net/igmp/igmp_mcastmac.c b/net/igmp/igmp_mcastmac.c index b4de341c00e..42dbf040711 100644 --- a/net/igmp/igmp_mcastmac.c +++ b/net/igmp/igmp_mcastmac.c @@ -99,7 +99,7 @@ static void uip_mcastmac(uip_ipaddr_t *ip, FAR uint8_t *mac) * ****************************************************************************/ -void igmp_addmcastmac(FAR struct uip_driver_s *dev, FAR uip_ipaddr_t *ip) +void igmp_addmcastmac(FAR struct net_driver_s *dev, FAR uip_ipaddr_t *ip) { uint8_t mcastmac[6]; @@ -119,7 +119,7 @@ void igmp_addmcastmac(FAR struct uip_driver_s *dev, FAR uip_ipaddr_t *ip) * ****************************************************************************/ -void igmp_removemcastmac(FAR struct uip_driver_s *dev, FAR uip_ipaddr_t *ip) +void igmp_removemcastmac(FAR struct net_driver_s *dev, FAR uip_ipaddr_t *ip) { uint8_t mcastmac[6]; diff --git a/net/igmp/igmp_poll.c b/net/igmp/igmp_poll.c index bcc689523b9..48b4f39dc55 100644 --- a/net/igmp/igmp_poll.c +++ b/net/igmp/igmp_poll.c @@ -79,7 +79,7 @@ * ****************************************************************************/ -static inline void uip_schedsend(FAR struct uip_driver_s *dev, FAR struct igmp_group_s *group) +static inline void uip_schedsend(FAR struct net_driver_s *dev, FAR struct igmp_group_s *group) { uip_ipaddr_t *dest; @@ -142,7 +142,7 @@ static inline void uip_schedsend(FAR struct uip_driver_s *dev, FAR struct igmp_g * ****************************************************************************/ -void igmp_poll(FAR struct uip_driver_s *dev) +void igmp_poll(FAR struct net_driver_s *dev) { FAR struct igmp_group_s *group; diff --git a/net/igmp/igmp_send.c b/net/igmp/igmp_send.c index 2398215b90f..a73c16a86cf 100644 --- a/net/igmp/igmp_send.c +++ b/net/igmp/igmp_send.c @@ -120,7 +120,7 @@ static uint16_t igmp_chksum(FAR uint8_t *buffer, int buflen) * ****************************************************************************/ -void igmp_send(FAR struct uip_driver_s *dev, FAR struct igmp_group_s *group, +void igmp_send(FAR struct net_driver_s *dev, FAR struct igmp_group_s *group, FAR uip_ipaddr_t *destipaddr) { nllvdbg("msgid: %02x destipaddr: %08x\n", group->msgid, (int)*destipaddr); diff --git a/net/net_close.c b/net/net_close.c index 5f5e3d7103a..a2c57b6efc8 100644 --- a/net/net_close.c +++ b/net/net_close.c @@ -153,7 +153,7 @@ static inline int close_timeout(FAR struct tcp_close_s *pstate) ****************************************************************************/ #ifdef CONFIG_NET_TCP -static uint16_t netclose_interrupt(FAR struct uip_driver_s *dev, +static uint16_t netclose_interrupt(FAR struct net_driver_s *dev, FAR void *pvconn, FAR void *pvpriv, uint16_t flags) { diff --git a/net/net_poll.c b/net/net_poll.c index f7d27de3569..d865631a61c 100644 --- a/net/net_poll.c +++ b/net/net_poll.c @@ -113,7 +113,7 @@ struct net_poll_s ****************************************************************************/ #ifdef HAVE_NETPOLL -static uint16_t poll_interrupt(FAR struct uip_driver_s *dev, FAR void *conn, +static uint16_t poll_interrupt(FAR struct net_driver_s *dev, FAR void *conn, FAR void *pvpriv, uint16_t flags) { FAR struct net_poll_s *info = (FAR struct net_poll_s *)pvpriv; diff --git a/net/net_sendfile.c b/net/net_sendfile.c index 6d6a4a7e448..c5f249b51f3 100644 --- a/net/net_sendfile.c +++ b/net/net_sendfile.c @@ -144,7 +144,7 @@ static inline int sendfile_timeout(FAR struct sendfile_s *pstate) } #endif /* CONFIG_NET_SOCKOPTS && !CONFIG_DISABLE_CLOCK */ -static uint16_t ack_interrupt(FAR struct uip_driver_s *dev, FAR void *pvconn, +static uint16_t ack_interrupt(FAR struct net_driver_s *dev, FAR void *pvconn, FAR void *pvpriv, uint16_t flags) { FAR struct sendfile_s *pstate = (FAR struct sendfile_s *)pvpriv; @@ -223,7 +223,7 @@ static uint16_t ack_interrupt(FAR struct uip_driver_s *dev, FAR void *pvconn, * ****************************************************************************/ -static uint16_t sendfile_interrupt(FAR struct uip_driver_s *dev, FAR void *pvconn, +static uint16_t sendfile_interrupt(FAR struct net_driver_s *dev, FAR void *pvconn, FAR void *pvpriv, uint16_t flags) { FAR struct tcp_conn_s *conn = (FAR struct tcp_conn_s*)pvconn; diff --git a/net/netdev/netdev.h b/net/netdev/netdev.h index 7761051f090..b867a3d5d44 100644 --- a/net/netdev/netdev.h +++ b/net/netdev/netdev.h @@ -70,7 +70,7 @@ extern "C" /* List of registered Ethernet device drivers */ #if CONFIG_NSOCKET_DESCRIPTORS > 0 -EXTERN struct uip_driver_s *g_netdevices; +EXTERN struct net_driver_s *g_netdevices; #endif /**************************************************************************** @@ -88,13 +88,13 @@ void netdev_semgive(void); /* netdev_findbyname.c *******************************************************/ #if CONFIG_NSOCKET_DESCRIPTORS > 0 -FAR struct uip_driver_s *netdev_findbyname(FAR const char *ifname); +FAR struct net_driver_s *netdev_findbyname(FAR const char *ifname); #endif /* netdev_findbyaddr.c *******************************************************/ #if CONFIG_NSOCKET_DESCRIPTORS > 0 -FAR struct uip_driver_s *netdev_findbyaddr(const uip_ipaddr_t addr); +FAR struct net_driver_s *netdev_findbyaddr(const uip_ipaddr_t addr); #endif /* netdev_txnotify.c *********************************************************/ diff --git a/net/netdev/netdev_carrier.c b/net/netdev/netdev_carrier.c index 07589a64a58..fb5e7e4d7fd 100644 --- a/net/netdev/netdev_carrier.c +++ b/net/netdev/netdev_carrier.c @@ -94,7 +94,7 @@ * ****************************************************************************/ -int netdev_carrier_on(FAR struct uip_driver_s *dev) +int netdev_carrier_on(FAR struct net_driver_s *dev) { if (dev) { @@ -120,7 +120,7 @@ int netdev_carrier_on(FAR struct uip_driver_s *dev) * ****************************************************************************/ -int netdev_carrier_off(FAR struct uip_driver_s *dev) +int netdev_carrier_off(FAR struct net_driver_s *dev) { if (dev) { diff --git a/net/netdev/netdev_count.c b/net/netdev/netdev_count.c index 23aac4c99f2..1a67be8839e 100644 --- a/net/netdev/netdev_count.c +++ b/net/netdev/netdev_count.c @@ -91,7 +91,7 @@ int netdev_count(void) { - struct uip_driver_s *dev; + struct net_driver_s *dev; int ndev; netdev_semtake(); diff --git a/net/netdev/netdev_findbyaddr.c b/net/netdev/netdev_findbyaddr.c index 0abda865c55..1966d99f51c 100644 --- a/net/netdev/netdev_findbyaddr.c +++ b/net/netdev/netdev_findbyaddr.c @@ -94,9 +94,9 @@ * ****************************************************************************/ -static FAR struct uip_driver_s *netdev_finddevice(const uip_ipaddr_t addr) +static FAR struct net_driver_s *netdev_finddevice(const uip_ipaddr_t addr) { - struct uip_driver_s *dev; + struct net_driver_s *dev; /* Examine each registered network device */ @@ -147,9 +147,9 @@ static FAR struct uip_driver_s *netdev_finddevice(const uip_ipaddr_t addr) * ****************************************************************************/ -FAR struct uip_driver_s *netdev_findbyaddr(const uip_ipaddr_t addr) +FAR struct net_driver_s *netdev_findbyaddr(const uip_ipaddr_t addr) { - struct uip_driver_s *dev; + struct net_driver_s *dev; #ifdef CONFIG_NET_ROUTE uip_ipaddr_t router; int ret; diff --git a/net/netdev/netdev_findbyname.c b/net/netdev/netdev_findbyname.c index de351404c58..9808086521e 100644 --- a/net/netdev/netdev_findbyname.c +++ b/net/netdev/netdev_findbyname.c @@ -90,9 +90,9 @@ * ****************************************************************************/ -FAR struct uip_driver_s *netdev_findbyname(const char *ifname) +FAR struct net_driver_s *netdev_findbyname(const char *ifname) { - struct uip_driver_s *dev; + struct net_driver_s *dev; if (ifname) { netdev_semtake(); diff --git a/net/netdev/netdev_foreach.c b/net/netdev/netdev_foreach.c index ccec0180020..9a5eb491b6f 100644 --- a/net/netdev/netdev_foreach.c +++ b/net/netdev/netdev_foreach.c @@ -93,7 +93,7 @@ int netdev_foreach(netdev_callback_t callback, void *arg) { - struct uip_driver_s *dev; + struct net_driver_s *dev; int ret = 0; if (callback) diff --git a/net/netdev/netdev_ioctl.c b/net/netdev/netdev_ioctl.c index 1064768720b..af555dda097 100644 --- a/net/netdev/netdev_ioctl.c +++ b/net/netdev/netdev_ioctl.c @@ -143,7 +143,7 @@ static void ioctl_setipaddr(FAR uip_ipaddr_t *outaddr, FAR const void *inaddr) * ****************************************************************************/ -static void ioctl_ifup(FAR struct uip_driver_s *dev) +static void ioctl_ifup(FAR struct net_driver_s *dev) { /* Make sure that the device supports the d_ifup() method */ @@ -165,7 +165,7 @@ static void ioctl_ifup(FAR struct uip_driver_s *dev) } } -static void ioctl_ifdown(FAR struct uip_driver_s *dev) +static void ioctl_ifdown(FAR struct net_driver_s *dev) { /* Make sure that the device supports the d_ifdown() method */ @@ -201,7 +201,7 @@ static void ioctl_ifdown(FAR struct uip_driver_s *dev) * ****************************************************************************/ -static FAR struct uip_driver_s *netdev_ifrdev(FAR struct ifreq *req) +static FAR struct net_driver_s *netdev_ifrdev(FAR struct ifreq *req) { if (!req) { @@ -236,7 +236,7 @@ static FAR struct uip_driver_s *netdev_ifrdev(FAR struct ifreq *req) static int netdev_ifrioctl(FAR struct socket *psock, int cmd, FAR struct ifreq *req) { - FAR struct uip_driver_s *dev; + FAR struct net_driver_s *dev; int ret = -EINVAL; nvdbg("cmd: %d\n", cmd); @@ -463,7 +463,7 @@ static int netdev_ifrioctl(FAR struct socket *psock, int cmd, ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static FAR struct uip_driver_s *netdev_imsfdev(FAR struct ip_msfilter *imsf) +static FAR struct net_driver_s *netdev_imsfdev(FAR struct ip_msfilter *imsf) { if (!imsf) { @@ -500,7 +500,7 @@ static FAR struct uip_driver_s *netdev_imsfdev(FAR struct ip_msfilter *imsf) static int netdev_imsfioctl(FAR struct socket *psock, int cmd, FAR struct ip_msfilter *imsf) { - FAR struct uip_driver_s *dev; + FAR struct net_driver_s *dev; int ret = -EINVAL; nvdbg("cmd: %d\n", cmd); diff --git a/net/netdev/netdev_register.c b/net/netdev/netdev_register.c index da48bf7a3ac..c2e47e3be0a 100644 --- a/net/netdev/netdev_register.c +++ b/net/netdev/netdev_register.c @@ -81,7 +81,7 @@ static int g_next_devnum = 0; /* List of registered ethernet device drivers */ -struct uip_driver_s *g_netdevices = NULL; +struct net_driver_s *g_netdevices = NULL; /**************************************************************************** * Private Functions @@ -109,7 +109,7 @@ struct uip_driver_s *g_netdevices = NULL; * ****************************************************************************/ -int netdev_register(FAR struct uip_driver_s *dev) +int netdev_register(FAR struct net_driver_s *dev) { if (dev) { diff --git a/net/netdev/netdev_rxnotify.c b/net/netdev/netdev_rxnotify.c index 1187cd0d652..5473d934de6 100644 --- a/net/netdev/netdev_rxnotify.c +++ b/net/netdev/netdev_rxnotify.c @@ -96,7 +96,7 @@ void netdev_rxnotify(const uip_ipaddr_t raddr) /* Find the device driver that serves the subnet of the remote address */ - struct uip_driver_s *dev = netdev_findbyaddr(raddr); + struct net_driver_s *dev = netdev_findbyaddr(raddr); if (dev && dev->d_rxavail) { diff --git a/net/netdev/netdev_txnotify.c b/net/netdev/netdev_txnotify.c index d6aea425a22..f044f2d24dd 100644 --- a/net/netdev/netdev_txnotify.c +++ b/net/netdev/netdev_txnotify.c @@ -95,7 +95,7 @@ void netdev_txnotify(const uip_ipaddr_t raddr) { /* Find the device driver that serves the subnet of the remote address */ - struct uip_driver_s *dev = netdev_findbyaddr(raddr); + struct net_driver_s *dev = netdev_findbyaddr(raddr); if (dev && dev->d_txavail) { diff --git a/net/netdev/netdev_unregister.c b/net/netdev/netdev_unregister.c index 35108ba9810..150e410f5de 100644 --- a/net/netdev/netdev_unregister.c +++ b/net/netdev/netdev_unregister.c @@ -103,10 +103,10 @@ * ****************************************************************************/ -int netdev_unregister(FAR struct uip_driver_s *dev) +int netdev_unregister(FAR struct net_driver_s *dev) { - struct uip_driver_s *prev; - struct uip_driver_s *curr; + struct net_driver_s *prev; + struct net_driver_s *curr; if (dev) { diff --git a/net/pkt/pkt.h b/net/pkt/pkt.h index 6404fe748bb..900f631c25e 100644 --- a/net/pkt/pkt.h +++ b/net/pkt/pkt.h @@ -83,14 +83,14 @@ struct pkt_conn_s *uip_nextpktconn(FAR struct pkt_conn_s *conn); /* Defined in pkt_callback.c ************************************************/ -uint16_t pkt_callback(FAR struct uip_driver_s *dev, +uint16_t pkt_callback(FAR struct net_driver_s *dev, FAR struct pkt_conn_s *conn, uint16_t flags); /* Defined in pkt_input.c ***************************************************/ /* Defined in pkt_poll.c ****************************************************/ -void pkt_poll(FAR struct uip_driver_s *dev, FAR struct pkt_conn_s *conn); +void pkt_poll(FAR struct net_driver_s *dev, FAR struct pkt_conn_s *conn); /**************************************************************************** * Function: psock_pkt_send diff --git a/net/pkt/pkt_callback.c b/net/pkt/pkt_callback.c index 5e3123628ae..30dfecaf649 100644 --- a/net/pkt/pkt_callback.c +++ b/net/pkt/pkt_callback.c @@ -77,7 +77,7 @@ * ****************************************************************************/ -uint16_t pkt_callback(FAR struct uip_driver_s *dev, +uint16_t pkt_callback(FAR struct net_driver_s *dev, FAR struct pkt_conn_s *conn, uint16_t flags) { nllvdbg("flags: %04x\n", flags); diff --git a/net/pkt/pkt_input.c b/net/pkt/pkt_input.c index dea9908f1b5..aaa1e1c8962 100644 --- a/net/pkt/pkt_input.c +++ b/net/pkt/pkt_input.c @@ -97,7 +97,7 @@ * ****************************************************************************/ -int pkt_input(struct uip_driver_s *dev) +int pkt_input(struct net_driver_s *dev) { FAR struct pkt_conn_s *conn; FAR struct eth_hdr_s *pbuf = (struct eth_hdr_s *)dev->d_buf; diff --git a/net/pkt/pkt_poll.c b/net/pkt/pkt_poll.c index ce6e0ebedf6..1db880bdb3c 100644 --- a/net/pkt/pkt_poll.c +++ b/net/pkt/pkt_poll.c @@ -94,7 +94,7 @@ * ****************************************************************************/ -void pkt_poll(FAR struct uip_driver_s *dev, FAR struct pkt_conn_s *conn) +void pkt_poll(FAR struct net_driver_s *dev, FAR struct pkt_conn_s *conn) { nlldbg("IN\n"); diff --git a/net/pkt/pkt_send.c b/net/pkt/pkt_send.c index f063dc87a80..bc2c2b33c82 100644 --- a/net/pkt/pkt_send.c +++ b/net/pkt/pkt_send.c @@ -90,7 +90,7 @@ struct send_s * Function: psock_send_interrupt ****************************************************************************/ -static uint16_t psock_send_interrupt(FAR struct uip_driver_s *dev, +static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev, FAR void *pvconn, FAR void *pvpriv, uint16_t flags) { @@ -246,7 +246,7 @@ ssize_t psock_pkt_send(FAR struct socket *psock, FAR const void *buf, state.snd_cb = pkt_callbackalloc(conn); if (state.snd_cb) { - FAR struct uip_driver_s *dev; + FAR struct net_driver_s *dev; /* Set up the callback in the connection */ diff --git a/net/recvfrom.c b/net/recvfrom.c index 65f8183ab7c..9c6c576fd69 100644 --- a/net/recvfrom.c +++ b/net/recvfrom.c @@ -122,7 +122,7 @@ struct recvfrom_s ****************************************************************************/ #if defined(CONFIG_NET_UDP) || defined(CONFIG_NET_TCP) -static size_t recvfrom_newdata(FAR struct uip_driver_s *dev, +static size_t recvfrom_newdata(FAR struct net_driver_s *dev, FAR struct recvfrom_s *pstate) { size_t recvlen; @@ -172,7 +172,7 @@ static size_t recvfrom_newdata(FAR struct uip_driver_s *dev, ****************************************************************************/ #ifdef CONFIG_NET_PKT -static void recvfrom_newpktdata(FAR struct uip_driver_s *dev, +static void recvfrom_newpktdata(FAR struct net_driver_s *dev, FAR struct recvfrom_s *pstate) { size_t recvlen; @@ -218,7 +218,7 @@ static void recvfrom_newpktdata(FAR struct uip_driver_s *dev, ****************************************************************************/ #ifdef CONFIG_NET_TCP -static inline void recvfrom_newtcpdata(FAR struct uip_driver_s *dev, +static inline void recvfrom_newtcpdata(FAR struct net_driver_s *dev, FAR struct recvfrom_s *pstate) { /* Take as much data from the packet as we can */ @@ -290,7 +290,7 @@ static inline void recvfrom_newtcpdata(FAR struct uip_driver_s *dev, ****************************************************************************/ #ifdef CONFIG_NET_UDP -static inline void recvfrom_newudpdata(FAR struct uip_driver_s *dev, +static inline void recvfrom_newudpdata(FAR struct net_driver_s *dev, FAR struct recvfrom_s *pstate) { /* Take as much data from the packet as we can */ @@ -472,7 +472,7 @@ static int recvfrom_timeout(struct recvfrom_s *pstate) ****************************************************************************/ #ifdef CONFIG_NET_PKT -static inline void recvfrom_pktsender(FAR struct uip_driver_s *dev, +static inline void recvfrom_pktsender(FAR struct net_driver_s *dev, FAR struct recvfrom_s *pstate) { } @@ -492,7 +492,7 @@ static inline void recvfrom_pktsender(FAR struct uip_driver_s *dev, ****************************************************************************/ #ifdef CONFIG_NET_PKT -static uint16_t recvfrom_pktinterrupt(FAR struct uip_driver_s *dev, +static uint16_t recvfrom_pktinterrupt(FAR struct net_driver_s *dev, FAR void *conn, FAR void *pvpriv, uint16_t flags) { @@ -560,7 +560,7 @@ static uint16_t recvfrom_pktinterrupt(FAR struct uip_driver_s *dev, ****************************************************************************/ #ifdef CONFIG_NET_TCP -static inline void recvfrom_tcpsender(FAR struct uip_driver_s *dev, +static inline void recvfrom_tcpsender(FAR struct net_driver_s *dev, FAR struct recvfrom_s *pstate) { #ifdef CONFIG_NET_IPv6 @@ -604,7 +604,7 @@ static inline void recvfrom_tcpsender(FAR struct uip_driver_s *dev, ****************************************************************************/ #ifdef CONFIG_NET_TCP -static uint16_t recvfrom_tcpinterrupt(FAR struct uip_driver_s *dev, +static uint16_t recvfrom_tcpinterrupt(FAR struct net_driver_s *dev, FAR void *conn, FAR void *pvpriv, uint16_t flags) { @@ -807,7 +807,7 @@ static uint16_t recvfrom_tcpinterrupt(FAR struct uip_driver_s *dev, ****************************************************************************/ #ifdef CONFIG_NET_UDP -static inline void recvfrom_udpsender(struct uip_driver_s *dev, struct recvfrom_s *pstate) +static inline void recvfrom_udpsender(struct net_driver_s *dev, struct recvfrom_s *pstate) { #ifdef CONFIG_NET_IPv6 FAR struct sockaddr_in6 *infrom = pstate->rf_from; @@ -850,7 +850,7 @@ static inline void recvfrom_udpsender(struct uip_driver_s *dev, struct recvfrom_ ****************************************************************************/ #ifdef CONFIG_NET_UDP -static uint16_t recvfrom_udpinterrupt(struct uip_driver_s *dev, void *pvconn, +static uint16_t recvfrom_udpinterrupt(struct net_driver_s *dev, void *pvconn, void *pvpriv, uint16_t flags) { struct recvfrom_s *pstate = (struct recvfrom_s *)pvpriv; diff --git a/net/route/netdev_router.c b/net/route/netdev_router.c index 81d091ba2ee..d62fe5f0fcc 100644 --- a/net/route/netdev_router.c +++ b/net/route/netdev_router.c @@ -57,7 +57,7 @@ struct route_devmatch_s { - FAR struct uip_driver_s *dev; /* The route must use this device */ + FAR struct net_driver_s *dev; /* The route must use this device */ uip_ipaddr_t target; /* The target IP address on an external network to match */ uip_ipaddr_t router; /* The IP address of the router on one of our networks*/ }; @@ -84,7 +84,7 @@ struct route_devmatch_s static int net_devmatch(FAR struct net_route_s *route, FAR void *arg) { FAR struct route_devmatch_s *match = (FAR struct route_devmatch_s *)arg; - FAR struct uip_driver_s *dev = match->dev; + FAR struct net_driver_s *dev = match->dev; /* To match, (1) the masked target addresses must be the same, and (2) the * router address must like on the network provided by the device. @@ -133,10 +133,10 @@ static int net_devmatch(FAR struct net_route_s *route, FAR void *arg) ****************************************************************************/ #ifdef CONFIG_NET_IPv6 -void netdev_router(FAR struct uip_driver_s *dev, uip_ipaddr_t target, +void netdev_router(FAR struct net_driver_s *dev, uip_ipaddr_t target, uip_ipaddr_t router) #else -void netdev_router(FAR struct uip_driver_s *dev, uip_ipaddr_t target, +void netdev_router(FAR struct net_driver_s *dev, uip_ipaddr_t target, FAR uip_ipaddr_t *router) #endif { diff --git a/net/route/route.h b/net/route/route.h index 140afdf5d08..a91db2c4726 100644 --- a/net/route/route.h +++ b/net/route/route.h @@ -229,13 +229,13 @@ int net_router(uip_ipaddr_t target, FAR uip_ipaddr_t *router); * ****************************************************************************/ -struct uip_driver_s; +struct net_driver_s; #ifdef CONFIG_NET_IPv6 -void netdev_router(FAR struct uip_driver_s *dev, uip_ipaddr_t target, +void netdev_router(FAR struct net_driver_s *dev, uip_ipaddr_t target, uip_ipaddr_t router); #else -void netdev_router(FAR struct uip_driver_s *dev, uip_ipaddr_t target, +void netdev_router(FAR struct net_driver_s *dev, uip_ipaddr_t target, FAR uip_ipaddr_t *router); #endif diff --git a/net/sendto.c b/net/sendto.c index b51e29874cc..e88f6917564 100644 --- a/net/sendto.c +++ b/net/sendto.c @@ -163,7 +163,7 @@ static inline int send_timeout(FAR struct sendto_s *pstate) ****************************************************************************/ #ifdef CONFIG_NET_UDP -static uint16_t sendto_interrupt(struct uip_driver_s *dev, void *conn, +static uint16_t sendto_interrupt(struct net_driver_s *dev, void *conn, void *pvpriv, uint16_t flags) { FAR struct sendto_s *pstate = (FAR struct sendto_s *)pvpriv; diff --git a/net/tcp/tcp.h b/net/tcp/tcp.h index ef75526de14..3e4f193d4f5 100644 --- a/net/tcp/tcp.h +++ b/net/tcp/tcp.h @@ -90,42 +90,42 @@ void tcp_nextsequence(void); /* Defined in tcp_poll.c ****************************************************/ -void tcp_poll(FAR struct uip_driver_s *dev, FAR struct tcp_conn_s *conn); +void tcp_poll(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn); /* Defined in tcp_timer.c ***************************************************/ -void tcp_timer(FAR struct uip_driver_s *dev, FAR struct tcp_conn_s *conn, +void tcp_timer(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, int hsec); /* Defined in tcp_listen.c **************************************************/ void tcp_listeninit(void); bool tcp_islistener(uint16_t port); -int tcp_accept_connection(FAR struct uip_driver_s *dev, +int tcp_accept_connection(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, uint16_t portno); /* Defined in tcp_send.c ****************************************************/ -void tcp_send(FAR struct uip_driver_s *dev, FAR struct tcp_conn_s *conn, +void tcp_send(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, uint16_t flags, uint16_t len); -void tcp_reset(FAR struct uip_driver_s *dev); -void tcp_ack(FAR struct uip_driver_s *dev, FAR struct tcp_conn_s *conn, +void tcp_reset(FAR struct net_driver_s *dev); +void tcp_ack(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, uint8_t ack); /* Defined in tcp_appsend.c *************************************************/ -void tcp_appsend(FAR struct uip_driver_s *dev, FAR struct tcp_conn_s *conn, +void tcp_appsend(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, uint16_t result); -void tcp_rexmit(FAR struct uip_driver_s *dev, FAR struct tcp_conn_s *conn, +void tcp_rexmit(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, uint16_t result); /* Defined in tcp_input.c ***************************************************/ -void tcp_input(FAR struct uip_driver_s *dev); +void tcp_input(FAR struct net_driver_s *dev); /* Defined in tcp_callback.c ************************************************/ -uint16_t tcp_callback(FAR struct uip_driver_s *dev, +uint16_t tcp_callback(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, uint16_t flags); #ifdef CONFIG_NET_TCP_READAHEAD uint16_t tcp_datahandler(FAR struct tcp_conn_s *conn, diff --git a/net/tcp/tcp_appsend.c b/net/tcp/tcp_appsend.c index eb4214d5513..f0204920894 100644 --- a/net/tcp/tcp_appsend.c +++ b/net/tcp/tcp_appsend.c @@ -97,7 +97,7 @@ * ****************************************************************************/ -void tcp_appsend(FAR struct uip_driver_s *dev, FAR struct tcp_conn_s *conn, +void tcp_appsend(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, uint16_t result) { /* Handle the result based on the application response */ @@ -183,7 +183,7 @@ void tcp_appsend(FAR struct uip_driver_s *dev, FAR struct tcp_conn_s *conn, * ****************************************************************************/ -void tcp_rexmit(FAR struct uip_driver_s *dev, FAR struct tcp_conn_s *conn, +void tcp_rexmit(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, uint16_t result) { nllvdbg("result: %04x d_sndlen: %d conn->unacked: %d\n", diff --git a/net/tcp/tcp_callback.c b/net/tcp/tcp_callback.c index f09bf995f7d..bbd886173a9 100644 --- a/net/tcp/tcp_callback.c +++ b/net/tcp/tcp_callback.c @@ -77,7 +77,7 @@ ****************************************************************************/ static inline uint16_t -uip_dataevent(FAR struct uip_driver_s *dev, FAR struct tcp_conn_s *conn, +uip_dataevent(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, uint16_t flags) { uint16_t ret; @@ -148,7 +148,7 @@ uip_dataevent(FAR struct uip_driver_s *dev, FAR struct tcp_conn_s *conn, * ****************************************************************************/ -uint16_t tcp_callback(FAR struct uip_driver_s *dev, FAR struct tcp_conn_s *conn, +uint16_t tcp_callback(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, uint16_t flags) { /* Preserve the UIP_ACKDATA, UIP_CLOSE, and UIP_ABORT in the response. diff --git a/net/tcp/tcp_input.c b/net/tcp/tcp_input.c index 6343430041f..909996a2348 100644 --- a/net/tcp/tcp_input.c +++ b/net/tcp/tcp_input.c @@ -98,7 +98,7 @@ * ****************************************************************************/ -void tcp_input(struct uip_driver_s *dev) +void tcp_input(struct net_driver_s *dev) { struct tcp_conn_s *conn = NULL; struct tcp_iphdr_s *pbuf = BUF; diff --git a/net/tcp/tcp_listen.c b/net/tcp/tcp_listen.c index 1b48dc2eebe..be9324103f8 100644 --- a/net/tcp/tcp_listen.c +++ b/net/tcp/tcp_listen.c @@ -247,7 +247,7 @@ bool tcp_islistener(uint16_t portno) * ****************************************************************************/ -int tcp_accept_connection(FAR struct uip_driver_s *dev, +int tcp_accept_connection(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, uint16_t portno) { FAR struct tcp_conn_s *listener; diff --git a/net/tcp/tcp_poll.c b/net/tcp/tcp_poll.c index 3fc9609d752..465a3e253e9 100644 --- a/net/tcp/tcp_poll.c +++ b/net/tcp/tcp_poll.c @@ -94,7 +94,7 @@ * ****************************************************************************/ -void tcp_poll(FAR struct uip_driver_s *dev, FAR struct tcp_conn_s *conn) +void tcp_poll(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn) { uint8_t result; diff --git a/net/tcp/tcp_send.c b/net/tcp/tcp_send.c index 929ca1c9b16..f404e9d598c 100644 --- a/net/tcp/tcp_send.c +++ b/net/tcp/tcp_send.c @@ -91,7 +91,7 @@ * ****************************************************************************/ -static void tcp_sendcomplete(FAR struct uip_driver_s *dev) +static void tcp_sendcomplete(FAR struct net_driver_s *dev) { FAR struct tcp_iphdr_s *pbuf = BUF; @@ -172,7 +172,7 @@ static void tcp_sendcomplete(FAR struct uip_driver_s *dev) * ****************************************************************************/ -static void tcp_sendcommon(FAR struct uip_driver_s *dev, +static void tcp_sendcommon(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn) { FAR struct tcp_iphdr_s *pbuf = BUF; @@ -233,7 +233,7 @@ static void tcp_sendcommon(FAR struct uip_driver_s *dev, * ****************************************************************************/ -void tcp_send(FAR struct uip_driver_s *dev, FAR struct tcp_conn_s *conn, +void tcp_send(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, uint16_t flags, uint16_t len) { FAR struct tcp_iphdr_s *pbuf = BUF; @@ -261,7 +261,7 @@ void tcp_send(FAR struct uip_driver_s *dev, FAR struct tcp_conn_s *conn, * ****************************************************************************/ -void tcp_reset(FAR struct uip_driver_s *dev) +void tcp_reset(FAR struct net_driver_s *dev) { FAR struct tcp_iphdr_s *pbuf = BUF; uint16_t tmp16; @@ -344,7 +344,7 @@ void tcp_reset(FAR struct uip_driver_s *dev) * ****************************************************************************/ -void tcp_ack(FAR struct uip_driver_s *dev, FAR struct tcp_conn_s *conn, +void tcp_ack(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, uint8_t ack) { struct tcp_iphdr_s *pbuf = BUF; diff --git a/net/tcp/tcp_send_buffered.c b/net/tcp/tcp_send_buffered.c index 37359406f27..d51a6efbf21 100644 --- a/net/tcp/tcp_send_buffered.c +++ b/net/tcp/tcp_send_buffered.c @@ -213,7 +213,7 @@ static inline void psock_lost_connection(FAR struct socket *psock, * ****************************************************************************/ -static uint16_t psock_send_interrupt(FAR struct uip_driver_s *dev, +static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev, FAR void *pvconn, FAR void *pvpriv, uint16_t flags) { diff --git a/net/tcp/tcp_send_unbuffered.c b/net/tcp/tcp_send_unbuffered.c index 0736b220c14..39474cfc3a4 100644 --- a/net/tcp/tcp_send_unbuffered.c +++ b/net/tcp/tcp_send_unbuffered.c @@ -162,7 +162,7 @@ static inline int send_timeout(FAR struct send_s *pstate) * ****************************************************************************/ -static uint16_t tcpsend_interrupt(FAR struct uip_driver_s *dev, +static uint16_t tcpsend_interrupt(FAR struct net_driver_s *dev, FAR void *pvconn, FAR void *pvpriv, uint16_t flags) { diff --git a/net/tcp/tcp_timer.c b/net/tcp/tcp_timer.c index 228abf6e328..87083aef6dc 100644 --- a/net/tcp/tcp_timer.c +++ b/net/tcp/tcp_timer.c @@ -96,7 +96,7 @@ * ****************************************************************************/ -void tcp_timer(FAR struct uip_driver_s *dev, FAR struct tcp_conn_s *conn, +void tcp_timer(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, int hsec) { uint8_t result; diff --git a/net/udp/Kconfig b/net/udp/Kconfig index 16b535c9c96..d52f4f7a22e 100644 --- a/net/udp/Kconfig +++ b/net/udp/Kconfig @@ -46,7 +46,7 @@ config NET_RXAVAIL support retention of UDP packets in that RAM. If the drivers supports such a capability, this option may be enabled to use it. NOTE: If this option is enabled, the driver must support the - rxavail() method in the uip_driver_s structure. + rxavail() method in the net_driver_s structure. endif # NET_UDP endmenu # UDP Networking diff --git a/net/udp/udp.h b/net/udp/udp.h index 7ebaf19d293..803a28b492d 100644 --- a/net/udp/udp.h +++ b/net/udp/udp.h @@ -81,19 +81,19 @@ FAR struct udp_conn_s *uip_nextudpconn(FAR struct udp_conn_s *conn); /* Defined in udp_poll.c ****************************************************/ -void udp_poll(FAR struct uip_driver_s *dev, FAR struct udp_conn_s *conn); +void udp_poll(FAR struct net_driver_s *dev, FAR struct udp_conn_s *conn); /* Defined in udp_send.c ****************************************************/ -void udp_send(FAR struct uip_driver_s *dev, FAR struct udp_conn_s *conn); +void udp_send(FAR struct net_driver_s *dev, FAR struct udp_conn_s *conn); /* Defined in udp_input.c ***************************************************/ -int udp_input(FAR struct uip_driver_s *dev); +int udp_input(FAR struct net_driver_s *dev); /* Defined in udp_callback.c ************************************************/ -uint16_t udp_callback(FAR struct uip_driver_s *dev, +uint16_t udp_callback(FAR struct net_driver_s *dev, FAR struct udp_conn_s *conn, uint16_t flags); #undef EXTERN diff --git a/net/udp/udp_callback.c b/net/udp/udp_callback.c index 85edd388f3f..4c57db7442e 100644 --- a/net/udp/udp_callback.c +++ b/net/udp/udp_callback.c @@ -77,7 +77,7 @@ * ****************************************************************************/ -uint16_t udp_callback(FAR struct uip_driver_s *dev, +uint16_t udp_callback(FAR struct net_driver_s *dev, FAR struct udp_conn_s *conn, uint16_t flags) { nllvdbg("flags: %04x\n", flags); diff --git a/net/udp/udp_input.c b/net/udp/udp_input.c index 61c1f80edac..43408f4cf87 100644 --- a/net/udp/udp_input.c +++ b/net/udp/udp_input.c @@ -97,7 +97,7 @@ * ****************************************************************************/ -int udp_input(FAR struct uip_driver_s *dev) +int udp_input(FAR struct net_driver_s *dev) { FAR struct udp_conn_s *conn; FAR struct udp_iphdr_s *pbuf = UDPBUF; diff --git a/net/udp/udp_poll.c b/net/udp/udp_poll.c index cd036046841..6196fca2d38 100644 --- a/net/udp/udp_poll.c +++ b/net/udp/udp_poll.c @@ -93,7 +93,7 @@ * ****************************************************************************/ -void udp_poll(FAR struct uip_driver_s *dev, FAR struct udp_conn_s *conn) +void udp_poll(FAR struct net_driver_s *dev, FAR struct udp_conn_s *conn) { /* Verify that the UDP connection is valid */ diff --git a/net/udp/udp_send.c b/net/udp/udp_send.c index c7dee937445..db9b74dd69e 100644 --- a/net/udp/udp_send.c +++ b/net/udp/udp_send.c @@ -95,7 +95,7 @@ * ****************************************************************************/ -void udp_send(struct uip_driver_s *dev, struct udp_conn_s *conn) +void udp_send(struct net_driver_s *dev, struct udp_conn_s *conn) { FAR struct udp_iphdr_s *pudpbuf = UDPBUF; diff --git a/net/uip/uip.h b/net/uip/uip.h index 07852e04531..c0094f0d0fc 100644 --- a/net/uip/uip.h +++ b/net/uip/uip.h @@ -156,7 +156,7 @@ void uip_callbackfree(FAR struct uip_callback_s *cb, * ****************************************************************************/ -uint16_t uip_callbackexecute(FAR struct uip_driver_s *dev, FAR void *pvconn, +uint16_t uip_callbackexecute(FAR struct net_driver_s *dev, FAR void *pvconn, uint16_t flags, FAR struct uip_callback_s *list); /**************************************************************************** @@ -183,16 +183,16 @@ uint16_t uip_callbackexecute(FAR struct uip_driver_s *dev, FAR void *pvconn, * ****************************************************************************/ -void uip_send(FAR struct uip_driver_s *dev, FAR const void *buf, int len); +void uip_send(FAR struct net_driver_s *dev, FAR const void *buf, int len); #ifdef CONFIG_NET_IOB struct iob_s; -void uip_iobsend(FAR struct uip_driver_s *dev, FAR struct iob_s *buf, +void uip_iobsend(FAR struct net_driver_s *dev, FAR struct iob_s *buf, unsigned int len, unsigned int offset); #endif #ifdef CONFIG_NET_PKT -void uip_pktsend(FAR struct uip_driver_s *dev, FAR const void *buf, +void uip_pktsend(FAR struct net_driver_s *dev, FAR const void *buf, unsigned int len); #endif diff --git a/net/uip/uip_callback.c b/net/uip/uip_callback.c index e036dc562f1..585ac0cef98 100644 --- a/net/uip/uip_callback.c +++ b/net/uip/uip_callback.c @@ -220,7 +220,7 @@ void uip_callbackfree(FAR struct uip_callback_s *cb, * ****************************************************************************/ -uint16_t uip_callbackexecute(FAR struct uip_driver_s *dev, void *pvconn, +uint16_t uip_callbackexecute(FAR struct net_driver_s *dev, void *pvconn, uint16_t flags, FAR struct uip_callback_s *list) { FAR struct uip_callback_s *next; diff --git a/net/uip/uip_input.c b/net/uip/uip_input.c index 5570232028e..eaddac9bf1d 100644 --- a/net/uip/uip_input.c +++ b/net/uip/uip_input.c @@ -307,7 +307,7 @@ static uint8_t uip_reass(void) * ****************************************************************************/ -int uip_input(struct uip_driver_s *dev) +int uip_input(struct net_driver_s *dev) { struct uip_ip_hdr *pbuf = BUF; uint16_t iplen; diff --git a/net/uip/uip_iobsend.c b/net/uip/uip_iobsend.c index 874e78e7f30..ed18cf58351 100644 --- a/net/uip/uip_iobsend.c +++ b/net/uip/uip_iobsend.c @@ -97,7 +97,7 @@ * ****************************************************************************/ -void uip_iobsend(FAR struct uip_driver_s *dev, FAR struct iob_s *iob, +void uip_iobsend(FAR struct net_driver_s *dev, FAR struct iob_s *iob, unsigned int len, unsigned int offset) { DEBUGASSERT(dev && len > 0 && len < CONFIG_NET_BUFSIZE); diff --git a/net/uip/uip_pktsend.c b/net/uip/uip_pktsend.c index 37984592209..1e55244815f 100644 --- a/net/uip/uip_pktsend.c +++ b/net/uip/uip_pktsend.c @@ -97,7 +97,7 @@ * ****************************************************************************/ -void uip_pktsend(FAR struct uip_driver_s *dev, FAR const void *buf, +void uip_pktsend(FAR struct net_driver_s *dev, FAR const void *buf, unsigned int len) { DEBUGASSERT(dev && len > 0 && len < CONFIG_NET_BUFSIZE); diff --git a/net/uip/uip_poll.c b/net/uip/uip_poll.c index f7c212f9944..fef5c0ace40 100644 --- a/net/uip/uip_poll.c +++ b/net/uip/uip_poll.c @@ -74,7 +74,7 @@ ****************************************************************************/ #if defined(CONFIG_NET_PKT) -static int uip_pollpktconnections(struct uip_driver_s *dev, +static int uip_pollpktconnections(struct net_driver_s *dev, uip_poll_callback_t callback) { FAR struct pkt_conn_s *pkt_conn = NULL; @@ -110,7 +110,7 @@ static int uip_pollpktconnections(struct uip_driver_s *dev, ****************************************************************************/ #if defined(CONFIG_NET_ICMP) && defined(CONFIG_NET_ICMP_PING) -static inline int uip_pollicmp(FAR struct uip_driver_s *dev, +static inline int uip_pollicmp(FAR struct net_driver_s *dev, uip_poll_callback_t callback) { /* Perform the UDP TX poll */ @@ -136,7 +136,7 @@ static inline int uip_pollicmp(FAR struct uip_driver_s *dev, ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static inline int uip_polligmp(FAR struct uip_driver_s *dev, +static inline int uip_polligmp(FAR struct net_driver_s *dev, uip_poll_callback_t callback) { /* Perform the IGMP TX poll */ @@ -162,7 +162,7 @@ static inline int uip_polligmp(FAR struct uip_driver_s *dev, ****************************************************************************/ #ifdef CONFIG_NET_UDP -static int uip_polludpconnections(FAR struct uip_driver_s *dev, +static int uip_polludpconnections(FAR struct net_driver_s *dev, uip_poll_callback_t callback) { FAR struct udp_conn_s *conn = NULL; @@ -198,7 +198,7 @@ static int uip_polludpconnections(FAR struct uip_driver_s *dev, ****************************************************************************/ #ifdef CONFIG_NET_TCP -static inline int uip_polltcpconnections(FAR struct uip_driver_s *dev, +static inline int uip_polltcpconnections(FAR struct net_driver_s *dev, uip_poll_callback_t callback) { FAR struct tcp_conn_s *conn = NULL; @@ -237,7 +237,7 @@ static inline int uip_polltcpconnections(FAR struct uip_driver_s *dev, ****************************************************************************/ #ifdef CONFIG_NET_TCP -static inline int uip_polltcptimer(FAR struct uip_driver_s *dev, +static inline int uip_polltcptimer(FAR struct net_driver_s *dev, uip_poll_callback_t callback, int hsec) { FAR struct tcp_conn_s *conn = NULL; @@ -291,7 +291,7 @@ static inline int uip_polltcptimer(FAR struct uip_driver_s *dev, * ****************************************************************************/ -int uip_poll(FAR struct uip_driver_s *dev, uip_poll_callback_t callback) +int uip_poll(FAR struct net_driver_s *dev, uip_poll_callback_t callback) { int bstop; @@ -366,7 +366,7 @@ int uip_poll(FAR struct uip_driver_s *dev, uip_poll_callback_t callback) * ****************************************************************************/ -int uip_timer(FAR struct uip_driver_s *dev, uip_poll_callback_t callback, +int uip_timer(FAR struct net_driver_s *dev, uip_poll_callback_t callback, int hsec) { int bstop; diff --git a/net/uip/uip_send.c b/net/uip/uip_send.c index f426166b813..515ce8e9c0d 100644 --- a/net/uip/uip_send.c +++ b/net/uip/uip_send.c @@ -93,7 +93,7 @@ * ****************************************************************************/ -void uip_send(struct uip_driver_s *dev, const void *buf, int len) +void uip_send(struct net_driver_s *dev, const void *buf, int len) { DEBUGASSERT(dev && len > 0 && len < CONFIG_NET_BUFSIZE); diff --git a/net/utils/net_chksum.c b/net/utils/net_chksum.c index a48e7493507..c6e93873f00 100644 --- a/net/utils/net_chksum.c +++ b/net/utils/net_chksum.c @@ -1,7 +1,7 @@ /**************************************************************************** * net/utils/net_chksum.c * - * Copyright (C) 2007-2010, 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2010, 2012, 2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -104,7 +104,7 @@ static uint16_t chksum(uint16_t sum, FAR const uint8_t *data, uint16_t len) return sum; } -static uint16_t upper_layer_chksum(FAR struct uip_driver_s *dev, uint8_t proto) +static uint16_t upper_layer_chksum(FAR struct net_driver_s *dev, uint8_t proto) { struct uip_ip_hdr *pbuf = BUF; uint16_t upper_layer_len; @@ -134,7 +134,7 @@ static uint16_t upper_layer_chksum(FAR struct uip_driver_s *dev, uint8_t proto) } #ifdef CONFIG_NET_IPv6 -static uint16_t icmp_6chksum(FAR struct uip_driver_s *dev) +static uint16_t icmp_6chksum(FAR struct net_driver_s *dev) { return upper_layer_chksum(dev, UIP_PROTO_ICMP6); } @@ -169,18 +169,19 @@ static inline void uip_carry32(FAR uint8_t *sum, uint16_t op16) } } } +#endif /* UIP_ARCH_ADD32 */ /**************************************************************************** * Public Functions ****************************************************************************/ +#if !UIP_ARCH_ADD32 void uip_incr32(FAR uint8_t *op32, uint16_t op16) { op32[3] += (op16 & 0xff); op32[2] += (op16 >> 8); uip_carry32(op32, op16); } - #endif /* UIP_ARCH_ADD32 */ #if !UIP_ARCH_CHKSUM @@ -192,7 +193,7 @@ uint16_t uip_chksum(FAR uint16_t *data, uint16_t len) /* Calculate the IP header checksum of the packet header in d_buf. */ #ifndef UIP_ARCH_IPCHKSUM -uint16_t uip_ipchksum(FAR struct uip_driver_s *dev) +uint16_t uip_ipchksum(FAR struct net_driver_s *dev) { uint16_t sum; @@ -203,7 +204,7 @@ uint16_t uip_ipchksum(FAR struct uip_driver_s *dev) /* Calculate the TCP checksum of the packet in d_buf and d_appdata. */ -uint16_t tcp_chksum(FAR struct uip_driver_s *dev) +uint16_t tcp_chksum(FAR struct net_driver_s *dev) { return upper_layer_chksum(dev, UIP_PROTO_TCP); } @@ -211,7 +212,7 @@ uint16_t tcp_chksum(FAR struct uip_driver_s *dev) /* Calculate the UDP checksum of the packet in d_buf and d_appdata. */ #ifdef CONFIG_NET_UDP_CHECKSUMS -uint16_t udp_chksum(FAR struct uip_driver_s *dev) +uint16_t udp_chksum(FAR struct net_driver_s *dev) { return upper_layer_chksum(dev, UIP_PROTO_UDP); } @@ -220,7 +221,7 @@ uint16_t udp_chksum(FAR struct uip_driver_s *dev) /* Calculate the checksum of the ICMP message */ #if defined(CONFIG_NET_ICMP) && defined(CONFIG_NET_ICMP_PING) -uint16_t icmp_chksum(FAR struct uip_driver_s *dev, int len) +uint16_t icmp_chksum(FAR struct net_driver_s *dev, int len) { FAR struct icmp_iphdr_s *picmp = ICMPBUF; return uip_chksum((uint16_t*)&picmp->type, len);