include: nuttx: net: nxstyle error fix

Nxstyle error fix to silence the CI.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
This commit is contained in:
Alin Jerpelea 2021-01-28 16:33:53 +01:00 committed by Xiang Xiao
parent fe4be428f5
commit 2b6cad5178
16 changed files with 121 additions and 98 deletions

View File

@ -114,7 +114,8 @@ struct net_driver_s; /* Forward reference */
* The arp_ipin() function should be called by Ethernet device drivers
* whenever an IP packet arrives from the network. The function will
* check if the address is in the ARP cache, and if so the ARP cache entry
* will be refreshed. If no ARP cache entry was found, a new one is created.
* will be refreshed.
* If no ARP cache entry was found, a new one is created.
*
* This function expects that an IP packet with an Ethernet header is
* present in the d_buf buffer and that the length of the packet is in the
@ -144,10 +145,11 @@ void arp_ipin(FAR struct net_driver_s *dev);
* Ethernet header is present in the d_buf buffer and that the length of
* the packet is set in the d_len field.
*
* When the function returns, the value of the field d_len indicates whether
* the device driver should send out the ARP reply packet or not. If d_len
* is zero, no packet should be sent; If d_len is non-zero, it contains the
* length of the outbound packet that is present in the d_buf buffer.
* When the function returns, the value of the field d_len indicates
* whether the device driver should send out the ARP reply packet or not.
* If d_len is zero, no packet should be sent; If d_len is non-zero, it
* contains the length of the outbound packet that is present in the d_buf
* buffer.
*
****************************************************************************/

View File

@ -54,8 +54,8 @@
* CONFIG_ENCX24J600 - Enabled ENCX24J600 support
* CONFIG_ENCX24J600_SPIMODE - Controls the SPI mode
* CONFIG_ENCX24J600_FREQUENCY - Define to use a different bus frequency
* CONFIG_ENCX24J600_NINTERFACES - Specifies the number of physical ENCX24J600
* devices that will be supported.
* CONFIG_ENCX24J600_NINTERFACES - Specifies the number of physical
* ENCX24J600 devices that will be supported.
* CONFIG_ENCX24J600_HALFDUPPLEX - Default is full duplex
*/

View File

@ -39,7 +39,7 @@
#ifndef __INCLUDE_NUTTX_NET_FTMAC100_H
#define __INCLUDE_NUTTX_NET_FTMAC100_H
/****************************************************************************'
/****************************************************************************
* Included Files
****************************************************************************/
@ -47,11 +47,11 @@
#ifdef CONFIG_NET_FTMAC100
/****************************************************************************'
/****************************************************************************
* Pre-processor definitions
****************************************************************************/
/* Interrupt status register & interrupt mask register definitions*/
/* Interrupt status register & interrupt mask register definitions */
#define FTMAC100_INT_RPKT_FINISH (1 << 0)
#define FTMAC100_INT_NORXBUF (1 << 1)
@ -146,7 +146,7 @@
#define FTMAC100_RXDES1_RXBUF_SIZE(x) ((x) & 0x7ff)
#define FTMAC100_RXDES1_EDORR (1 << 31)
/****************************************************************************'
/****************************************************************************
* Public Types
****************************************************************************/
@ -194,25 +194,25 @@ struct ftmac100_register_s
/* Transmit descriptor, aligned to 16 bytes */
struct ftmac100_txdes_s
struct __attribute__ ((aligned(16))) ftmac100_txdes_s
{
uint32_t txdes0;
uint32_t txdes1;
uint32_t txdes2; /* TXBUF_BADR */
uint32_t txdes3; /* not used by HW */
} __attribute__ ((aligned(16)));
};
/* Receive descriptor, aligned to 16 bytes */
struct ftmac100_rxdes_s
struct __attribute__ ((aligned(16))) ftmac100_rxdes_s
{
uint32_t rxdes0;
uint32_t rxdes1;
uint32_t rxdes2; /* RXBUF_BADR */
uint32_t rxdes3; /* not used by HW */
} __attribute__ ((aligned(16)));
};
/****************************************************************************'
/****************************************************************************
* Pre-processor definitions
****************************************************************************/

View File

