Commit Graph

33251 Commits

Author SHA1 Message Date
Gregory Nutt
46cf69c93e include/nuttx/net/netdev.h: Fix a copy-paste error in previous commit. 2018-11-03 07:15:37 -06:00
Gregory Nutt
863f617262 net/igmp and net/mld: Fix problem when both IGMP and MLD are enabled. The cannot share the same group list in the network devices structure. 2018-11-03 07:06:30 -06:00
Gregory Nutt
42a018747e net/devif, net/tcp, and net/udp: Extend the logic of 6c0ab0e077 so that all support Transport protocols support by IPv6 can handle the presence of IPv6 header extension options. 2018-11-02 17:50:01 -06:00
Gregory Nutt
6c0ab0e077 Squashed commit of the following:
include/nuttx/net/ipv6ext.h:  Fix some terminology:  Hop-by-hop, not Hop-to-hop or Hop2hop.

    net/devif/ipv6_input.c and net/icmpv6/icmpv6_input.c:  Add logic to skiip over the variable number of IPv6 extension headers that may be present between the IPv6 header and the transport layer header.  The extension headers are simply ignored.  This is necessary because with MLD, certain incoming messages may have, at a mimimum, a Router Alert Hop-by-hop extension header.

    net/inet/ipv6_setsockopt.c:  Implement the IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP socket options.
2018-11-02 12:06:57 -06:00
Alan Carvalho de Assis
2129ce134c drivers/sensors/mlx90614.c: Fix MLX90614 to reflash new device address 2018-11-02 07:05:40 -06:00
Gregory Nutt
9f2cb42918 include/nuttx/net/ipv6ext.h: Create header file with all of the definitions of IPv6 extension headers that I could find. net/mld/mld_send.c: Correct the size and format of the Hop-to-hop, Router alert extension header. 2018-11-01 17:51:47 -06:00
Gregory Nutt
5b7ef856a0 Squashed commit of the following:
net/mld:  The MLD logic now compiles and is much less toxic.  It still is not a proper MLD implementation:  (1) It is basically a port of IGMP, tweaked to work with IPv6 and ICMPv6 MLD messages, (2) it needs a proper analysis and comparison with RFC 3810, and (3) it is completely untested.  For this reason, it will remain EXPERIMENTAL for some time.
    net/mld:  Add some missing macros, more fixes related to IPv6 vs IPv4 types,
    net/mld:  More compilation cleaning.  Most fixups for IPv6 vs IPv4 types.
    net/mld:  Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
    net/mld:  Add support for MLD statistics.
    net/mld:  Hook in MLD poll and packet transmission logic.
    net/mld:  Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input.  Add functions to catch MLD messages dispatched by ICMPv6 input logic.
    net/mld:  As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
    net/mld:  More compilation cleaning.  Most fixups for IPv6 vs IPv4 types.
    net/mld:  Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
    net/mld:  Add support for MLD statistics.
    net/mld:  Hook in MLD poll and packet transmission logic.
    net/mld:  Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input.  Add functions to catch MLD messages dispatched by ICMPv6 input logic.
    net/mld:  As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
