Commit Graph

316 Commits

Author SHA1 Message Date
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