@ -1,4 +1,4 @@
/*********************************************************************************************
/****************************************************************************
* include/nuttx/net/gmii.h
*
* Copyright (C) 2013 Gregory Nutt. All rights reserved.
@ -31,23 +31,23 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*********************************************************************************************/
****************************************************************************/
#ifndef __INCLUDE_NUTTX_NET_GMII_H
#define __INCLUDE_NUTTX_NET_GMII_H
/*********************************************************************************************
/****************************************************************************
* Included Files
*********************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include <nuttx/net/mii.h>
/*********************************************************************************************
/****************************************************************************
* Pre-processor Definitions
*********************************************************************************************/
****************************************************************************/
/* MII register offsets **********************************************************************/
/* MII register offsets *****************************************************/
/* Common MII management registers. The IEEE 802.3 standard specifies a
* register set for controlling and gathering status from the PHY layer. The
@ -71,9 +71,11 @@
#define GMII_ERDRR 13 /* Extend Register - Data Read Register */
#define GMII_ESTATUS MII_ESTATUS /* Extended MII status register */
/* Extended Registers: Registers 16-31 may be used for vendor specific abilities */
/* Extended Registers:
* Registers 16-31 may be used for vendor specific abilities
*/
/* Micrel KSZ9021/31 Vendor Specific Register Addresses **************************************/
/* Micrel KSZ9021/31 Vendor Specific Register Addresses *********************/
#define GMII_KSZ90x1_RLPBK 17 /* Remote loopback, LED mode */
#define GMII_KSZ90x1_LINKMD 18 /* LinkMD(c) cable diagnostic */
@ -93,7 +95,7 @@
#define GMII_KSZ90X1_RRDPSR 261 /* RGMII RX data pad skew */
#define GMII_KSZ90x1_ATR 263 /* Analog test register */
/* MII register bit settings *****************************************************************/
/* MII register bit settings ************************************************/
/* MII Control register bit definitions */
@ -271,7 +273,7 @@
/* Extend Register - Data Read Register (16-bit data value) */
/* Micrel KSZ9021/31 Vendor Specific Register Bit Definitions ********************************/
/* Micrel KSZ9021/31 Vendor Specific Register Bit Definitions ***************/
/* KSZ8021/31 Register 27: Interrupt control/status */
@ -293,13 +295,13 @@
#define GMII_KSZ90x1_INT_RF (1 << 1) /* Remote fault interrupt */
#define GMII_KSZ90x1_INT_LU (1 << 0) /* Link up interrupt */
/*********************************************************************************************
/****************************************************************************
* Type Definitions
*********************************************************************************************/
****************************************************************************/
/*********************************************************************************************
/****************************************************************************
* Public Function Prototypes
*********************************************************************************************/
****************************************************************************/
#ifdef __cplusplus
#define EXTERN extern "C"

View File

@ -107,8 +107,8 @@ struct icmp_hdr_s
uint16_t icmpchksum; /* Checksum of ICMP header and data */
/* All ICMP packets have an 8-byte header and variable-sized data section.
* The first 4 bytes of the header have fixed format, while the last 4 bytes
* depend on the type/code of that ICMP packet.
* The first 4 bytes of the header have fixed format, while the last
* 4 bytes depend on the type/code of that ICMP packet.
*/
/* ICMP_ECHO_REQUEST and ICMP_ECHO_REPLY data */

View File