2018-11-01 15:19:47 -06:00
Anthony Merlino
260d29a187 Merged in antmerlino/nuttx/xbee-getset-txpwr (pull request #747)
Xbee getset txpwr

* drivers/wireless/ieee802154/xbee: Minor improvements to debug facilities.

* drivers/wireless/ieee802154/xbee: Add support for setting/getting tx power.

    TODO: The input/output arguments from the MLME primitive are intended to be an int32_t dbm value. However this change simply reports the power level register of the XBee. Need to add look-up table to back calculate the dbm value.

    # Conflicts:
    #	drivers/wireless/ieee802154/xbee/xbee.c

Approved-by: GregoryN <gnutt@nuttx.org>
2018-11-01 19:05:04 +00:00
Anthony Merlino
7f10234468 Merged in antmerlino/nuttx/spi-initialize (pull request #746)
This change is needed specifically for the case where a bootloader sets the SPE bit before starting NuttX.  In that case, the test in the SPI driver is bogus.  This change fixes that by assuring that NuttX has booted and initialized at least once (whether or not SPE is set) before the driver starts refusing to initialize.

arch/arm/stm32*: Don't rely on SPI_CR1_SPE to determine if peripheral has been initialized yet.

Approved-by: GregoryN <gnutt@nuttx.org>
2018-11-01 16:00:27 +00:00
Gregory Nutt
933d38a209 include/nuttx/net/igmp.h: Remove bogus support for IPv6 IGMP. There is no such thing. 2018-11-01 08:53:48 -06:00
Gregory Nutt
928dde3472 net/: Add some comments; fix some spelling. 2018-11-01 07:52:32 -06:00
Dave Marples
ae054b93bb arch/arm/src/imxrt/imxrt_usdhc.c: Initial commit of the i.MXRT SDHC driver. This driver is partially functional, working in PIO mode. DMA support and additional testing are needed. 2018-11-01 06:26:51 -06:00
Gregory Nutt
efbeac79e8 configs/imxrt1050-evk/src: Previous committed implemented atypical SPI-based MMC/SD card support conditioned on CONFIG_MMCSD. This is, of course, incorrect and interferes with the implementation of correct MMC/SD card support using the correct SDIO-based peripheral. This commit renames that atypical support to *mmcsd_spi* and conditions using that atypical support on CONFIG_MMCSD_SPI with should then not interfere with the correct MMC/SD suppor that can be conditioned on CONFIG_MMCSD_SDIO. 2018-10-31 17:41:41 -06:00
Gregory Nutt
f5ed6bf672 net/inet/ipv4_setsockopt.c: Add implementation for all IPv4 socket options that have implemented IOCTL command counterparts. 2018-10-31 17:15:23 -06:00
Gregory Nutt
0330743a9d net/inet: Add framework to support IPv4 and IPv6 protocol socket options (i.e., SOL_IP and SOL_IP6). This is build framework only (not actual socket options are yet handled). Handling of these socket options is a necessary step on the way to future ICMPv6 MLD support. 2018-10-31 15:59:05 -06:00
Gregory Nutt
6d93658ff8 Add new configuratin CONFIG_NET_MCASTGROUP. This option is selected automatically if either CONFIG_NET_IGMP or CONFIG_NET_MLD are selected. Most conditional logic based on CONFIG_NET_IGMP replaced with conditioning on CONFIG_NET_MCASTGROUP. 2018-10-31 15:03:51 -06:00
Gregory Nutt
dde1e89b8c net/mld: Add basic build structure for Multicast Listener Discovery (MLD). No real MLD logic yet. Only a few hooks to capture and dispatch MLD ICMPv6 packets. 2018-10-31 14:10:19 -06:00
Gregory Nutt
a3c67df91d arch/arm/src/imxrt: Add full support for the LPSPI in poll mode; includes a minor fix for LPI2C. 2018-10-31 12:50:05 -06:00
Gregory Nutt
b51e77829e tools/nxstyle.c: Remove some logic added in previous change. Causes too many false alarms. 2018-10-31 12:42:18 -06:00
Gregory Nutt
56415d8fa7 include/nuttx/net/mld.h: Add some missing header file inclusions. 2018-10-31 11:32:43 -06:00
Gregory Nutt
e192c9fa3d include/nuttx/net/mld.h: Add MLD header file based on RFC2710 and RFC3810. 2018-10-31 11:27:57 -06:00
Anthony Merlino
7750e55d15 Merged in antmerlino/nuttx/stm32f20xx-kconfig-fix (pull request #745)
Fixes Kconfig options to include all STM32F20XX processors, not just STM32F207

* arch/arm/src/stm32: Fixes Kconfig options to include all STM32F20XX processors, not just STM32F207

* arch/arm/src/stm32: Removes redundant STM32_STM32F429 depends from Kconfig. STM32F4XXX already does this

Approved-by: GregoryN <gnutt@nuttx.org>
2018-10-31 03:53:13 +00:00
Gregory Nutt
b49fe431b7 drivers/usbdev/Kconfig: Correct an error found in build testing. The type of CONFIG_RNDIS_SERIALSTR must be a string, not hex. 2018-10-30 16:40:32 -06:00
Gregory Nutt
f4a5f7a3b9 arch/risc-v/src/gap8: The correct name of the chip.h should be gap8.h. This in analogy to other architectures. There is frequently a chip.h header file in the arch/src directory, but it has a different function. 2018-10-30 16:34:56 -06:00
Gregory Nutt
6ac4681233 tools/nxstyle.c: Fix detection of blank line at beginning for file. Fix detection of whitespace at the end of a line. 2018-10-30 16:33:41 -06:00
Gregory Nutt
552f53e578 arch/risc-v/src/gap8/gap8_tim.c: Fix a typo that I introduced in my review. 2018-10-30 11:19:06 -06:00
Gregory Nutt
c2f8d1bf39 Documentation/NuttX.html: Update to include GreenWaves GAP8 2018-10-30 10:57:35 -06:00
Gregory Nutt
9e0ad7b98a arch/risc-v/src/gap8/startup_gap8.S: Remove commented out call to a non-existent function. 2018-10-30 10:39:51 -06:00
Gregory Nutt
5c8831c886 drivers/mmcsd/Kconfig: Remove executable bit from file permissions. 2018-10-30 09:48:53 -06:00
Gregory Nutt
e4562fc538 This commit brings in support for the GAP8 architecture. The GAP8 is a 1+8-core DSP-like RISC-V MCU. Also included is support for the Gapuino GAP8 evaluation board.
Squashed commit of the following:

Author: Gregory Nutt <gnutt@nuttx.org>

    Completes review of configs/gapuino.
    arch/risc-v/include/gap8/chip.h:  Replace the moved chip.h header file with a dummy chip.h header file just to keep the system happy.
    Move include/gap8/chip.h to src/gap8/chip.h.  Internal details should not be exposed outside of arch/ and configs/.  Review all headers files in src/gap8
    Review of arch/risc-v/include.

Author: hhuysqt <hyq9606@126.com>

    corrected author and email
    Add app initialization, add signal support, cleanup irq context and configs
    fix some warnings
    gapuino initial port
    GAP8 initial port
2018-10-30 09:38:50 -06:00
Gregory Nutt
de764af9aa tools/nxstyle: Back out part of last commit. Logic to avoid some false alarms was causing real style problems from being reported. 2018-10-30 08:36:30 -06:00
Gregory Nutt
88130a996a net/: Fixes for more coding standard issues detected by nxstyle. 2018-10-29 18:00:30 -06:00
Gregory Nutt
dcb7ce8afd tools/nxstyle.c: Add logic to catch another formatting error and to eliminate some false alarms. Includes cosmetic changes to several files ... mostly as a result of testing nxstyle and finding issues. 2018-10-29 16:25:57 -06:00
Gregory Nutt
7d2b250cbc net/netdev: All utility functions that lookup network devices should begin with netdev_findby_. Also correct some comments and the name of a formal parameter. 2018-10-29 12:21:22 -06:00
Anthony Merlino
ad887ec34c Merged in antmerlino/nuttx/sixlowpan-warning (pull request #744)
net/sixlowpan/sixlowpan_hc06.c: Fixes warning introduced by recent changes to uncompress_addr.

Approved-by: GregoryN <gnutt@nuttx.org>
2018-10-29 15:05:58 +00:00
Gregory Nutt
9f754ed1dc include/sys/sockio.h, net/netdev/netdev_ioctl.c: Fix a compile error introducted with commit 34db6d1433. That commit added the semi-standard ip_msfilter structure to netinet/in.h. Howver, there was a non-standard version of that structure in sys/sockio.h. This commit removes the non-standard version of struct ip_msfilter and adapts the IOCTL and device lookup logic in net/netdev to work with the new, semi-standard version in netinet/in.h. 2018-10-29 06:50:47 -06:00
Alan Carvalho de Assis
3888d33a05 configs/stm32f4discovery/src/stm32_mlx90614.c: Add MLX90614 support for the STM32F4Discovery board 2018-10-28 16:00:58 -06:00
Alan Carvalho de Assis
9689448d2a drivers/sensors/mlx90614.c: Add support for the Infrared Thermometer MLX90614 2018-10-28 15:58:14 -06:00
Gregory Nutt
34db6d1433 include/netinet/in.h: Add other definitions required by OpenGroup.org. Correct some typos. 2018-10-28 14:23:04 -06:00
Gregory Nutt
40f56a8a2f include/netinet/in.h: Add IPv4 SOL_IP socket options for symmetry with IPv6 definitions added in a previous commit. None of the socket options have been implemented! 2018-10-28 14:03:57 -06:00
Gregory Nutt
de107c8b98 include/netinet/in.h: Per OpenGroup.org, type of sin_port in struct sockaddr_in must be in_port_t vs uint16_t. NOTE: in_port_t is typdef'ed as uint16_t anyway. Plus additional cosmetic changes for things like long lines. 2018-10-28 12:35:22 -06:00
Mateusz Szafoni
2a4ed884b5 Merged in raiden00/nuttx_pe (pull request #743)
arch/arm/stm32: add support for STM32F303xD/E; configs: add basic support for nucleo-f303ze

Approved-by: GregoryN <gnutt@nuttx.org>
2018-10-28 16:39:56 +00:00
Gregory Nutt
11cc274eef Trivial, cosmetic changes from review of last PR. 2018-10-28 06:55:20 -06:00
Mateusz Szafoni
7329c81503 Merged in raiden00/nuttx_h7 (pull request #742)
Add basic SPI support for H7

* stm32h7: basic SPI support (nodma, noirq)

* nucleo-h743zi: nrf24l01 support

* nrf24l01.c: fix compilation errors

* stm32h7x3xx_rcc.c: enable SYSCFG clock

Approved-by: GregoryN <gnutt@nuttx.org>
2018-10-28 12:43:08 +00:00
Alan Carvalho de Assis
ea1689409f libs/libc/misc/lib_crc8ccitt.c: Adds implementation of CRC8-CCITT. 2018-10-27 16:29:32 -06:00
Gregory Nutt
bbd8cfbfb5 include/sys/socket.h: With increased size of struct sockaddr_in6 of commit 55f31f03f9, the size of struct sockaddr_storage in include/sys/socket.h must also be increase so that it can contain the new, larger sockaddr_in6. 2018-10-27 14:10:46 -06:00
Gregory Nutt
dcc081831e Trivial, cosmetic changes from review of last PR. 2018-10-27 13:47:22 -06:00
Anthony Merlino
55f31f03f9 Merged in antmerlino/nuttx/add-ipv6-options (pull request #741)
Adds definitions for IPPROTO_IPV6 socket options to netinet/in.h Adds missing fields to sockaddr_in6.  Adds struct ipv6-mreq.

These changes all follow the opengroup standard for netinet/in.h

Approved-by: GregoryN <gnutt@nuttx.org>
2018-10-27 19:32:25 +00:00
Anthony Merlino
1b18f10bee Merged in antmerlino/nuttx/net-if-externC-fix (pull request #740)
Adds extern "C" guard in include/net/if.h

Approved-by: GregoryN <gnutt@nuttx.org>
2018-10-27 18:13:02 +00:00
Anthony Merlino
4898c477a9 Merged in antmerlino/nuttx/multicast-fix (pull request #739)
Fixes logic in ipv6_input to handle more than ff02::/16 multicast addresses. Don't forward mcast packets if scope is not appropriate

Approved-by: GregoryN <gnutt@nuttx.org>
2018-10-27 18:12:37 +00:00