Commit Graph

333 Commits

Author SHA1 Message Date
Gregory Nutt
faf8bdcbf8 Eliminate some new warnings found in build testing 2019-08-19 17:50:04 -06:00
Anthony Merlino
66d66b0616 Merged in antmerlino/nuttx/mac802154-assoc-lpwork (pull request #1004)
mac802154: Defers handling of extracting association response to LPWORK queue.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-19 15:17:01 +00:00
Anthony Merlino
70404ed0dc Merged in antmerlino/nuttx/iobinstrumentation (pull request #1001)
Iobinstrumentation

* mm/iob: Introduces producer/consumer id to every iob call. This is so that the calls can be instrumented to monitor the IOB resources.

* iob instrumentation - Merges producer/consumer enumeration for simpler IOB user.

* fs/procfs: Starts adding support for /proc/iobinfo

* fs/procfs: Finishes first pass of simple IOB user stastics and /proc/iobinfo entry

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-16 22:42:25 +00:00
Anthony Merlino
29ab94198c Merged in antmerlino/nuttx/mac802154_fixes (pull request #998)
Mac802154 fixes

* mac802154: Frame Version should have been 1, but was being set to 3 when payload exceeds version 0 capabilities.

* mac802154: Corrects function reference in warning print-out

* mac802154/sixlowpan: Adds warning to build to indicate what is noted in the menu for CONFIG_MAC802154_NTXDESC

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-16 01:28:26 +00:00
Anthony Merlino
fc1780d63e Merged in antmerlino/nuttx/sixlowpan-removeconversions (pull request #997)
ieee802154/sixlowpan: Removes unnecessary conversions that were happening due to a misunderstanding of byte ordering with EUI-64

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-16 01:26:44 +00:00
Anthony Merlino
6f4c9678af Merged in antmerlino/nuttx/mac_txdesc_ackreq_fix (pull request #986)
mac802154: Fixes issue where the txdesc's ackreq flag was not being set, despite the frame containing a Frame Control field with ACKREQ bit set.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-10 18:27:49 +00:00
Anthony Merlino
a8e1620f3c Merged in antmerlino/nuttx/mac802154_fix_eaddr (pull request #985)
mac802154: Fixes issues with extended address. 1) Extended address should be read-only. 2) Extended address should be placed in frame in "reverse-canonical" order.

The extended address is a read-only attribute and thus an attempt to write the extended address should be denied. Instead, the extended address should really be either set by the PHY/radio itself, or provided at board bring-up time to the radio layer. The MAC layer now pulls in the extended address from the radio any time the MAC is reset.

The extended address is also supposed to be sent in the frame in reverse-canonical order. This is very confusing in the standard and it wasn't until I realized it was backwards in Wireshark that I researched this further. Searching online I find documents from the committee for suggestions/feedback on the future standard. It isn't in the 2015 standard but a newer version of the standard will presumably clarify this. It says that the extended address should be written in reverse-canonical form, meaning the OUI comes last, not first inside the frame.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-10 18:25:13 +00:00
Anthony Merlino
535db0140a Merged in antmerlino/nuttx/wirelessnetdev (pull request #984)
wireless network devices: Attach radio to d_buf before registering device to handle forwarding case.

When CONFIG_NET_IPFORWARD is enabled, and CONFIG_NET_6LOWPAN is being used, a packet that attempts to get forwarded on the 6LoWPAN interface will require that the radio's buffer be attached to d_buf. Otherwise the below exception will be hit.

~line 542 of sixlowpan_framelist.c

```
      /* Recover the reassembly buffer from the driver d_buf. */

      reass = (FAR struct sixlowpan_reassbuf_s *)radio->r_dev.d_buf;
      DEBUGASSERT(reass != NULL);
```

The underlying "radio" in this case is the mac802154_netdev.

This behavior has probably not been observed because the buffer is normally attached in the periodic txpoll worker. However, in my case, the 6LoWPAN interace was not UP yet, and therefore the worker hadn't run yet.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-10 18:22:39 +00:00
Anthony Merlino
6bbc30c5fd Merged in antmerlino/nuttx/mac802154_fcslen (pull request #983)
ieee802154: Support dynamic FCS length. Adds IEEE802154_ATTR_PHY_FCSLEN.

This change introduces IEEE802154_ATTR_PHY_FCSLEN which the radio layer can support to set/get the FCS length that's added to the end of the frame. One use case, in promiscuous mode, is to add back in the FCS of the received frame by increasing the iob->io_len by the FCS length.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-10 18:05:07 +00:00
Anthony Merlino
4f696dc9cd Merged in antmerlino/nuttx/multi-macnet (pull request #979)
mac802154: Moves iobuffer into macnet struct so that more than one macnet dev can exist.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-10 17:51:05 +00:00
Anthony Merlino
cc6dee64c0 Merged in antmerlino/nuttx/mac_attributes (pull request #978)
Mac attributes

* wirelesss/ieee802154/mac802154: Makes comment more clear that it's related to an outbound frame, not an incoming frame.

* wireless/ieee802154: Adds support for getting/setting macMaxFrameRetries via IOCTL

* wireless/.ieee802154/mac802154: Add get support for rxonidle attribute

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-10 17:04:08 +00:00
Anthony Merlino
90317a9eeb Merged in antmerlino/nuttx/ieee802154_energydetect (pull request #977)
wireless/ieee8021254: Adds support for energy detect.

Adds support for energy detect by introducing a new radio call/callback, as the PHY layer is required to perform the energy detect.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-10 17:03:24 +00:00
Anthony Merlino
70186874e3 Merged in antmerlino/nuttx/macnetdev (pull request #976)
mac802154_netdev: Allow 64-bit prefix to be configurable when auto-configuring the IPv6 address during bring-up.

Previously, the link-local prefix fe80::/64 was used. Also, put the network in the DOWN state at the end of initialization.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-10 17:02:26 +00: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
Gregory Nutt
abf6965c24 Squashed commit of the following:
libs/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    syscall/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    wireless/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    Documentation/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    include/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    drivers/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    sched/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    configs:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    arch/xtensa:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    arch/z80:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    arch/x86:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    arch/renesas and arch/risc-v:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    arch/or1k:  Remove all references to CONFIG_DISABLE_SIGNALS.  Signals are always enabled.
    arch/misoc:  Remove all references to CONFIG_DISABLE_SIGNALS.  Signals are always enabled.
    arch/mips:  Remove all references to CONFIG_DISABLE_SIGNALS.  Signals are always enabled.
    arch/avr:  Remove all references to CONFIG_DISABLE_SIGNALS.  Signals are always enabled.
    arch/arm:  Remove all references to CONFIG_DISABLE_SIGNALS.  Signals are always enabled.
2019-04-29 14:52:05 -06:00
Gregory Nutt
dc8c814ca3 Squashed commit of the following:
Fixed coding standard error in several files.  Use of while( is incorrect; a space is required between while and (.  Also ran tools/nxstyle and fix thoses complaints as well in most files.

    Changes to comply with coding standard.  Mostly focused on files with missing space after keyword in if(, switch(, and for(.  Offending files also got changes to comply with tools nxstyle.  If there were logs of nxstyle complaints, the file also got a taste of tools/indent.sh.  Still need to fix occurrences of while( with missing space.  There are a lot of them.
2019-02-27 08:41:08 -06:00
Michał Łyszczek
626afb015b nuttx/sched/mqueue: Change 'int prio' to 'unsigned int prio'. According to open group specification, priority field in mq_* functions should have unsigned type: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/mqueue.h.html 2019-02-15 19:18:55 -06:00
Xiang Xiao
fb63c0a293 sched/signal and related changes to other OS subsystems. 2019-01-27 09:28:59 -06:00
Xiang Xiao
5e8ae23edc drivers/timers/oneshot.c: Support signal notification through SIGEV_THREAD
drivers/timers/rtc.c:  Support signal notification through SIGEV_THREAD
drivers/input/ajoystick.c:  Support signal notification through SIGEV_THREAD
drivers/input/djoystick.c:  Support signal notification through SIGEV_THREAD
drivers/input/button_upper.c:  Support signal notification through SIGEV_THREAD
drivers/sensors/zerocross.c: Support signal notification through SIGEV_THREAD
drivers/wireless/ieee802154:  Support signal notification through SIGEV_THREAD
drivers/lcd/ft80x.c: Support signal notification through SIGEV_THREAD
2019-01-27 08:53:12 -06:00
Anthony Merlino
33a4ec969a Merged in antmerlino/nuttx/avoid-double-context-lookup (pull request #788)
sixlowpan: Address comment regarding avoiding double lookup of address context.

Approved-by: GregoryN <gnutt@nuttx.org>
2018-12-19 18:41:27 +00:00
Anthony Merlino
c897790e55 Merged in antmerlino/nuttx/sixlowpan-ieee802154-address-endianness (pull request #790)
sixlowpan/ieee802154: IEEE802.15.4 stores and uses addresses in little endian order.

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

Approved-by: GregoryN <gnutt@nuttx.org>
2018-12-18 15:06:41 +00:00
Anthony Merlino
b48a62a7d4 Merged in antmerlino/nuttx/sixlowpan-ul-bit (pull request #787)
sixlowpan: Fixes logic surrounding the Universal/Local bit. This bit represents whether the IID is locally/globally administered. The U/L bit is bit 1 of the MSB of the EUI-64. It should only be inverted in cases where there is a full EUI-64. In cases whe

* sixlowpan: Fixes logic surrounding the Universal/Local bit. This bit represents whether the IID is locally/globally administered. The U/L bit is bit 1 of the MSB of the EUI-64. It should only be inverted in cases where there is a full EUI-64. In cases where the IID is derived from say, a short address, this bit should be forced to 0, indicating that it is locally administered.

    See:

    https://tools.ietf.org/html/rfc4291#section-2.5.1
    https://tools.ietf.org/html/rfc4944#section-6
    https://tools.ietf.org/html/rfc2464#section-4

* sixlowpan: Account for endianness with U/L bit.

Approved-by: GregoryN <gnutt@nuttx.org>
2018-12-18 13:34:41 +00:00
Anthony Merlino
52aae032f7 Merged in antmerlino/nuttx/remove-ipv6-checks (pull request #785)
Fixes usage of CONFIG_BIG_ENDIAN; should be CONFIG_ENDIAN_BIG

Approved-by: GregoryN <gnutt@nuttx.org>
2018-12-16 20:35:15 +00:00
Lwazi Dube
701c8abbbb wireless/bluetooth and include/nuttx/wireless/bluetooth: Remove unnecessary gatt ioctls 2018-12-08 12:58:27 -06:00
Lwazi Dube
b7fa409fc4 include/nuttx/wireless/bluetooth adn include/nuttx/wireless/bluetooth: Add SIOCBTCONNECT and SIOCBTDISCONNECT ioctl commands 2018-12-02 10:57:51 -06:00
Lwazi Dube
aee64102be wireless/bluetooth/bt_hcicore.c: Add second RX work function 2018-11-30 06:34:18 -06:00
Lwazi Dube
08b37cc104 wireless/bluetooth/bt_att.c: Fix uninitialized variable. 2018-11-27 06:41:51 -06:00
Lwazi Dube
f1aa141d83 wireless/bluetooth/bt_conn.c: Fix uninitialized variable. 2018-11-25 15:50:07 -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
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
2722fd8192 tools/nxstyle.c: Add capability to detect multiple blank lines. Single spacing required by the coding standard. Also coding standard fixes to server .c files for problems found during testing nxstyle. 2018-08-24 05:51:44 -06:00
Gregory Nutt
ef3abe1423 Add missing function names in function headers. 2018-08-13 15:53:15 -06:00
Gregory Nutt
8c61c2f31b Remove trailing spaces at the end of lines. 2018-08-13 07:39:38 -06:00
Gregory Nutt
668df010ec Committed defconfigs for working configurations should never have CONFIG_EXPERIMENTAL set because the opens the doors for untested and incomplete configurations. Conversely, if there are released configurations that use features with dependencies on CONFIG_EXPERIMENTAL, then those configurations are in use and those dependencies should be removed:
graphics/vnc/server/Kconfig:  Remove a dependency on CONFIG_EXPERIMENTAL
net/tcp/Kconfig:  Remove a dependency on CONFIG_EXPERIMENTAL
wireless/bluetooth/Kconfig:  Remove a dependency on CONFIG_EXPERIMENTAL

configs/lc823450-xgevk/audio/defconfig:  Remove CONFIG_EXPERIMENTAL=y
configs/lc823450-xgevk/bt/defconfig:  Remove CONFIG_EXPERIMENTAL=y
configs/lc823450-xgevk/ipl2/defconfig:  Remove CONFIG_EXPERIMENTAL=y
configs/lc823450-xgevk/nsh/defconfig:  Remove CONFIG_EXPERIMENTAL=y
configs/lc823450-xgevk/rndis/defconfig:  Remove CONFIG_EXPERIMENTAL=y
configs/lc823450-xgevk/usb/defconfig:  Remove CONFIG_EXPERIMENTAL=y
configs/lpcxpresso-lpc54628/netnsh/defconfig:  Remove CONFIG_EXPERIMENTAL=y
configs/moxa/nsh/defconfig:  Remove CONFIG_EXPERIMENTAL=y
configs/olimex-stm32-p407/module/defconfig:  Remove CONFIG_EXPERIMENTAL=y
configs/photon/wlan/defconfig:  Remove CONFIG_EXPERIMENTAL=y
configs/sabre-6quad/smp/defconfig:  Remove CONFIG_EXPERIMENTAL=y
configs/sam4cmp-db/nsh/defconfig:  Remove CONFIG_EXPERIMENTAL=y
configs/sama5d4-ek/elf/defconfig:  Remove CONFIG_EXPERIMENTAL=y
configs/sama5d4-ek/knsh/defconfig:  Remove CONFIG_EXPERIMENTAL=y
configs/samv71-xult/module/defconfig:  Remove CONFIG_EXPERIMENTAL=y
configs/samv71-xult/vnc/defconfig:  Remove CONFIG_EXPERIMENTAL=y
configs/samv71-xult/vnxwm/defconfig:  Remove CONFIG_EXPERIMENTAL=y
configs/sim/bluetooth/defconfig:  Remove CONFIG_EXPERIMENTAL=y
configs/sim/pf_ieee802154/defconfig:  Remove CONFIG_EXPERIMENTAL=y
configs/sim/pktradio/defconfig:  Remove CONFIG_EXPERIMENTAL=y
configs/sim/sixlowpan/defconfig:  Remove CONFIG_EXPERIMENTAL=y
configs/sim/traveler/defconfig:  Remove CONFIG_EXPERIMENTAL=y
configs/sim/userfs/defconfig:  Remove CONFIG_EXPERIMENTAL=y
configs/stm32f4discovery/hciuart/defconfig:  Remove CONFIG_EXPERIMENTAL=y
configs/stm32f4discovery/pseudoterm/defconfig:  Remove CONFIG_EXPERIMENTAL=y
configs/teensy-3.x/usbnsh/defconfig:  Remove CONFIG_EXPERIMENTAL=y
2018-06-17 10:30:01 -06:00
Gregory Nutt
ae44eb2969 tools/kconfig2html.c and wireless/bluetooth/Kconfig: Fixes needed to generate new configuration variable document. 2018-06-03 10:03:35 -06:00
Gregory Nutt
fd844f8eac include/nuttx/wireless/bluetooth: Move Bluetooth header files from include/nuttx/wireless to include/nuttx/wireless/bluetooth for symmetry with other wireless technologies. 2018-04-29 12:43:09 -06:00
Gregory Nutt
0663e075ca Trivial typo fix 2018-04-22 08:39:18 -06:00
Gregory Nutt
f188b35707 Update some comments. 2018-04-22 07:36:39 -06:00
Gregory Nutt
5a8a9e3aec wireless/bluetooth: Adds implementation of GATT write IOCTL commands. 2018-04-21 08:55:58 -06:00
Gregory Nutt
87dd2dc16a wireless/bluetooth: Adds implementation of GATT read IOCTL commands. 2018-04-21 08:38:08 -06:00
Gregory Nutt
8aa5b6c6ac include/nuttx/wireless: Add support for the rest of the IOCTL options needed to support apps/wireless/bluetooth/btsak. This is only the IOCTL command definitions. The IOCTL command implementation is still missing. 2018-04-20 09:14:59 -06:00
Gregory Nutt
1d044e6952 Eliminate some warnings found in build-testing 2018-04-19 16:54:17 -06:00
Gregory Nutt
71b8d408e2 wireless/bluetooth: Add IOCTL commands to support MTU exchange. 2018-04-19 15:51:40 -06:00
Gregory Nutt
0a8dd2a778 wireless/bluetooth: Fix an attempt to use an uninitialized semaphore in the IOCTL logic. 2018-04-19 13:43:21 -06:00
Gregory Nutt
4eaa2b8306 wireless/bluetooth: IOCTL discover parameters need to persist throughout the discovery. 2018-04-19 11:57:15 -06:00
Gregory Nutt
2ebe8e99cc wireless/bluetooth: Add support for IOCTL commands to perform GATT discovery and obtain the results. 2018-04-19 11:26:36 -06:00
Gregory Nutt
f27124dfc4 include/nuttx/wireless: Remove bogus name from structure. This was left over from a previous change and had me confused for awhile. 2018-04-19 09:14:48 -06:00
Gregory Nutt
44a5a7e170 wireless/bluetooth: Remove Rx kernel thread. The operation of dispatching messages can be performed just as well on the high and low priority work queue. The network driver operates the low priority work queue so that also integrates better with network frame reception. 2018-04-19 08:52:09 -06:00
Gregory Nutt
8ab2eb55d6 drivers/wireless: Add option to dump I/O buffers. Fix calculation of response length. 2018-04-18 12:46:47 -06:00
Gregory Nutt
c13e54de10 arch/arm/src/stm32: Fix an error in the HCI UART. It was setting 9- vs 8-bit word size. 2018-04-17 08:30:16 -06:00