@ -2,7 +2,8 @@
* include/nuttx/net/icmpv6.h
* Header file for the NuttX ICMPv6 stack.
*
* Copyright (C) 2007-2009, 2012, 2014, 2017 Gregory Nutt. All rights reserved.
* Copyright (C) 2007-2009, 2012, 2014, 2017 Gregory Nutt.
* All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* This logic was leveraged from uIP which also has a BSD-style license:
@ -121,7 +122,7 @@
/* Prefix option flags */
#define ICMPv6_PRFX_FLAG_L (1 << 7) /* On-link flag */
#define ICMPv6_PRFX_FLAG_A (1 << 6) /* Autonomous address-configuration flag
#define ICMPv6_PRFX_FLAG_A (1 << 6) /* Autonomous address-configuration flag */
/* Return with size of an option (in full octects) using the size of a link
* layer address taking into account a header of the two-bytes.

View File

@ -1,7 +1,8 @@
/****************************************************************************
* include/nuttx/net/ioctl.h
*
* Copyright (C) 2007-2008, 2010-2013, 2015-2016 Gregory Nutt. All rights reserved.
* Copyright (C) 2007-2008, 2010-2013, 2015-2016 Gregory Nutt.
* All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without

View File

@ -1,4 +1,4 @@
/************************************************************************************************************
/****************************************************************************
* include/nuttx/net/ipopt.h
* Defines values for the IPv4 header options
*
@ -32,20 +32,20 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************************************************************/
****************************************************************************/
#ifndef __INCLUDE_NUTTX_NET_IPOPT_H
#define __INCLUDE_NUTTX_NET_IPOPT_H
/************************************************************************************************************
/****************************************************************************
* Included Files
************************************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
/************************************************************************************************************
/****************************************************************************
* Pre-processor Definitions
************************************************************************************************************/
****************************************************************************/
/* IP Header Options:
*
@ -99,6 +99,7 @@
#define IPOPT_TYPE_CLASS_MASK (3 << IPOPT_TYPE_CLASS_SHIFT)
# define IPOPT_TYPE_CLASS_CTRL (0 << IPOPT_TYPE_CLASS_SHIFT) /* Control */
# define IPOPT_TYPE_CLASS_MEASURE (2 << IPOPT_TYPE_CLASS_SHIFT) /* Debugging and measurement */
#define IPOPT_TYPE_COPIED (1 << 7) /* Bit 7: IP layer must copy option to each fragment */
#define IPOPT_TYPE_NOTCOPIED (0)
@ -113,7 +114,7 @@
(uint32_t)(ptr) << 8 | (uint32_t)(data))
/* Option Copy Class Length Description References
* ------ ---- ----- --------- ------------------------------------------------
* ------ ---- ----- --------- ----------------------------------------------
* 0 0 0 1 End of options list (RFC 791)
* 1 0 0 1 NOP (RFC 791
* 2 1 0 11 Security (RFC 791, RFC 1108)
@ -235,16 +236,16 @@
#define IPOPT_QS_TYPE \
IPOPT_MKTYPE(IPOPT_TYPE_NOTCOPIED, IPOPT_TYPE_CLASS_CTRL, IPOPT_TYPE_OPTION_QS)
/************************************************************************************************************
/****************************************************************************
* Public Type Definitions
************************************************************************************************************/
****************************************************************************/
/************************************************************************************************************
/****************************************************************************
* Public Data
************************************************************************************************************/
****************************************************************************/
/************************************************************************************************************
/****************************************************************************
* Public Function Prototypes
************************************************************************************************************/
****************************************************************************/
#endif /* __INCLUDE_NUTTX_NET_IPOPT_H */

View File

@ -34,9 +34,9 @@
/* Extension headers carry optional Internet Layer information, and are
* placed between the fixed IPv6 header and the upper-layer protocol header.
* The headers form a chain, using the Next Header fields. The Next Header
* field in the fixed header indicates the type of the first extension header;
* the Next Header field of the last extension header indicates the type of
* the upper-layer protocol header in the payload of the packet.
* field in the fixed header indicates the type of the first extension
* header; the Next Header field of the last extension header indicates the
* type of the upper-layer protocol header in the payload of the packet.
*
* All extension headers are a multiple of 8 octets in size; some extension
* headers require internal padding to meet this requirement.
@ -46,8 +46,9 @@
* processed at every intermediate node on the packet's path, including
* sending and receiving node.
*
* If a node does not recognize a specific extension header, it should discard
* the packet and send a Parameter Problem message (ICMPv6 type 4, code 1).
* If a node does not recognize a specific extension header, it should
* discard the packet and send a Parameter Problem message (ICMPv6 type 4,
* code 1).
* When a Next Header value 0 appears in a header other than the fixed header
* a node should do the same.
*/
@ -79,8 +80,8 @@
* fragmented packets (in IPv6, the traffic source must do fragmentation-
* routers do not perform fragmentation of the packets they forward)
* - Mobility EH is used in support of Mobile IPv6 service
* - Authentication EH is similar in format and use to the IPv4 authentication
* header defined in RFC2402.
* - Authentication EH is similar in format and use to the IPv4
* authentication header defined in RFC2402.
* - Encapsulating Security Payload EH is similar in format and use to the
* IPv4 ESP header defined in RFC2406 [5]. All information following the
* Encapsulating Security Header (ESH) is encrypted and for that reason, it

View File

