Commit Graph

476 Commits

Author SHA1 Message Date
Gregory Nutt 7a0481d2a9 drivers/net/telnet.c: Fix a C89 non-compliance that was breaking the ez80 build. 2019-06-03 08:20:21 -06:00
Valmantas Palikša 4e56c577fe drivers/net/telnet.c: I/O thread now offloads reading from socket from client thread to the I/O thread. 2019-05-22 07:46:40 -06:00
Gregory Nutt b49be4bb20 Squashed commit of the following:
arch/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    sched/ audio/ crypto/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    Documentation/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    fs/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    graphics/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    net/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    drivers/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    include/, syscall/, wireless/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    configs/:  Remove all references to CONFIG_DISABLE_POLL.  Standard POSIX poll can no longer be disabled.
2019-05-21 18:57:54 -06:00
Valmantas Paliksa de05dd6e67 drivers/net/telnet.c: Handle ctrl events (SIGINT, SIGSTP). 2019-05-21 09:57:46 -06:00
Jukka Laitinen d1c9cf2e93 drivers/net/phy_notify.c: Change sprintf to strncpy in phy_notify. On some platforms, the sprintf doesn't accept a const char* as a format argument. 2019-04-30 06:24:43 -06:00
Gregory Nutt 4653260388 drivers/net: Run tools/detab, rmcr, lowhex, and nstyle against all files. 2019-02-24 11:51:25 -06:00
Gregory Nutt 7c2aa26486 drivers/net/tun.c: Costmetic changes from review for coding style compliance. 2019-02-24 10:10:38 -06:00
Gregory Nutt 3502425221 drivers/net/tun.c: Packet buffer size should include the configured GUARD_SIZE. And, given how the buffers are allocated, the allocation size must be an even number of 16-bit values to preserve alignment. 2019-02-24 09:52:18 -06:00
Gregory Nutt 4d3dd73e57 drivers/net/tun.c: Re-order all TUN/TAP driver state data. Not only was was with wasting memory due to alignement requirements, it was also causing network packet buffers to be improperly aligned causing problems because the network requires 16-bit packet buffer alignment for uint16_t accesses. This alignment problem was discovered by Alan Carvalho de Assis. 2019-02-24 09:43:30 -06:00
Xiang Xiao fb63c0a293 sched/signal and related changes to other OS subsystems. 2019-01-27 09:28:59 -06:00
Xiang Xiao d105dc9b5e drivers/net/phy_notify.c and all network drivers that support PHY notifications: Support the signal notification through SIGEV_THREAD 2019-01-27 08:57:23 -06:00
Masayuki Ishikawa 69652bf9f2 Merged in masayuki2009/nuttx.nuttx/fix_telnet_driver (pull request #819)
drivers/net/telnet.c: Add config to avoid a garbage character when not supported.

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

Approved-by: GregoryN <gnutt@nuttx.org>
2019-01-19 12:43:21 +00:00
Gregory Nutt 1e2209348f drivers/net/telnet.c: Eliminate some newly introduced warnings found in build testing. 2019-01-13 14:04:20 -06:00
Ken Pettit 92104149e8 drivers/net/telnet.c: Add missing logic to set read event flags in poll() method. 2019-01-08 08:16:43 -06:00
Daniel Agar efb42f4e25 Merged in dagar/nuttx/pr-net_telnet_unused (pull request #807)
drivers telnet common_ioctl() - inode only used with CONFIG_TELNET_SUPPORT_NAWS

Approved-by: GregoryN <gnutt@nuttx.org>
2019-01-07 14:19:48 +00:00
Daniel Agar 62fe15e87c Merged in dagar/nuttx/pr-telnet_unused_priv (pull request #803)
telnet.c priv only used if CONFIG_TELNET_SUPPORT_NAWS

Approved-by: GregoryN <gnutt@nuttx.org>
2019-01-06 16:15:56 +00:00
Ken Pettit a97c4d8644 drivers/net/telnet.c: Add NAWS and poll interface to telnet for screen size negotation used with termcurses.
arch/arm/src/samv7/sam_serial.c: Fix case where TTYS0 is not defined.
2019-01-05 12:14:05 -06:00
Lwazi Dube 53ce088a54 arch/arm/include/tiva and src/tiva: Improve GPIO interrupt support by removing unnecessary, hard-coded per-MCU defines and using the existing Kconfig configuration options instead. 2018-12-31 07:19:30 -06:00
Xiang Xiao fc9964f6b6 drivers/net/tun.c: Fixes a problem reported by Masayuki Ishikwawa: Recently I noticed that ARP response packet is corrupted when I tried to run bluekitchen with the latest tun.c in TAP mode. If I revert commit 8193c28e91, then it works again. 2018-12-30 17:54:03 -06:00
Gregory Nutt 09f4dee6bc All network drivers! Change pre-processor logic that selects the high priority work queue or gives preferential treatment to the high priority work. All network logic must run on the low priority work queue! Or suffer the consequences. 2018-11-21 07:57:26 -06:00
Xiang Xiao 77098f8736 Move NETDEV_LATEINIT from drivers/net/Kconfig to net/Kconfig so that we can select NETDEV_LATEINIT without enabling NETDEVICES since the net driver in arch folder may need to initialize later too. 2018-11-12 06:36:26 -06:00
Xiang Xiao 8193c28e91 drivers/net/tun.c: Call ipv[4|6]_input dynamically by checking packet header and remove the code duplication 2018-11-09 09:50:10 -06:00
Xiang Xiao 3f1b6543db drivers/net/slip.c: Add IPv6 support and fix minor issue 2018-11-09 09:41:24 -06:00
Xiang Xiao f65e7a4097 drivers/net/lan91c111.c: Reuse lan91c111_reply for ARP case 2018-11-09 09:38:59 -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
Harri Luhtala 2d750d461b drivers/net/enc28j60.c: Adjust debug trace levels. Correct typos in some comments. 2018-09-25 07:07:04 -06:00
Gregory Nutt a7fd58c4db Squashed commit of the following:
many locations:  Change occurences of open() followed by file_detach() to file_open().  Change most non-controversion calls to open() to nx_open().

    fs/inode/fs_fileopen.c:  Flesh out file_open() with some interim, placeholder logic.

    fs/inode/fs_fileopen.c:  Add a framework for a file_open() implementation (no real logic in place yet).

    fs/vfs/fs_open.c:  Add nx_open() which is the same as open() except that it does not create a cancellation point nor does it modify the errno variable.
2018-09-15 10:49:41 -06:00
liuzhuang 8343f0f55a drivers/net/lan91c111.c: Change MAX_NETDEV_MTU to MAX_NETDEV_PKTSIZE 2018-08-28 15:24:02 -06:00
Xiang Xiao 49548da297 net/Kconfig: Uncomment the prompt of NET_SLIP_PKTSIZE 2018-08-26 14:28:35 -06:00
Xiang Xiao 3eb34186b5 drivers/net/lan91c111.c: Change loopback_out to devif_loopback 2018-08-25 10:25:35 -06:00
Gregory Nutt 9bc951a335 Rename devif_loopback_out to devi_loopback 2018-08-25 08:33:21 -06:00
Xiang Xiao 149748e4ed drivers/net: drivers/net: Add support for Microchip LAN91C111 driver 2018-08-24 11:07:07 -06:00
Xiang Xiao 0074afa0ac net/netdev: add devif_loopback_out() to check the loopback case where a packet is being sent to itself. Modify the net driver to call this function in this case. This function will simply re-inject the packet back into the network and the network driver will not put anything on the wire. 2018-08-24 09:21:33 -06:00
Dmitriy Linikov b6151ce997 drivers/net/tun.c: Fixed custom tun devname formatting. 2018-08-14 07:13:41 -06:00
Alan Carvalho de Assis 283b73edc5 Fix lots of typos in C comments and Kconfig help text 2018-07-08 18:24:45 -06:00
Gregory Nutt 22cd0d47fa This commit attempts remove some long standard confusion in naming and some actual problems that result from the naming confusion. The basic problem is the standard MTU does not include the size of the Ethernet header. For clarity, I changed the naming of most things called MTU to PKTSIZE. For example, CONFIG_NET_ETH_MTU is now CONFIG_NET_ETH_PKTSIZE.
This makes the user interface a little hostile.  People thing of an MTU of 1500 bytes, but the corresponding packet is really 1514 bytes (including the 14 byte Ethernet header).  A more friendly solution would configure the MTU (as before), but then derive the packet buffer size by adding the MAC header length.  Instead, we define the packet buffer size then derive the MTU.

The MTU is not common currency in networking.  On the wire, the only real issue is the MSS which is derived from MTU by subtracting the IP header and TCP header sizes (for the case of TCP).  Now it is derived for the PKTSIZE by subtracting the IP header, the TCP header, and the MAC header sizes.  So we should be all good and without the recurring 14 byte error in MTU's and MSS's.

Squashed commit of the following:

    Trivial update to fix some spacing issues.
    net/: Rename several macros containing _MTU to _PKTSIZE.
    net/: Rename CONFIG_NET_SLIP_MTU to CONFIG_NET_SLIP_PKTSIZE and similarly for CONFIG_NET_TUN_MTU.  These are not the MTU which does not include the size of the link layer header.  These are the full size of the packet buffer memory (minus any GUARD bytes).
    net/: Rename CONFIG_NET_6LOWPAN_MTU to CONFIG_NET_6LOWPAN_PKTSIZE and similarly for CONFIG_NET_TUN_MTU.  These are not the MTU which does not include the size of the link layer header.  These are the full size of the packet buffer memory (minus any GUARD bytes).
    net/: Rename CONFIG_NET_ETH_MTU to CONFIG_NET_ETH_PKTSIZE.  This is not the MTU which does not include the size of the link layer header.  This is the full size of the packet buffer memory (minus any GUARD bytes).
    net/: Rename the file d_mtu in the network driver structure to d_pktsize.  That value saved there is not the MTU.  The packetsize is the memory large enough to hold the maximum packet PLUS the size of the link layer header.  The MTU does not include the link layer header.
2018-07-04 14:10:40 -06:00
Gregory Nutt cb374e6e62 arch/: Clean up some naming and spacing. 2018-06-20 15:38:06 -06:00
Gregory Nutt 8fdbb1e0a4 Elimate use of the non-standard type systime_t and replace it the equivalent, standard type clock_t
Squashed commit of the following:

    sched:  Rename all use of system_t to clock_t.
    syscall:  Rename all use of system_t to clock_t.
    net:  Rename all use of system_t to clock_t.
    libs:  Rename all use of system_t to clock_t.
    fs:  Rename all use of system_t to clock_t.
    drivers:  Rename all use of system_t to clock_t.
    arch:  Rename all use of system_t to clock_t.
    include:  Remove definition of systime_t; rename all use of system_t to clock_t.
2018-06-16 12:16:13 -06:00
Gregory Nutt 548cd2892a arch/arm/src/imxrt and configs/imxrt1050-evk: Add PHY access support needed to support the network monitor. Cannot enable it yet... I am getting hardfaults when I enable the PHY interrupt. 2018-05-25 13:02:41 -06:00
Gregory Nutt fec79394f3 Some trivial, cosmetic changes from review of last PR. 2018-04-20 06:57:00 -06:00
Masayuki Ishikawa b29e7a37b2 Merged in masayuki2009/nuttx.nuttx/network_bridge (pull request #630)
drivers/net: Add TAP (network bridge) mode to tun.c

In previous implementation, TAP mode did not handle a packet
correctly. Also, the driver did not set the link layer type and
could not assign the interface name. This PR changes fix such
issues and supports TAP mode correctly.

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-04-20 12:52:49 +00:00
Gregory Nutt b54ffe858a Standardization of some function headers. 2018-03-13 09:52:27 -06:00
Sebastien Lorquet ed50b14cee drivers/net/phy_notify.c: Use phy debug macros instead of net debug macros. ninfo() and nerr() are used a bit too much, so the console output is difficult to read with network debug. 2018-03-09 07:11:07 -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
Gregory Nutt 7cf88d7dbd Make sure that labeling is used consistently in all function headers. 2018-02-01 10:00:02 -06:00
Gregory Nutt 50ca32e254 Squashed commit of the following:
sched/:  Convert legitimate uses of task_create() to nxtask_create().  Review handling of returned values from all uses of kthread_create() (as well as nxtask_create()).
    graphics/:  Review return values for all calls to kthread_start() because it no longer returns an errno.
    drivers/:  threads started by drivers should be kernel threads, not user tasks.  Review return values for all calls to kthread_start() because it no longer returns an errno.
    configs/:  threads started by board bringup logic should be kernel threads, not user tasksi (part 2 of 2).
    sched/task:  Add nxtask_create().  Kthread_create() and nxtask_create() are internal OS functions and should not modify the errno variable.  configs/:  threads started by board bringup logic should be kernel threads, not user tasks.
2018-01-31 16:11:54 -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 a8b6be4aaf The existence of the network driver ioctl() method should depend on CONFIG_NETDEV_IOCTL rather than CONFIG_NETDEV_PHY_IOCTL. The former enables the method, the later enables a subset of possible driver IOCTLs. This change should be basically a no-operation. The affected ioctl methods only support those subset of driver IOCTLs selected by CONFIG_NETDEV_PHY_IOCTL and the network logic will tolerate a nul ioctl method. 2018-01-22 08:17:45 -06:00
Masayuki Ishikawa 324008c1e5 drivers/net: Add support for telnet character mode
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2018-01-09 20:19:26 +09:00
Gregory Nutt d04f166d84 arch/arm/src/lpc54xx: Add some hooks for future 802.1q VLAN support. configs/lpcxpresso-lpc54628: Automatically bring up network in the netnsh configuration. 2018-01-02 08:49:09 -06:00
Gregory Nutt 3c65be8c1a arch/arm/src/lpc54xx: Fix a few more Ethernet issues related to buffer management and address filtering. 2018-01-01 08:54:31 -06:00
Gregory Nutt f23fb9dd14 arch/arm/src/lpc54xx: Completes basic packet transfer logic for Ethernet drivers. Still some unfinished logic for IPv6 multicast logic and for various non-mainstream configurations. But it is ready for tested. configs/lpcxpresso-lpc54628: Add a netnsh configuration that will be used to test the Ethernet driver. Untested on initial commit. 2017-12-30 12:51:57 -06:00
Gregory Nutt 6315f6468d arch/arm/src/lpc54xx: Adds basic Ethernet interrupt handling. Still missing all of the descriptor and packetk buffer handling logic. 2017-12-29 14:29:52 -06:00
Gregory Nutt 31330b2479 arch/arm/src/lpc54xx: Add a little -- very little -- Ethernet initialization logic. 2017-12-26 16:30:57 -06:00
Gregory Nutt f5c5f89592 arch/arm/src/lpc54xx: Add (incomplete) Ethernet register definition file. Add framework for an Ethernet driver. Initial commit is just the drivers/skeleton.c with naming updated for the LPC54. 2017-12-26 12:55:58 -06:00
Gregory Nutt 7deb24484c This comment converts the underlying IPC used by the UserFS from Unix domain local sockets to UDP LocalHost loopback sockets. The problem with the local sockets is that they do require operations on the top level psuedo-file system inode tree. That tree must be locked during certain traversals such as enumerate mountpoints or enumerating directory entries.
This conversion is unfortunate in the sense that Unix local domain sockets are relatively lightweight.  LocalHost UDP sockets are much heavier weight since they rely on the full UDP stack.  If anyone is up for a complete redesign, then using some shared memory and a POSIX message queue would be lightweight again.

This commit also fixes several bugs that were not testable before the inode tree deadlock.  I cannot say that the logic is 100% stable but it does not have basic functionality.

Squashed commit of the following:

    fs/userfs:  Order locking so that access to the shared I/O buffer is also locked.
    fs/userfs:  Converts to use LocalHost UDP loopback for IPC.
2017-11-05 12:25:58 -06:00
Gregory Nutt cfc5f8fbaf drivers/net: Remove the old, unfinished Crystal LAN driver. I don't even have the hardware that it goes with anymore. 2017-10-28 10:27:00 -06:00
Gregory Nutt 70c59a9d91 This commit adds support for semi-standard IPPROTO_ICMP6 sockets. This is a replacement for the non-standard ICMPv6 ping support that violated the portable POSIX OS interface.
Squashed commit of the following:

    net/icmpv6: IPPROT_ICMP6 socket logic now builds without error.
    net/icmpv6:  Add support for read-ahead and poll(). Initial commit is just cloned from ICMP with the appropriate name changes.
    configs/:  All defconfig filess that include CONFIG_NET_ICMPv6_SOCKET=y need to select CONFIG_SYSTEM_PING6=y and deselect CONFIG_DISABLE_POLL.
    Update NSH documention to show that ping6 is now a built in command.
    net/icmpv6:  Add icmpv6_sendto.c and icmpv6_recvfrom.c.  Initial versions are just clones from icmp/ with appropriate name changes.
    net/icmpv6:  Clone some ICMP socket logic as the beginning of support for ICMPv6 socket support.
    Rename CONFIG_NET_ICMPv6_PING to CONFIG_NET_ICMPv6_SOCKET.  Move prototype for icmpv6_ping from include/nuttx/net/icmpv6 to net/icmpv6/icmpv6.h
2017-10-24 11:23:08 -06:00
Gregory Nutt 4810499d3a Squashed commit of the following:
Replace all calls to sigqueue() in the OS proper with calls to nxsig_queue() to avoid accessing the errno variable.

    sched/signal:  Add nxsig_queue() which is functionally equivalent to sigqueue() except that it does not modify the errno variable.
2017-10-07 10:57:09 -06:00
Gregory Nutt 9e25d89223 Squashed commit of the following:
Replace all usage kill() in the OS proper with nxsig_kill().

    sched/signal:  Add nxsig_kill() which is functionally equivalent to kill() except that it does not modify the errno variable.
2017-10-07 08:22:18 -06:00
Gregory Nutt 3b67c06711 net/Kconfig: Remove to improper use of comma in syntax 2017-10-06 15:14:09 -06:00
Gregory Nutt 936df1bcb5 Adds new OS internal functions nxsig_sleep() and nxsig_usleep. These differ from the standard sleep() and usleep() in that (1) they don't cause cancellation points, and (2) don't set the errno variable (if applicable). All calls to sleep() and usleep() changed to calls to nxsig_sleep() and nxsig_usleep().
Squashed commit of the following:

    Change all calls to usleep() in the OS proper to calls to nxsig_usleep()

    sched/signal:  Add a new OS internal function nxsig_usleep() that is functionally equivalent to usleep() but does not cause a cancellaption point and does not modify the errno variable.

    sched/signal:  Add a new OS internal function nxsig_sleep() that is functionally equivalent to sleep() but does not cause a cancellaption point.
2017-10-06 10:15:01 -06:00
Gregory Nutt 9568600ab1 Squashed commit of the following:
This commit backs out most of commit b4747286b1.  That change was added because sem_wait() would sometimes cause cancellation points inappropriated.  But with these recent changes, nxsem_wait() is used instead and it is not a cancellation point.

    In the OS, all calls to sem_wait() changed to nxsem_wait().  nxsem_wait() does not return errors via errno so each place where nxsem_wait() is now called must not examine the errno variable.

    In all OS functions (not libraries), change sem_wait() to nxsem_wait().  This will prevent the OS from creating bogus cancellation points and from modifying the per-task errno variable.

    sched/semaphore:  Add the function nxsem_wait().  This is a new internal OS interface.  It is functionally equivalent to sem_wait() except that (1) it is not a cancellation point, and (2) it does not set the per-thread errno value on return.
2017-10-04 15:22:27 -06:00
Gregory Nutt 42a0796615 Squashed commit of the following:
sched/semaphore:  Add nxsem_post() which is identical to sem_post() except that it never modifies the errno variable.  Changed all references to sem_post in the OS to nxsem_post().

    sched/semaphore:  Add nxsem_destroy() which is identical to sem_destroy() except that it never modifies the errno variable.  Changed all references to sem_destroy() in the OS to nxsem_destroy().

    libc/semaphore and sched/semaphore:  Add nxsem_getprotocol() and nxsem_setprotocola which are identical to sem_getprotocol() and set_setprotocol() except that they never modifies the errno variable.  Changed all references to sem_setprotocol in the OS to nxsem_setprotocol().  sem_getprotocol() was not used in the OS
2017-10-03 15:35:24 -06:00
Gregory Nutt 83cdb0c552 Squashed commit of the following:
libc/semaphore:  Add nxsem_getvalue() which is identical to sem_getvalue() except that it never modifies the errno variable.  Changed all references to sem_getvalue in the OS to nxsem_getvalue().

    sched/semaphore:  Rename all internal private functions from sem_xyz to nxsem_xyz.  The sem_ prefix is (will be) reserved only for the application semaphore interfaces.

    libc/semaphore:  Add nxsem_init() which is identical to sem_init() except that it never modifies the errno variable.  Changed all references to sem_init in the OS to nxsem_init().

    sched/semaphore:  Rename sem_tickwait() to nxsem_tickwait() so that it is clear this is an internal OS function.

    sched/semaphoate:  Rename sem_reset() to nxsem_reset() so that it is clear this is an internal OS function.
2017-10-03 12:52:31 -06:00
Gregory Nutt 44736b721c net/sockets: psock_send() is an internal OS interface an should not set the errno variable. 2017-09-29 17:48:15 -06:00
Gregory Nutt ae2a1d07b3 Networking: drivers/net/loopback.c: Eliminate a warning. net/netdev/netdev_ifconfig.c: Was not returning all of the address info. 2017-09-19 15:00:46 -06:00
Gregory Nutt 67befb9642 ENC28J60: Update interface to use newer parameter passing to interrupt handlers 2017-08-21 16:49:43 -06:00
Gregory Nutt 241c1433ef ENCX24J600: Fix some warnings. Update interface to use newer parameter passing to interrupt handlers 2017-08-21 16:23:22 -06:00
Gregory Nutt 969d7c5814 Networking: Remove driver based backlog support. This affects the entire network, but is used by only one driver. The only supported with of supported RX backlog is via common read-ahead buffering. 2017-08-21 06:28:59 -06:00
Gregory Nutt 30c51a49a5 drivers/net/tun.c: Currently cannot support TAP mode unless Ethenet is enabled 2017-08-20 12:01:38 -06:00
Gregory Nutt 1334ab3d2a IP forward: Correct some compile issues due to recent changes. 2017-08-20 11:46:43 -06:00
Gregory Nutt 7bb8943a9c Fix IPv6 loopback driver that depended on the removed g_ipv6_allonesaddr. Noted by Masayuki Ishikawa 2017-08-09 06:59:55 -06:00
Gregory Nutt aeb59383cf Remove CONFIG_NET_MULTILINK. This increases code size by a little, but greatly reduces the complexity of the network code. 2017-08-08 15:26:09 -06:00
Gregory Nutt bd7c84b23e Remove CONFIG_NETDEV_MULTINIC. This increases code size by a little, but greatly reduces the complexity of the network code. 2017-08-08 14:24:12 -06:00
Gregory Nutt 6bd744c4b3 Fix some minor issues in drivers/net/skeleton.c 2017-07-24 15:38:13 -06:00
Gregory Nutt 975473fed8 ICMPv6: Add 6LoWPAN and IP forwarding support. 2017-07-09 11:35:26 -06:00
Gregory Nutt 99ef7c6669 IP forwarding: A few fixes from early testing; In TUN driver, do all polling on worker thread. Otherwise, the stack gets very deep. 2017-07-07 17:33:44 -06:00
Gregory Nutt b29c99fa6f Move TUN ioctl commnd to include/nuttx/net/ioctl.h so that it will always be unique. It a error in netdev_register: it was not handling device names properly when TUN is the only network device. 2017-07-07 13:03:04 -06:00
Masayuki Ishikawa 32a8d09901 drivers/net/tun.c: Use critical section instead of semaphore in tun_ifdown() 2017-06-23 14:28:53 +09:00
Gregory Nutt e9a5477506 Add an instance argument to the SPIDEV definitions. 2017-04-29 12:26:52 -06:00
Gregory Nutt 79256573e1 net: network drver now retains Ethernet MAC address in a union so that other link layer addresses may be used in a MULTILINK environment. 2017-04-22 11:10:30 -06:00
Gregory Nutt d5207efb5a Be consistent... Use Name: consistent in function headers vs Function: 2017-04-21 16:33:14 -06:00
Gregory Nutt 78bc1aa6bc Argument of network device IOCTL should be unsigned long, just as will all other IOCTL methods. 2017-04-15 09:33:27 -06:00
Gregory Nutt 55c95442e1 drivers/net/skeleton.c: Add support for IOCTL handling. 2017-04-13 09:53:38 -06:00
Gregory Nutt ad9321b7b7 Trivial changes from review of last PR 2017-04-13 06:16:03 -06:00
Thomas Keh 7e293b28ee TUN driver: Implement TAP (OSI layer 2) mode.
Enable by setting the IFF_TAP flag instead of the IFF_TUN flag in ifr_flags.
2017-04-13 13:07:03 +02:00
Gregory Nutt a1aca89d61 drivers/net/skeleton.c: Use more common 'Name:' vs. 'Function:' 2017-04-08 13:55:23 -06:00
Gregory Nutt 8b8ddd05c2 Fix some old-style interrupt handling logic in drivers/net/skeleton.c 2017-04-08 13:30:30 -06:00
Gregory Nutt 52ead055fd 6loWPAN: Beginning of IEEE802.15.4 frame input logic. 2017-04-01 09:07:49 -06:00
Gregory Nutt c976a66f8d net/drivers/skeleton.c: Back out serialization changes of the last commit. They are not necessary in the skeleton.c example because the calls to net_lock() at the beginning of each worker function will enforce serialization. 2017-03-04 11:33:36 -06:00
Gregory Nutt e2eb5f1ae0 drivers/net: Add framework for serialization in the case where multiple low-priority work queues are used. 2017-03-04 09:45:09 -06:00
Gregory Nutt a8363528dc net/phy_notify.c: Call to arch_phy_irq() missing new interrupt argument parameter. 2017-03-03 16:08:21 -06:00
Gregory Nutt 86239d4a73 Experimental change to STM32 Ethernet driver a success. Porting change to all other Ethernet drivers. 2017-03-03 14:45:09 -06:00
Gregory Nutt f5f9d82d5a arch_phy_irq: Now returns int instead of xcpt_t oldhandler. The oldhandler is useless after the changes to the interrupt argument. Also access an argument for the PHY interrupt. phy_notify.c driver changed to exploit new interrupt argument passing. 2017-03-02 08:43:33 -06:00
Maciej Wójcik 4a8aa6ae95 typos 2017-03-01 12:56:15 +01:00
Gregory Nutt 704df7bd39 IRQ arguments: Fix errors discovered in build testing 2017-02-27 19:28:24 -06:00
Gregory Nutt b4ff7391f8 Convert more drivers to use use irq_attach with argument. 2017-02-27 10:44:13 -06:00
Mark Schulte b3222bbc8a irq_dispatch: Add argument pointer to irq_dispatch
Provide a user defined callback context for irq's, such that when
registering a callback users can provide a pointer that will get
passed back when the isr is called.
2017-02-27 06:27:56 -06:00
Gregory Nutt 8ee2e8d8b0 Most Ethernet drviers: Check if the poll timer is running before restarting it at the end of each TX. 2017-02-24 15:58:17 -06:00
Gregory Nutt 7467329a98 Eliminate CONFIG_NO_NOINTS. Lots of files changed -> lots of testing needed. 2016-12-03 16:28:19 -06:00
Gregory Nutt ad3897531f C5471 Ethernet now supports CONFIG_NET_NOINTS 2016-12-03 12:17:55 -06:00
Gregory Nutt 43459fe75e DM09x0 Ethernet now supports CONFIG_NET_NOINTS 2016-12-03 11:42:15 -06:00
Gregory Nutt eba1e076ec PIC32MX/Z Ethernet: Now supports CONFIG_NET_NOINT 2016-12-03 09:50:14 -06:00
Gregory Nutt bfa1da14e2 LM3S Ethernet now supports CONFIG_NET_NOINTS 2016-12-03 08:32:49 -06:00
Gregory Nutt c0cbea2550 Remove RGMP and RGMP drivers. 2016-12-02 09:49:33 -06:00
Gregory Nutt 96be43b270 drivers/net/: Adapt all Ethernet drivers to work as though CONFIG_NET_MULTIBUFFER were set. Remove all references to CONFIG_NET_MULTIBUFFER 2016-11-29 16:44:23 -06:00
Gregory Nutt 0804286ad3 arch/: Add option to use low-priority work queue to all Ethernet drivers in arch that support CONFIG_NET_NOINTS. 2016-11-19 09:20:01 -06:00
Gregory Nutt 936b55f608 drivers/net: Add option to use low-priority work queue to all drivers in drivers/net. Not yet added to all architecture-specific network drivers. 2016-11-18 09:22:49 -06:00
Gregory Nutt 52560bba37 ENC28J60: Allow either HP or LP work queue to be used. 2016-11-18 08:41:27 -06:00
Gregory Nutt 4fcbe8e410 drivers: Disable priority inheritance on all semaphores used for signaling 2016-11-03 11:00:47 -06:00
Gregory Nutt de6db52b52 Oops... Last commit had some garbage in the file 2016-10-24 15:36:11 -06:00
Gregory Nutt 3d4ce55ebd Oops.. a couple of hunks failed in the last patch. Hope I got them fixed correctly. 2016-10-24 15:25:40 -06:00
Max Nekludov 146d7e7921 drivers/net/tun.c: Fix bug in TUN interface driver 2016-10-24 15:17:01 -06:00
Gregory Nutt 2da3da7fd6 Costmetic changes from review of last commit 2016-09-25 17:24:39 -06:00
Gregory Nutt 0908a6c6b9 Fix calculations using MSEC_PER_TICK. If USEC_PER_TICK is less than 1000, then MSEC_PER_TICK will be zero. It will be inaccurate in any case. 2016-09-25 08:17:33 -06:00
Gregory Nutt 2a751068e6 Without lowsyslog() *llerr() is not useful. Eliminate and replace with *err(). 2016-06-20 12:44:38 -06:00
Gregory Nutt 43eb04bb8f Without lowsyslog() *llinfo() is not useful. Eliminate and replace with *info(). 2016-06-20 11:59:15 -06:00
Gregory Nutt d40a473f72 Without lowsyslog() *llwarn() is not useful. Eliminate and replace with *warn(). 2016-06-20 09:37:08 -06:00
Gregory Nutt 2b445ddccc Remove lowsyslog(). The new syslog() includes all of the functionality of lowsyslog(). No longer any need for two interfaces. 2016-06-20 08:57:08 -06:00
Gregory Nutt 0c8c7fecf0 Add _ to the beginning of all debug macros to avoid name collisions 2016-06-16 12:33:32 -06:00
Gregory Nutt efb02f2ef1 drivers/: Change some nerr() ERRORS to nwarn() WARNINGS. Anomolous network evernts are not errors. 2016-06-12 08:31:22 -06:00
Gregory Nutt a1469a3e95 Add CONFIG_DEBUG_ERROR. Change names of *dbg() * *err() 2016-06-11 15:50:49 -06:00
Gregory Nutt e99301d7c2 Rename *lldbg to *llerr 2016-06-11 14:55:27 -06:00
Gregory Nutt 86b79b33cf Reserver the name 'err' for other purposes 2016-06-11 14:40:07 -06:00
Gregory Nutt 1cdc746726 Rename CONFIG_DEBUG to CONFIG_DEBUG_FEATURES 2016-06-11 14:14:08 -06:00
Gregory Nutt fc3540cffe Replace all occurrences of vdbg with vinfo 2016-06-11 11:59:51 -06:00
Gregory Nutt 3a74a438d9 Rename CONFIG_DEBUG_VERBOSE to CONFIG_DEBUG_INFO 2016-06-11 11:50:18 -06:00
Gregory Nutt 44353f320c Replace confusing references to uIP with just 'the network' 2016-05-30 09:37:34 -06:00
Gregory Nutt 2244ed46bc nuttx/drivers: Replace irqsave() with enter_critical_section(); replace irqrestore() with leave_critical_section() 2016-02-14 07:32:58 -06:00
Gregory Nutt 216eea4543 Net: Fix some errors introduced into the ENC28J60 driver; fix type of wd_start arguments. 2016-02-04 08:55:10 -06:00
Gregory Nutt dea24c503a Networking: Remove the HSEC argument from devif_timer. 2016-02-03 12:12:41 -06:00
Gregory Nutt ff1e057364 Missed one EMAC driver in the last commit 2016-02-03 10:55:51 -06:00
Gregory Nutt 42c365aab1 Duplicate Manuel's EMAC driver fix to every other driver that supports CONFIG_NET_NOINTS 2016-02-03 10:34:10 -06:00
Gregory Nutt 564a1ce606 Cosmetic clean-up of comments 2016-01-24 08:21:55 -06:00
Gregory Nutt 7ee6c5bcfc Minor clean-up for last big commit 2016-01-23 19:18:55 -06:00
Gregory Nutt 7edf921c5e Remove CONFIG_SPI_OWNBUS: Now it is not just a good idea, it is the law 2016-01-23 18:54:36 -06:00
Gregory Nutt f6e49caba8 All SPI-based device drivers needs to call SPI_HWFEATURES() with zero in order to co-exist with drivers that use H/W features 2016-01-23 16:18:13 -06:00
Gregory Nutt f348e68069 Update to use 64-bit timer when available 2016-01-21 11:54:26 -06:00
Gregory Nutt 51ee01255b ENC28J60: Missing semicolon causes error in some configurations. Noted by Maciej Wójcik 2016-01-09 19:56:47 -06:00
Vladimir Komendantskiy ae71c9b447 Fix a compile time error in drivers/net/tun.c. 2016-01-05 10:58:58 -06:00
Gregory Nutt 8fdb173090 drivers/net/telnet.c: Now works like the loop device. A new interface called telnet_initialize() registers a telnet session "factory" device at /dev/telnet. Via ioctl, the factory device can create instances of the telnet character devices at /dev/telnetN to support Telnet sessions. 2015-12-07 13:48:06 -06:00
Gregory Nutt 057b6aef2c drivers/net: Move the Telnet driver from apps/netutils/netnetd to drivers/net 2015-12-07 09:26:57 -06:00
Gregory Nutt c16648b3fd Most cosmetic but also includes a fix for a compile problem from Ken Pettit 2015-12-01 12:54:57 -06:00
Gregory Nutt 2a93c66948 include/nuttx/net/netdev.h and several Ethernet drivers in arch/: Most network drivers to not support statistics. Those that do only support them when DEBUG is enabled. Each driver collects an architecture specific set of statistics and there is no mechanism in place to view those statistics. Thus, the driver feature was mostly useless. This change standardizes the driver statistics and puts the definition in the common network device structure defined in netdev.h where they can be accessed by network applications. All Ethernet drivers that collect statistics have been adapted to use these common statistics. 2015-11-26 12:08:09 -06:00
Gregory Nutt 796d52b3e1 Fix a typo introduced with last commits 2015-10-10 12:24:31 -06:00
Gregory Nutt cf14f8d1b5 drivers/: Fixes to spacing and alignement 2015-10-10 10:41:00 -06:00
Gregory Nutt af086c40ff Remove dangling whitespace 2015-10-04 15:28:54 -06:00
Gregory Nutt 0b12dbf95d Fix some spacing problems 2015-10-04 15:04:00 -06:00
Paul A. Patience 3b89eabd50 Correct #if to #ifdef when the macro can be undefined. Fix bug in AT24XX driver: it should compare AT24XX_ADDRSIZE to 2. 2015-09-01 13:52:29 -04:00