Commit Graph

40 Commits

Author SHA1 Message Date
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
Anthony Merlino
cb62580216 Merged in antmerlino/nuttx/mac802154dev-header-offset (pull request #538)
Pass header-payload offset to application for use when the MAC layer is in promiscuous mode

* mac802154_device: When in promiscuous mode, the char driver sends the entire frame, including the MAC header.  This change adds an offset field indicating the header-payload boundary. It is set to 0 when not in promiscuous mode as the header is not passed to the application

* mac802154: Adds support for getting promiscuous mode state

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-11-22 18:22:35 +00:00
Anthony Merlino
14fb37c995 Merged in antmerlino/nuttx/sixlowpan-mac802154 (pull request #526)
ieee802154: Simplifies notify() and rxframe() calls to a single notify() call. dataind's and all other "notifs" are now "primitives" which aligns with standard terminology

* mac802154: Adds missing breaks from case statement

* sixlowpan: Fixes bad logic where ACK is not requested if address is not a broadcast

* ieee802154: Simplification of "notifs" and "datainds" to generic primitives passed via a single notify call to the layer above the MAC

* Directories.mk should reference CONFIG_WIRELESS instead of CONFIG_DRIVERS_WIRELESS

* xbee_netdev: Network must be locked when calling sixlowpan_input

* sixlowpan: Reassembly buffer can't be freed if provided by radio driver

* sixlowpan: Don't free IOB if there is an error processing it as the MAC will try to pass it along to another receiver

* ieee802154: Adds basic logging to ieee802154_primitive.c

* Minor fixes after rebase

* xbee: Adds AT query timeout to retry if XBee doesn't respond to request

* same70-xplained: Adds Xbee support. Makes mikroBus slot Kconfig 'choice'

* mac802154: Removes unused function declaration

* drivers/mrf24j40: Fixes compilation error using . operator rather than -> operator

* mac802154_device: Changes a few mac802154_primtive_free's to ieee802154_primitive_free() and changes notif to primitive in a couple places.

* mac802154: Adds promiscous mode logic to bypass parsing of incoming frames. MAC char device also checks for promiscous mode and passes whole frames including header and FCS to the application if promiscous mode is enabled.

* sixlowpan: Fixes logic to correctly check if packet is large enough to include header.  This would cause packets to be considered too small when they are sufficiently sized.

* sixlowpan: Fixes forwarding logic to use forwarding device rather than received device to look up destination link layer address

* net/ipforward: Fixes typo that caused build error when IP forwarding was enabled with CONFIG_NET_ICMPv6_NEIGHBOR enabled as well.

* configs/same70-xplained: Simple spelling fix

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-11-01 20:15:21 +00: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
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
Anthony Merlino
9af6b7cdae Squashed commit of the following:
Merged in merlin17/nuttx/mac802154-sock (pull request #479)

    wireless/ieee802154: Adds support for receiving MAC events via IOCTL through socket interface. Other small fixes and cleanup

    * ioctl: Cleans up MAC802154IOC values
    * wireless/ieee802154: Cleans up MAC802154IOC_NOTIFY_REGISTER logic in character driver
    * wireless/ieee802154/mac802154_netdev:  Adds support for MAC event notification via IOCTL
    * wireless/ieee802154/mac802154: Changes reset logic. No longer reset extended address.
    * wireless/ieee802154: Cleans up MAC802154IOC logic

        Moves MAC802154IOC from ieee802154_ioctl.h and renames ieee802154_ioctl.h to ieee802154_device.h since it only contains types relevant to the MAC char device now.

    * wireless/ieee802154/mac802154_device: Cleans up IOCTL logic for recent changes.
    * drivers/wireless/ieee802154/mrf24j40: Adds missing break in case statement
    * wireless/ieee802154/mac802154_netdev: Starts adding support for passing MAC events via IOCTL
    * wireless/ieee802154/mac802154: Fixes issue with receiver enable logic
    * wireless/ieee802154/mac802154: Fixes issue where extended address is cleared and not rewritten after radio reset
    * configs/clicker2-stm32/mrf24j40-mac: Enables RAMLOG and wireless driver logging
    * wireless/ieee802154/mac802154: Fixes poll logic meant to automatically choose address mode based on short address range.

    Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-09-15 08:04:38 -06:00
Gregory Nutt
2d4ba3ee3f IEEE 802.15.4 MAC: Add list management and prioritization logic that will permit the MAC layer to support bound multiple clients. 2017-06-18 11:00:47 -06:00
Gregory Nutt
77757410c8 Remove dangling white space at the end of lines. 2017-06-15 10:46:48 -06:00
Anthony Merlino
e30501ebd4 wireless/ieee802154: Lots of fixes, cleanup, new functionality. Functional 2017-06-15 12:11:52 -04:00
Anthony Merlino
908d438047 WIP: wireless/ieee802154: More work on association/beacon-enabled networks 2017-06-14 02:49:32 -04:00
Anthony Merlino
06634afbe0 wireless/ieee802154: Restructuring of MAC notifications. Simplifes some interfaces 2017-05-15 21:44:57 -04:00
Anthony Merlino
806dcd9a47 wireless/ieee802154: Brings closer to Nuttx coding style 2017-05-09 17:20:57 -04:00
Gregory Nutt
2043e1a114 IOBs: Move from driver/iob to a better location in mm/iob 2017-05-09 07:35:30 -06:00
Anthony Merlino
bbb85332fd wireless/ieee802154: Finishes MAC char driver read functionality 2017-05-08 16:23:13 -04:00
Anthony Merlino
b87fac776f wireless/ieee802154: Removes msdu_length from meta-data since it is intrinsically in the IOB 2017-05-05 12:44:34 -04:00
Anthony Merlino
ba32b65813 wireless/ieee802154: Simplifies some primitive prototypes 2017-05-03 13:26:15 -04:00
Anthony Merlino
653a0217f2 wireless/ieee802154: Finishes some IOCTL logic for MAC layer 2017-05-03 10:52:25 -04:00
Gregory Nutt
2ece0c57dd Remove dangling whitespace at the end of lines 2017-05-02 14:42:40 -06:00
Anthony Merlino
f02d98d15e wireless/ieee802154: Changes transmit data path to use IOBs and exposes function for getting size of MAC header 2017-05-02 09:58:54 -04:00
Anthony Merlino
c4007a111c wireless/ieee802154: Fixes semaphore logic and list logic 2017-05-01 09:27:44 -04:00
Anthony Merlino
b1ff257215 wireless/ieee802154: Minor fixes to account for moved IOCTL definitions 2017-05-01 09:27:44 -04:00
Anthony Merlino
9e760dcf6a wireless/ieee802154: Lots of little fixes and changes to get everything to build 2017-04-26 11:36:06 -04:00
Gregory Nutt
b2292cd2cb Some trivial spacing changes from review of last PR; Remove some dangling whitespace at the end of lines. 2017-04-21 13:21:43 -06:00
Anthony Merlino
3950541136 wireless/ieee802154: Renames mac802154_devwrapper_s to mac802154_chardevice_s 2017-04-19 13:26:44 -04:00
Anthony Merlino
de4e2d84c4 wireless/ieee802154: Simplifies MAC callback interface. Adds missing data type definitions 2017-04-19 11:30:43 -04:00
Anthony Merlino
9ad3b375e5 wireless/ieee802154: Lots of small fixes to eliminate build issues.
Generally cleans things up and fixes lots of small issues preventing a successful build.  Does not completely build, but there are significantly less errors
2017-04-18 15:34:28 -04:00
Gregory Nutt
8786770d7d Costmetic change from review of last PR 2017-04-15 15:59:00 -06:00
Anthony Merlino
5c32abb442 wireless/ieee802154: Adds ability to receive notifications from MAC char driver 2017-04-15 12:00:43 -04:00
Gregory Nutt
a8706d8afa wireless/ieee802154: Correct a few more compile issues. 2017-04-14 13:58:25 -06:00
Gregory Nutt
0c4ff5e60b wireless/ieee802154: Add radio IOCTL helpers 2017-04-14 12:59:49 -06:00
Gregory Nutt
fba8c96540 ieee802.15.4: New global functions exported by the lower MAC layer should be private to the MAC module. Function prototypes moved from include/nuttx/wireless/ieee802154/ieee802154_mac.h to wireless/ieee802154/mac802154.h 2017-04-14 11:24:40 -06:00
Gregory Nutt
badd36170d IEEE802.15.4: There is only one instance of the IEEE802.15.4 MAC lower level. There is no need for the interface to be indirect via a vtable. In this case, standard global functions should be used. 2017-04-14 10:38:46 -06:00
Gregory Nutt
c1ddae5c5e ieee802.15.4: de-couple MAC driver interface. Now works more like other drivers. 2017-04-13 12:17:36 -06:00
Gregory Nutt
9893b7243b Trivial changes from review of last PR. 2017-04-05 13:28:35 -06:00
Anthony Merlino
2ecca492ad wireless/ieee802154: WIP for MAC char driver write functionality 2017-04-05 15:07:58 -04:00
Gregory Nutt
68f2709078 Review from last PR 2017-03-29 11:03:10 -06:00
Anthony Merlino
8df78cc74b wireless/ieee802154: Adds MAC character driver structure. Nonfunctional 2017-03-29 12:51:01 -04:00