@ -6,7 +6,8 @@
* Copyright (C) 2007, 2009, 2011-2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Derived largely from portions of uIP with has a similar BSD-styple license:
* Derived largely from portions of uIP with has a similar BSD-styple
* license:
*
* Copyright (c) 2001-2003, Adam Dunkels.
* All rights reserved.
@ -215,8 +216,8 @@ struct netdev_varaddr_s
#endif
/* This structure collects information that is specific to a specific network
* interface driver. If the hardware platform supports only a single instance
* of this structure.
* interface driver. If the hardware platform supports only a single
* instance of this structure.
*/
struct devif_callback_s; /* Forward reference */
@ -230,7 +231,8 @@ struct net_driver_s
#ifdef CONFIG_NET
FAR struct net_driver_s *flink;
/* This is the name of network device assigned when netdev_register was called.
/* 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
* Examples: "eth0"
*/
@ -242,7 +244,9 @@ struct net_driver_s
uint8_t d_flags;
/* Multi network devices using multiple link layer protocols are supported */
/* Multi network devices using multiple link layer protocols are
* supported
*/
uint8_t d_lltype; /* See enum net_lltype_e */
uint8_t d_llhdrlen; /* Link layer header size */
@ -309,7 +313,7 @@ struct net_driver_s
#ifdef CONFIG_NET_TCPURGDATA
/* This pointer points to any urgent TCP data that has been received. Only
* present if compiled with support for urgent data (CONFIG_NET_TCPURGDATA).
* present if compiled with support for urgent data(CONFIG_NET_TCPURGDATA).
*/
FAR uint8_t *d_urgdata;
@ -334,8 +338,8 @@ struct net_driver_s
uint16_t d_len;
/* When d_buf contains outgoing xmit data, d_sndlen is non-zero and represents
* the amount of application data after d_appdata
/* When d_buf contains outgoing xmit data, d_sndlen is non-zero and
* represents the amount of application data after d_appdata
*/
uint16_t d_sndlen;
@ -579,9 +583,9 @@ void neighbor_out(FAR struct net_driver_s *dev);
*
* Description:
* This function should be called before sending out a packet. The function
* checks the destination address of the packet to see whether the target of
* packet is ourself and then consume the packet directly by calling input
* process functions.
* checks the destination address of the packet to see whether the target
* of packet is ourself and then consume the packet directly by calling
* input process functions.
*
* Returned Value:
* Zero is returned if the packet don't loop back to ourself, otherwise
@ -594,8 +598,8 @@ int devif_loopback(FAR struct net_driver_s *dev);
/****************************************************************************
* Carrier detection
*
* Call netdev_carrier_on when the carrier has become available and the device
* is ready to receive/transmit packets.
* Call netdev_carrier_on when the carrier has become available and the
* device is ready to receive/transmit packets.
*
* Call detdev_carrier_off when the carrier disappeared and the device has
* moved into non operational state.
@ -642,7 +646,8 @@ ssize_t net_ioctl_arglen(int cmd);
*
* buf - A pointer to the buffer over which the checksum is to be computed.
*
* len - The length of the buffer over which the checksum is to be computed.
* len - The length of the buffer over which the checksum is to be
* computed.
*
* Returned Value:
* The Internet checksum of the buffer.

View File

@ -137,9 +137,9 @@ struct radiodev_properties_s
* driver must still provide its (single) reassembly buffer in d_buf;
* that buffer is still used for the case where the packet is not
* fragmented into many frames. In either case, the packet buffer will
* have a size of advertised MTU of the protocol, CONFIG_NET_6LOWPAN_PKTSIZE,
* plus CONFIG_NET_GUARDSIZE and some additional overhead for reassembly
* state data.
* have a size of advertised MTU of the protocol,
* CONFIG_NET_6LOWPAN_PKTSIZE, plus CONFIG_NET_GUARDSIZE and some
* additional overhead for reassembly state data.
*
* The radio network driver should then inform the network of the recipt
* of a frame by calling sixlowpan_input() or ieee802154_input(). That
@ -184,6 +184,7 @@ struct radio_driver_s
#endif
/* MAC network driver callback functions **********************************/
/**************************************************************************
* Name: r_get_mhrlen
*

View File

@ -65,6 +65,7 @@
****************************************************************************/
/* Frame format definitions *************************************************/
/* Fragment header.
*
* The fragment header is used when the payload is too large to fit in a
@ -164,7 +165,9 @@
* Values of fields within the IPHC encoding first byte
* (Using MS-to-LS bit numbering of the draft RFC)
*/
/* Bits 0-2: 011 */
#define SIXLOWPAN_IPHC_TC_MASK 0x18 /* Bits 3-4: Traffic Class, Flow Label */
# define SIXLOWPAN_IPHC_TC_00 0x00 /* ECN+DSCP+4-bit Pad+Flow Label (4 bytes) */
# define SIXLOWPAN_IPHC_TC_01 0x08 /* ECN+2-bit Pad+ Flow Label (3 bytes), DSCP is elided. */
@ -467,9 +470,10 @@ struct sixlowpan_reassbuf_s
* - The io_flink field points to the next frame in the list (if enable)
* - The last frame in the list will have io_flink == NULL.
*
* An non-NULL d_buf of size CONFIG_NET_6LOWPAN_PKTSIZE + CONFIG_NET_GUARDSIZE
* must also be provided. The frame will be decompressed and placed in
* the d_buf. Fragmented packets will also be reassembled in the d_buf as
* An non-NULL d_buf of size CONFIG_NET_6LOWPAN_PKTSIZE +
* CONFIG_NET_GUARDSIZE must also be provided.
* The frame will be decompressed and placed in the d_buf.
* Fragmented packets will also be reassembled in the d_buf as
* they are received (meaning for the driver, that two packet buffers are
* required: One for reassembly of RX packets and one used for TX polling).
*

