Commit Graph

1469 Commits

Author SHA1 Message Date
Gregory Nutt
e8832be8f1 net/sixlowpan: Fix a constant value used in IPv6 address decompression. The 0x0200 value used in the address modification should be in network order. 2018-04-13 08:17:25 -06:00
Gregory Nutt
cab7ba8b8f Bluetooth: Better integrate NuttX Bluetooth IOCTL commands and NetBSD IOCTL commands. Stanardize naming. 2018-04-06 09:42:41 -06:00
Gregory Nutt
39e393fa5f net/bluetooth: Since the max header is always reported, the max frame size for purposes of allocation is the max header lenght plus the max payload, even though the frames with the max payload never have the max header length. 2018-04-05 16:40:59 -06:00
Gregory Nutt
0142a5ad13 arch/sim/src: Variable fixes to get a Bluetooth simulation build. 2018-04-03 10:00:56 -06:00
Gregory Nutt
a91edf7f3c net/Kconfig: Remove some trivial kruft from Kconfig file. 2018-04-03 08:13:11 -06:00
Gregory Nutt
5dd11f465b net/bluetooth: Add support for connection to any address and any channel. 2018-04-01 17:53:07 -06:00
Gregory Nutt
aae0d92598 wireless/bluetooth and net/bluetooth: Clean up some garbage left in Kconfig file that broke 'make menuconfig'. Clean up some craziness with Bluetooth frame length definitions. 2018-04-01 15:21:58 -06:00
Gregory Nutt
f7bcad502a Bluetooth: Bring in some definitions from NetBSD. Update some usage and naming to be more consistent. 2018-03-31 16:31:51 -06:00
Gregory Nutt
0c007be4bd This comment adds (1) basic support for AF_BLUETOOTH sockets. The logic compiles but is still incomplete. Support for Bluetooth is general is still dependent on CONFIG_EXPERMIMENTAL because it is not yet ready for used.
Squashed commit of the following:

    wireless/bluetooth:  Some small changes that gets to a clean compile by just eliminating some incorrect implementations (still with a lot of warnings.  The logic is still incomplete but now not so lethal.
    wireless/bluetooth:  Restructuring:  Connection interfaces should internal to wireless/bluetooth.  include/nuttx/wireless/bt_conn.h removed and merged with wireless/bluetooth/bt_conn.h.  Several fix to get closer to bt_netdev.c compiling.  Need to design some not interfaces and use some existing interfaces to send and receiv packets.
    wireless/bluetooth: Some organization with some network device compile errors fixed.  Still not even close to compiling.
    net/bluetooth:  Fix numerous compile issues; Still open design issues with regard to the interface with the Bluetooth stack.
    wireless/bluetooth:  Create bt_netdev.c with a crude copy of mac802154_netdev.c.  Does not not even compile yet.
    include/nuttx/net:  Add bluetooth.h.  Content is not yet correct.
    net/netpackets:  Add bluetooth.h.  Update net/bluetooth to use new socket address definition.
    net/bluetooth:  Some fixes for initial build.
    net/bluetooth:  Add initial support for Bluetooth sockets.  The initial cut is just the a clone of the IEEE 802.15.4 socket support with name changes.
    net/ieee802154:  Fix some typos noted when cloning to create net/bluetooth.
2018-03-31 14:55:03 -06:00
Gregory Nutt
c78b53a74c net/ieee802154: Add some missing logic in connect(). 2018-03-31 09:28:24 -06:00
Gregory Nutt
57f7677128 net/udp: Fix another related error in UDP condition compilatino (was actually using TCP setting, not UDP setting). 2018-03-30 15:30:45 -06:00
Gregory Nutt
2796b0245c net/ieee802154 and include/net/ieee802154: Fix a few more trivial typos. 2018-03-30 15:20:51 -06:00
Gregory Nutt
1a70e0b15e net/ieee802154: Fix more typos and cosmetic problems. 2018-03-30 13:42:55 -06:00
Gregory Nutt
2bb6ec41d1 net/: Trivial fix for a typo. 2018-03-30 12:27:04 -06:00
Gregory Nutt
51ee2cdd86 net/udp: Fix some errors in conditional compilation. 2018-03-30 12:08:53 -06:00
Gregory Nutt
a2f237065c net/ieee802154: Fix some typos noted when cloning to create net/bluetooth. 2018-03-30 12:08:29 -06:00
Masayuki Ishikawa
1d958980bd Merged in masayuki2009/nuttx.nuttx/fix_smp_bugs (pull request #615)
Fix SMP related bugs

* sched/sched: Fix a deadlock in SMP mode

    Two months ago, I introduced sched_tasklist_lock() and
    sched_tasklist_unlock() to protect tasklists in SMP mode.
    Actually, this change works pretty well for HTTP audio
    streaming aging test with lc823450-xgevk.

    However, I found a deadlock in the scheduler when I tried
    similar aging tests with DVFS autonomous mode where CPU
    clock speed changed based on cpu load. In this case, call
    sequences were as follows;

    cpu1: sched_unlock()->sched_mergepending()->sched_addreadytorun()->up_cpu_pause()
    cpu0: sched_lock()->sched_mergepending()

    To avoid this deadlock, I added sched_tasklist_unlock() when calling
    up_cpu_pause() and sched_addreadytorun(). Also, added
    sched_tasklist_lock() after the call.

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

* libc: Add critical section in lib_filesem.c for SMP

    To set my_pid into fs_folder atomically in SMP mode,
    critical section API must be used.

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

* mm: Add critical section in mm_sem.c for SMP

    To set my_pid into mm_folder atomically in SMP mode,
    critical section API must be used.

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

* net: Add critical section in net_lock.c for SMP

    To set my pid (me) into fs_folder atomically in SMP mode,
    critical section API must be used.

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-03-20 12:34:38 +00:00
Gregory Nutt
b54ffe858a Standardization of some function headers. 2018-03-13 09:52:27 -06:00
Gregory Nutt
1a990f99d1 libc/time: Add an implementationof clock() 2018-03-13 08:07:29 -06:00
Gregory Nutt
ae399b9b62 net/tcp: In tcp_input(), add the logic to detect, decode, and respond to TCP Keep-Alive packets. In tcp_timer(), fix some problems with the way that TCP Keep-Alive probes were being formatted. 2018-03-12 15:54:45 -06:00
Gregory Nutt
251924a734 Squashed commit of the following:
net/tcp:  Add logic to send probes when SO_KEEPALIVE is enabled.
    net/tcp:  TCP socket should not have to be connected to configure KeepAlive.
    net/: Add a separate configuration to enable/disable KEEPALIVE socket options.
    net/tcp: Arguments to TCP keep-alive timing functions probably should be struct timeval as are the times for other time-related socket options.
    net/tcp:  Fix a backward conditional
    net/tcp:  Add some more checks and debug output to TCP-protocol socket options.
    net/tcp:  Cosmetic changes to some alignment.
    net/:  Adds socket options needed to manage TCP-keepalive and TCP state machine logic to detect if that the remote peer is alive.  Still missing the timer poll logic to send the keep-alive probes and the state machine logic to respond to probes.
2018-03-12 10:59:46 -06:00
SP
52d54b2451 net/icmpv6/icmpv6: Eliminate warnings by correct the type uses to link structure into lists. 2018-02-23 08:04:50 -06:00
Gregory Nutt
9812f6f932 Trivial update to some comments 2018-02-22 18:42:27 -06:00
Gregory Nutt
3a2d0a06f4 net/tcp: Generalize Juho Grundstrom's IPv4 change for IPv6 as well. 2018-02-22 16:41:14 -06:00
Juho Grundstrom
13058858f2 net/tcp: tcp_send_[un]buffered.c: And header file inclusion missing in previous commit. 2018-02-22 16:30:46 -06:00
Juho Grundstrom
c065f0fd49 net/tcp: tcp_send_[un]buffered.c: Check routing table in psock_send_addrchck(). Previously only ARP table was considered when determining if the data will actually be sent. 2018-02-22 16:24:15 -06:00
Gianpaolo Ferroni Ariani
2c8eb5b240 net/tcp: Fixes hardfault when network goes done and network monitoring is in place. 2018-02-22 06:29:18 -06:00
Dmitriy Linikov
a8c58607e9 Merged in hardlulz/modem-3.0-nuttx/fix-sem-EINTR (pull request #603)
Added ECANCELED condition to DEBUGASSERT-s checking sem_wait result

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-02-20 18:24:53 +00:00
Dmitriy Linikov
9e8332e5c8 Merged in hardlulz/modem-3.0-nuttx/fixbuild-ipv4_forward (pull request #602)
Fixed misprint in ipv4_forward.c

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-02-20 18:23:48 +00:00
Gregory Nutt
2c17bf21af net/tcp: Missing header file inclusion in tcp_wrbuffer.c 2018-02-14 09:23:55 -06:00
Pelle Windestam
e0142f1d52 net/tcp: Fixed bad return value handling in psock_tcp_send(). send() expects psock_tcp_send() to return a negated errno value, not -1 with the errno set (GN: I added same change for tcp_send_buffered.c which has the same issue as tcp_send_unbuffered.c) 2018-02-13 08:02:42 -06:00
Alan Carvalho de Assis
fb50c44d08 Fix various issues noted by Coverity 2018-02-06 09:13:16 -06:00
Gregory Nutt
2683f713ab Make sure that labeling is used consistently in all function headers (part 3). 2018-02-01 12:17:03 -06:00
Gregory Nutt
7cf88d7dbd Make sure that labeling is used consistently in all function headers. 2018-02-01 10:00:02 -06:00
Gregory Nutt
3521aaf944 Squashed commit of the following:
binfmt/, configs/, grahics/, libc/, mm/, net/, sched/:  OS references to the errno variable should always use the set_errno(), get_errno() macros
    arch/arm/src/stm32 and stm32f7:  Architecture-specific code is not permitted to modify the errno variable.  drivers/ and libc/:  OS references to the errno variable should always use the set_errno(), get_errno() macros
2018-01-30 17:57:36 -06:00
Gregory Nutt
5e49e9e937 Update some comments. 2018-01-24 06:50:20 -06:00
Gregory Nutt
82cb799bb6 net/udp: Fix memory leak with UDP + write buffer is closed. Also update TODO and comments and refresh a configuration. 2018-01-23 11:54:03 -06:00
Gregory Nutt
f2017bded8 net/udp: UDP write buffering is basically functional but needs a lot more verification. 2018-01-23 07:32:17 -06:00
Gregory Nutt
289e4dde06 net/udp and tcp: Yet another (cosmetic) change to UDP and TCP write buffer macro naming. 2018-01-22 19:33:14 -06:00
Gregory Nutt
2d4fa19a54 net/udp: Resolves final design issues with UDP write buffering. 100% code complete but also 100% untested. 2018-01-22 19:27:05 -06:00
Gregory Nutt
fa3ad46897 net/udp: In sendto(), return EHOSTUNREACH if if the network is down. 2018-01-22 18:46:58 -06:00
Gregory Nutt
fef255e5be This commit adds an as-of-yet untested implemented of UDP write buffering.
Squashed commit of the following:

    net/udp:  Address most of the issues with UDP write buffering.  There is a remaining issue with handling one network going down in a multi-network environment.  None of this has been test but it is certainly ready for test.  Hence, the feature is marked EXPERIMENTAL.
    net/udp:  Some baby steps toward a corrected write buffering design.
    net/udp:  Remove pesky write buffer macros.
    Eliminate trailing space at the end of lines.
    net/udp:  A little more UDP write buffering logic.  Still at least on big gaping hole in the design.
    net/udp:  Undefined CONFIG_NET_SENDTO_TIMEOUT.
    net/udp:  Crude, naive port of the TCP write buffering logic into UDP.  This commit is certainly non-functional and is simply a starting point for the implementatin of UDP write buffering.
    net/udp:  Rename udp/udp_psock_sendto.c udp/udp_psock_sendto_unbuffered.c.
2018-01-22 18:32:02 -06:00
Gregory Nutt
0406fff888 net/udp: Remove some conditional logic that was true if there is only a single network device, but not true in the multi-device context. 2018-01-22 14:14:32 -06:00
Gregory Nutt
12d7125b75 net/tcp: Write buffering logic should not wait for a free buffer if the socket was opened non-blocking. Also, rename the TCP write buffering macros from WRB_* to TCPWB_* to make room in the namespace for write buffering with other protocols. 2018-01-22 11:11:23 -06:00
Gregory Nutt
376e30dab4 net/route: Fix a couple of compile-related issues that have crept in sense the last time the file-based routing table was used. 2018-01-05 08:57:22 -06:00
Gregory Nutt
e4652bd3dc Squashed commit of the following:
fs: Add truncate() support for userfs
    fs/unionfs:  Add truncate() support to the unionfs
    fs/tmpfs:  Add ftruncate() support to tmpfs
    syscall/: Add system call support for ftruncate()
    net/route:  Adding ftruncate() support eliminates an issue in file-based routing table management.
    fs:  Add basic framework to support truncate() and ftruncate().  The infrastructure is complete.  Now, however, the actual implementation of ftruncate() will have to be done for each file system.
2018-01-03 16:03:56 -06:00
Louis Mayencourt
aa1a068999 net/arp: Fix IGMP multicast address computation on Nuttx network stack. This change fixes the IGMP address computation to allow multicast UDP messages. The destination address was created with the incorrect bytes of the given IPv4 address. 2018-01-02 11:19:30 -06:00
Gregory Nutt
c3d3e91a3f arch/arm/src/lpc54xx: Correct handling of the Ethernet RBU error. With this fix, Ethernet now appears to be fully functional although still undertested. 2018-01-01 15:08:19 -06:00
Gregory Nutt
2a2cdb4df2 net: Fix an error introduced when ICMP and ICMP6 socket support was added in NuttX-7.3. A gratuitous ARP (or solitication) was being sent after receive of the ECHO replay (advertisement). 2018-01-01 11:15:21 -06:00
Masayuki Ishikawa
30070b06df Merged in masayuki2009/nuttx.nuttx/tcp_rcvwnd_control (pull request #555)
net/tcp: Introduce tcp receive window control based on I/O buffer

NOTE: The algorithm is still experimental but useful for http streaming.

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-12-18 12:11:52 +00:00