View File

@ -50,7 +50,9 @@
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* Configuration ***********************************************************/
/* Configuration ************************************************************/
/* SLIP Configuration:
*
* CONFIG_NET_SLIP - Enables building of the SLIP driver
@ -58,8 +60,8 @@
* threads. Default: 2048
* CONFIG_NET_SLIP_DEFPRIO - Provides the priority for SLIP RX and TX
* threads. Default 128.
* CONFIG_NET_NET_SLIP_PKTSIZE - Provides the size of the SLIP packet buffers.
* Default 296
* CONFIG_NET_NET_SLIP_PKTSIZE - Provides the size of the SLIP packet
* buffers. Default 296
*
* The Linux slip module hard-codes its MTU size to 296 (40 bytes for the
* IP+TCP headers plus 256 bytes of data). So you might as well set

View File

@ -189,7 +189,7 @@ struct tcp_stats_s
net_stats_t rst; /* Number of received TCP RST (reset) segments */
net_stats_t rexmit; /* Number of retransmitted TCP segments */
net_stats_t syndrop; /* Number of dropped SYNs due to too few
available connections */
* available connections */
net_stats_t synrst; /* Number of SYNs for closed ports triggering a RST */
};
#endif

View File

@ -1,4 +1,4 @@
/************************************************************************************
/****************************************************************************
* include/nuttx/net/w5500.h
* WIZnet W5500 Ethernet Controller
*
@ -32,14 +32,14 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************************************/
****************************************************************************/
#ifndef __INCLUDE_NUTTX_NET_W5500_H
#define __INCLUDE_NUTTX_NET_W5500_H
/************************************************************************************'
/****************************************************************************
* Included Files
************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
@ -48,11 +48,11 @@
#ifdef CONFIG_NET_W5500
/************************************************************************************
/****************************************************************************
* Included Files
************************************************************************************/
****************************************************************************/
/* W5500 Register Addresses *********************************************************/
/* W5500 Register Addresses *************************************************/
/* Common Register Block */
@ -153,7 +153,7 @@
#define W5500_SN_KPALVTR 0x002f /* Keep alive timer */
/* 0x0030-0xffff: Reserved */
/* W5500 Register Bitfield Definitions **********************************************/
/* W5500 Register Bitfield Definitions **************************************/
/* Common Register Block */
@ -197,6 +197,7 @@
# define PHYCFGR_OPMDC_POWER_DOWN (6 << PHYCFGR_OPMDC_SHIFT) /* Power Down mode */
# define PHYCFGR_OPMDC_ALLCAP_AN (7 << PHYCFGR_OPMDC_SHIFT) /* All capable,
* Auto-negotiation */
#define PHYCFGR_OPMD (1 << 6) /* Bit 6: Configure PHY Operation Mode */
#define PHYCFGR_RST (1 << 7) /* Bit 7: Reset */
@ -238,7 +239,9 @@
#define SN_CR_SEND_KEEP 0x22 /* Send TCP keep-alive packet */
#define SN_CR_RECV 0x40 /* Complete received data in Socket n RX buffer */
/* Socket n Interrupt Register (SN_IR) and Socket n Interrupt Mask Register (SN_IMR) */
/* Socket n Interrupt Register (SN_IR) and
* Socket n Interrupt Mask Register (SN_IMR)
*/
#define SN_INT_CON (1 << 0) /* Bit 0: Connection with peer successful */
#define SN_INT_DISCON (1 << 1) /* Bit 1: FIN or FIN/ACK received from peer */
@ -281,9 +284,9 @@
#define SN_TXBUF_8KB 5
#define SN_TXBUF_16KB 16
/************************************************************************************'
/****************************************************************************
* Public Types
************************************************************************************/
****************************************************************************/
/* This structure describes the lower-half interface provided by board-
* specific logic.
@ -308,11 +311,11 @@ struct w5500_lower_s
void (*reset)(FAR const struct w5500_lower_s *lower, bool reset);
};
/************************************************************************************
/****************************************************************************
* Public Function Prototypes
************************************************************************************/
****************************************************************************/
/************************************************************************************
/****************************************************************************
* Name: w5500_initialize
*
* Description:
@ -326,7 +329,7 @@ struct w5500_lower_s
*
* Assumptions:
*
************************************************************************************/
****************************************************************************/
int w5500_initialize(FAR struct w5500_lower_s *lower);