Commit Graph

13356 Commits

Author SHA1 Message Date
David B. Kinder b78ffc0e6b doc: add labels to basic sample docs
Docs need a label at the top so we can use :ref:`labelname`
to create a link to that doc from other docs.

Change-Id: I57d65a8888f78aa61d776f607a5db86bdb35726c
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-04-04 19:51:47 +00:00
David B. Kinder 2bfff175ab doc: add labels to bluetooth sample docs
Docs need a label at the top so we can use :ref:`labelname`
to create a link to that doc from other docs.

Change-Id: Ide66f75ca8fac0d5f65fbfc50dc9d130cf45b392
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-04-04 19:51:27 +00:00
Johan Hedberg c283b1f94f doc: subsystems: bluetooth: Update feature list
Update the supported features list for Bluetooth.

Change-Id: I25f029106852794bcae1163ce1a1162d78c68d24
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-04-04 19:51:07 +00:00
Johan Hedberg 77d0211f0c boards: bbc_microbit: Remove bogus references to green LEDs
The LEDs on BBC micro:bit boards are red and not green. Since
mentioning the color doesn't really provide any value to the GPIO pin
definitions, just remove it.

Change-Id: I7f53e0d8a0733cda911a624d0b53c750eacfa685
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-04-04 19:37:26 +00:00
Anas Nashif fb5e9b9283 samples: console: filter boards without console
Change-Id: Ifdf0da9295d54cd1e95386297eff2e5ef3d45858
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-04 19:18:15 +00:00
David B. Kinder 2a05cc1b54 doc: add labels to sample docs for linking
Docs need a label at the top so we can use :ref:`labelname` to
create a link to that doc from other docs.

Change-Id: I7d7b98f3a9d22350ca983b3558bf83f77fd6e379
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-04-04 19:09:30 +00:00
Anas Nashif 7a90ab448b tests: port static_idt test to unified kernel
Change-Id: Ida4333b91ad322ff676cfbaa2ccaab0bdd38cd48
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-04 12:34:38 -04:00
Anas Nashif 5bb0169d02 kernel: remove unused _THREAD_TIMEOUT_INIT and _THREAD_ERRNO_INIT
_THREAD_TIMEOUT_INIT() has been replaced by _nano_timeout_thread_init(),
so it can be removed.

_THREAD_ERRNO_INIT() is defined, but never used. Ben suspects that this
is a bug, and that there should be some code that calls it.

Jira: ZEP-1326
Change-Id: I476c316b80e9f34d1ed61971229ed9afafc80d8a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-04 15:25:45 +00:00
Johan Hedberg 7e5df0cc02 drivers: display: Enhance BBC micro:bit string output capabilities
Add a new mb_display_print() API which takes printf-style parameters
and outputs scrolling text instead of one character at a time. The
existing mb_display_str() API is renamed to mb_display_string() for
consistency, and now also takes printf-style parameters.

Change-Id: I59c42bcd74c62f05ecb6d097dc808b9e5c1984c5
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-04-04 13:54:00 +03:00
Johan Hedberg 380d24de1d drivers: Add support for BBC micro:bit LED display
Adds a simple driver to access the 5x5 LED display found on BBC
micro:bit boards. The display is so limited that no effort is done to
try to integrate with the existing console (which would likely make
the display unusable). Instead, dedicated mb_display_* APIs are added
that are specific to this display.

References:

 https://www.microbit.co.uk/device/screen
 https://lancaster-university.github.io/microbit-docs/ubit/display/

Jira: ZEP-1990
Change-Id: I431b5b358b5f07592a60d3aed87eaab6ac20ce25
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-04-04 08:14:36 +03:00
Anas Nashif 341d926a04 doc: reduce levels in toc
The level was increased to 3 by mistake.

Change-Id: Ie62e1d1f49a6708c75e2947247279a095082d94e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-03 22:57:40 +00:00
Lee Jones 97fa0d9030 dma: Use is_power_of_two() utility instead of hand-rolling
Change-Id: I79de9d2ce4ab514f326d8e4b922d0cc0b582c076
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2017-04-03 20:33:42 +00:00
Anas Nashif 81b4cc21ec doc: split release note documents
Change-Id: I7901157fa691f149394dd0c30654d43c2b0385ed
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-03 16:41:23 +00:00
Anas Nashif 03ca26fdeb doc: build json files from the documentation
Change-Id: I30db3a3f0d16cb929c74756a4d1bd8baf2ce8a11
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-03 16:41:23 +00:00
Andrew Boie 5c9f7e28a1 xtensa: remove legacy kernel cruft
fibers/tasks are now just threads and we should not be using
struct *tcs any more.

Change-Id: Iee5369abcc66b4357a0c75537025fe8edb0ffbb4
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-04-03 16:40:48 +00:00
Jean-Paul Etienne bb164f26ea gpio: added support for the SiFive Freedom E310 GPIO driver
Change-Id: If299b6a5b0cd9e6c181d552d78989840d5a2fbe9
Signed-off-by: Jean-Paul Etienne <fractalclone@gmail.com>
2017-04-02 15:15:25 +00:00
Jean-Paul Etienne a916cf7e19 serial: added support for the SiFive Freedom E310 UART driver
Change-Id: I7552b316bd328c67eabb1dbf62342cb9b663845a
Signed-off-by: Jean-Paul Etienne <fractalclone@gmail.com>
2017-04-02 15:15:21 +00:00
Jean-Paul Etienne d7b713e5b8 interrupt_controller: added support for the SiFive Freedom E310 PLIC driver
The SiFive Freedom E310 Platform Level Interrupt Controller (PLIC) follows
the riscv PLIC specification as defined in the riscv privilege
architecture specification.

It provides implementation for the riscv PLIC APIs as
required by the riscv-privilege SOC Family for SOCs providing
support for the RISCV_HAS_PLIC config.

Change-Id: I95d02edb53deeccd91e490776e8e1dbfb82d235f
Signed-off-by: Jean-Paul Etienne <fractalclone@gmail.com>
2017-04-02 15:15:16 +00:00
Jean-Paul Etienne f2c96e8fff pinmux: added support for the SiFive Freedom E310 pinmux driver
Change-Id: I4d1a1775df20e8d074b2f5a4a9f91619289582ff
Signed-off-by: Jean-Paul Etienne <fractalclone@gmail.com>
2017-04-02 15:15:12 +00:00
Jean-Paul Etienne 4ae030c7b8 riscv32: added support for the SiFive Freedom E310 SOC
The SiFive Freedom E310 SOC follows the riscv privilege
architecture specification and hence is declared within
the riscv privilege SOC family.

It also provides support for a riscv
Platform Level Interrupt Controller (PLIC)

Change-Id: I19ff0997eacc248f48444fc96566a105c6c02663
Signed-off-by: Jean-Paul Etienne <fractalclone@gmail.com>
2017-04-02 15:15:07 +00:00
Jean-Paul Etienne cd14317c41 timer: riscv_machine_timer: prevent spurious interrupt while rearming the timer
Rearming the riscv machine timer is done by first updating the
mtimecmp low value register. If the low value is updated with a
relatively small value, a timer interrupt can be generated while
updating the mtimecmp high value.

To avoid such a spurious interrupt to occur, disable the timer
interrupt while rearming the timer.

Change-Id: I50ab3f19554a9a8dfe70943b6da0d20be3de88dc
Signed-off-by: Jean-Paul Etienne <fractalclone@gmail.com>
2017-04-02 15:15:03 +00:00
Jean-Paul Etienne 1451f82aeb timer: riscv_machine_timer driver depends on SOC_FAMILY_RISCV_PRIVILEGE
Change-Id: I5cbb2845979f88eb005dfd7e0b1714b6fe6167d3
Signed-off-by: Jean-Paul Etienne <fractalclone@gmail.com>
2017-04-02 15:14:59 +00:00
Anas Nashif 7d5be2af73 Merge "Merge net branch into master" 2017-04-01 20:46:11 +00:00
Paul Sokolovsky 291d4716ae docs: networking: Suggest to stop QEMU-related networking daemons.
If that's not done and user forgets that they still have TAP interface
active, it may lead to all kinds of address conflicts and routing
problems.

Change-Id: Ib7b64d5e7fcaf2695ff6693a0f0513d16b8907ad
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2017-04-01 20:45:48 +00:00
Paul Sokolovsky 542c2b93d0 subsys: console: Add pull-style console API support.
This change introduces console_getchar() and console_getline() API
calls which can be used to get pending console input (either one
char or whole line), or block waiting for one. In this regard, they
are similar to well-known ANSI C function getchar/gets/fgets, and
are intended to ease porting of existing applications to Zephyr, and
indeed, these functions (shaped as an external module) are already
used by few applications.

The implementation of the functions is structured as a new "console"
subsystem. The intention is that further generic console code may be
pulled there instead of being in drivers/console/. Besides the
functions themselves, initialization code and sample applications
are included.

At this time, there're may limitations of how these functions can
be used. For example, console_getchar() and console_getline() are
mutually exclusive, and both are incompatible with callback
(push-style) console API (and e.g. with console shell subsystem
which uses this API). Again, the intention is to make a first step
towards refactoring console subsystem to allow more flexible
real-world usage, better reusability and composability.

Change-Id: I3f4015bb5b26e0656f82f428b11ba30e980d25a0
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2017-04-01 20:44:17 +00:00
Luiz Augusto von Dentz 9f5f6d6283 slist: Add parentesis to container list and node pointer
This enables casting if necessary.

Change-Id: I69d537dd1082e1e5a05aa2cacdd503d3f6c1ab95
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-04-01 20:36:42 +00:00
Luiz Augusto von Dentz f20f0af255 slist: Add SYS_SLIST_PEEK_TAIL_CONTAINER
This adds SYS_SLIST_PEEK_TAIL_CONTAINER macro to access the container
directly.

Change-Id: I740138a47936ebda1e0090628f4933e921f6a43b
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-04-01 20:36:42 +00:00
Qiu Peiyang fe415dbf62 tests: drivers: spi: fix variable type mismatches
These were flagged by icx build.

Jira: ZEP-1887

Change-Id: Iaeedb13be23e86ebfb29a6441574b7384ae836e1
Signed-off-by: Qiu Peiyang <peiyangx.qiu@intel.com>
2017-04-01 20:36:03 +00:00
Marti Bolivar 2a9bb7af3d toolchain: override static assertions for GCC
Provide a BUILD_ASSERT and BUILD_ASSERT_MSG that are based on
_Static_assert when that's available, as its output is easier to read.

Change-Id: Ifa96d5073b1341cab2a90e4dcd04752ee80c69bb
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-04-01 20:35:45 +00:00
Marti Bolivar 7e61e70b15 toolchain: add BUILD_ASSERT_MSG()
Like BUILD_ASSERT(), but with a message to emit on failure.

The base implementation swallows the message; compiler headers can
override it when they can do better.

Change-Id: Ib724e48554da77a51afa01468b1d5b7806f9de6b
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-04-01 20:35:45 +00:00
Marti Bolivar f8c9c5444a toolchain: allow compiler to provide BUILD_ASSERT
Change-Id: Id71d5499d0bd8141062f854a814bd882db470323
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-04-01 20:35:44 +00:00
Piotr Mienkowski ce6ad70c06 scripts: openocd.sh: align usage of OPENOCD_*_CMD variables
OPENOCD_PRE_CMD, OPENOCD_POST_CMD variables require adding
'-c' in front of an actual OpenOCD command. This is in contrary
to other OPENOCD_*_CMD varialbles which specify OpenOCD commands
directly. This patch aligns usage of various OPENOCD_*_CMD variables.
It is no longer required to add '-c' in front of OPENOCD_PRE_CMD,
OPENOCD_POST_CMD variables.

Change-Id: I276fab00b099694c83c3bf74aa5dd59c8d6a308b
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2017-04-01 12:21:36 +00:00
Marti Bolivar 5f95120779 zephyr-env.sh: only reset scripts_path on Windows
The pipeline that converts scripts_path from "C:\" style to "/c/"
style is only needed on Windows. Further, on Linux, it prepends an
extra "/" to what gets added to PATH, since the pwd output already has
a leading "/".

Fix that by only making the change when we're building on Windows.

Change-Id: Ied7e4491f171d82e8dee4c3a4dfdcf64adf46efd
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-03-31 15:42:31 -04:00
Marti Bolivar bfda8a966a zephyr-env.sh: unset PWD_OPT after using it
Change-Id: I9d78983233097c725869c4467a20189e2b859bab
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-03-31 15:19:07 -04:00
Marti Bolivar e3a31263ce zephyr-env.sh: fix stale comment
s/zephyr-env_install.bash/.zephyrrc/

Change-Id: I88d4a5d44b6fb97d52b8244cb3d1bcb8679b49ef
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-03-31 15:08:33 -04:00
Jukka Rissanen cadfaf8858 Merge net branch into master
Main changes:

- RPL fixes
- TCP 2MSL timeout tweaking fix
- net_buf context pool crash fix
- net-shell connection status output fixes
- Packet re-routing fixes
- net_mgmt API fixes
- IEEE 802.15.4 link layer security added
- Network sample applications config option prefix changed

----------------------------------------------------------------
Jukka Rissanen (6):
      net: rpl: Temporarily disable some of the RPL tests
      net: tests: Fix nbr lookup in route tests
      net: tcp: Allow tweaking of 2MSL timeout
      net: nbuf: Do not crash if context pools are not in use
      net: shell: Fix the connection status output
      net: Check if sent packet is meant for us

Ravi kumar Veeramally (8):
      net: if: Fix triggering interface link call back
      net: icmpv6: Remove unnecessary cache ptrs for src and dst
      net: rpl: Align Kconfig options properly
      net: rpl: Add support for handling of DAO ACK
      net: rpl: Fix invalid parsing of DAO message
      net: rpl: Fix invalid parsing of DIO message
      net: rpl: Fix DAO ACK reply
      net: rpl: Fix invalid nbr lookup

Tomasz Bursztyka (29):
      net/ieee802154: Add Auxiliary Security Header definitions
      net/ieee802154: Parse and validate auxiliary security header
      net/ieee802154: Change function signature for future change
      net/ieee802154: Normalize one parameter to make it clearer
      net/ieee802154: Add generic support for link layer cipher operations
      net/ieee802154: Provide the means to create secured data frames
      net/ieee802154: Provide the means to decipher data frames
      net/ieee802154: Integrate link-layer security relevantly
      net/ieee802154: Add net mgmt requests to set/get security settings
      drivers/ieee802154: Adding support for CC2520 ccm crypto
      tests/net/ieee802154: Add a simple CC2520 crypto dev test
      net/ieee802154: Expose auxiliary security header validation function
      net: Rename Kconfig.samples and its main option for future changes
      net: Add 802.15.4 useful Kconfig application settings
      net/ieee802154: Rename <SET/GET>_CHAN to <SET/GET>_CHANNEL
      samples/net: Uses CONFIG_NET_APP_IEEE802154_* options relevantly
      samples/net: Remove the need for IEEE 802.15.4 stack in wpan serial
      net/ieee802154: Remove ORFD choice altogether.
      net/samples: Add 802.15.4 link-layer security settings for the samples
      tests/net/ieee802154: Switch l2 to ztest framework
      tests/net/ieee802154: Add a unit test for secured data frame validation
      net/ieee802154: We don't get the MFR from device drivers
      net/samples/ieee802154: Making hw sample simpler
      net/ieee802154: Simplify data FS settings function signature
      net/ieee802154: Use context's extended address when generating frame
      net/ieee802154: Use context instead of interface to reduce stack usage
      net/ieee802154: Disable ACK reply handling by default
      net/ieee802154: Remove useless __packed annotation
      net/mgmt: Mask vs event should be verified part by part

 drivers/ieee802154/Kconfig.cc2520                  |  27 +-
 drivers/ieee802154/ieee802154_cc2520.c             | 414 ++++++++++++++++++++-
 drivers/ieee802154/ieee802154_cc2520.h             |   4 +
 drivers/ieee802154/ieee802154_cc2520_regs.h        |  11 +-
 include/net/ieee802154.h                           |  66 +++-
 samples/bluetooth/ipsp/prj.conf                    |   6 +-
 samples/bluetooth/ipsp/src/main.c                  |   4 +-
 samples/net/coaps_client/prj_qemu_x86.conf         |   6 +-
 samples/net/coaps_client/src/coaps_client.c        |   6 +-
 samples/net/coaps_client/src/udp.c                 |   6 +-
 samples/net/coaps_server/prj_qemu_x86.conf         |   6 +-
 samples/net/coaps_server/src/coaps_server.c        |   6 +-
 samples/net/common/ieee802154_settings.c           |  59 +++
 samples/net/common/ieee802154_settings.h           |  15 +
 samples/net/dns_client/README.rst                  |   5 +-
 samples/net/dns_client/prj_arduino_101.conf        |  10 +-
 samples/net/dns_client/prj_frdm_k64f.conf          |  10 +-
 samples/net/dns_client/prj_qemu_x86.conf           |  10 +-
 samples/net/dns_client/src/config.h                |  10 +-
 samples/net/dns_resolve/prj_qemu_x86.conf          |  10 +-
 samples/net/dns_resolve/src/main.c                 |  12 +-
 samples/net/echo_client/prj_arduino_101.conf       |   6 +-
 .../net/echo_client/prj_arduino_101_cc2520.conf    |   3 +-
 samples/net/echo_client/prj_bt.conf                |   6 +-
 samples/net/echo_client/prj_cc2520.conf            |   7 +-
 samples/net/echo_client/prj_frdm_k64f.conf         |  10 +-
 samples/net/echo_client/prj_frdm_k64f_cc2520.conf  |   7 +-
 samples/net/echo_client/prj_frdm_k64f_mcr20a.conf  |   7 +-
 samples/net/echo_client/prj_nrf5.conf              |   7 +-
 samples/net/echo_client/prj_qemu_802154.conf       |   7 +-
 samples/net/echo_client/prj_qemu_cortex_m3.conf    |  10 +-
 samples/net/echo_client/prj_qemu_x86.conf          |  10 +-
 samples/net/echo_client/prj_sam_e70_xplained.conf  |   6 +-
 samples/net/echo_client/src/Makefile               |   7 +
 samples/net/echo_client/src/echo-client.c          |  39 +-
 samples/net/echo_server/prj_arduino_101.conf       |   6 +-
 .../net/echo_server/prj_arduino_101_cc2520.conf    |   1 -
 samples/net/echo_server/prj_bt.conf                |   6 +-
 samples/net/echo_server/prj_cc2520.conf            |   5 +-
 samples/net/echo_server/prj_frdm_k64f.conf         |  10 +-
 samples/net/echo_server/prj_frdm_k64f_cc2520.conf  |   5 +-
 samples/net/echo_server/prj_frdm_k64f_mcr20a.conf  |   5 +-
 samples/net/echo_server/prj_nrf5.conf              |   7 +-
 samples/net/echo_server/prj_qemu_802154.conf       |   5 +-
 samples/net/echo_server/prj_qemu_cortex_m3.conf    |  10 +-
 samples/net/echo_server/prj_qemu_x86.conf          |  10 +-
 samples/net/echo_server/prj_sam_e70_xplained.conf  |   6 +-
 samples/net/echo_server/src/Makefile               |   7 +
 samples/net/echo_server/src/echo-server.c          |  23 +-
 samples/net/http_client/README.rst                 |   4 +-
 samples/net/http_client/prj_frdm_k64f.conf         |  11 +-
 samples/net/http_client/prj_qemu_x86.conf          |  10 +-
 samples/net/http_client/src/config.h               |  10 +-
 samples/net/http_server/README.rst                 |   4 +-
 samples/net/http_server/prj_frdm_k64f.conf         |   6 +-
 samples/net/http_server/prj_qemu_x86.conf          |   6 +-
 samples/net/http_server/src/config.h               |   6 +-
 samples/net/ieee802154/hw/prj_cc2520_1.conf        |  64 ++++
 samples/net/ieee802154/hw/prj_cc2520_2.conf        |  64 ++++
 samples/net/ieee802154/hw/prj_mcr20a.conf          |  19 +-
 samples/net/ieee802154/hw/prj_nrf5.conf            |  30 +-
 samples/net/ieee802154/hw/src/Makefile             |   3 +
 samples/net/ieee802154/hw/src/ieee802154_test.c    |  96 ++---
 samples/net/ieee802154/qemu/prj.conf               |   4 +-
 samples/net/ieee802154/qemu/prj_client.conf        |   4 +-
 samples/net/ieee802154/qemu/prj_server.conf        |   4 +-
 .../net/ieee802154/qemu/src/ieee802154_qemu_test.c |   4 +-
 samples/net/irc_bot/prj_frdm_k64f.conf             |  10 +-
 samples/net/irc_bot/prj_qemu_x86.conf              |  10 +-
 samples/net/irc_bot/src/irc-bot.c                  |  24 +-
 samples/net/leds_demo/prj_802154.conf              |   4 +-
 samples/net/leds_demo/src/Makefile                 |   7 +
 samples/net/leds_demo/src/leds-demo.c              |  11 +
 .../net/mbedtls_dtlsclient/prj_arduino_101.conf    |  10 +-
 samples/net/mbedtls_dtlsclient/prj_qemu_x86.conf   |  10 +-
 samples/net/mbedtls_dtlsclient/src/dtls_client.c   |  12 +-
 samples/net/mbedtls_dtlsclient/src/udp.c           |  12 +-
 samples/net/mbedtls_dtlsserver/prj_qemu_x86.conf   |  10 +-
 samples/net/mbedtls_dtlsserver/src/dtls_server.c   |  12 +-
 samples/net/mbedtls_sslclient/src/tcp_cfg.h        |  10 +-
 samples/net/mqtt_publisher/prj_96b_nitrogen.conf   |  10 +-
 samples/net/mqtt_publisher/prj_frdm_k64f.conf      |  10 +-
 samples/net/mqtt_publisher/prj_qemu_x86.conf       |  10 +-
 samples/net/mqtt_publisher/src/config.h            |  10 +-
 samples/net/nats/prj_qemu_x86.conf                 |   6 +-
 samples/net/nats/src/main.c                        |  24 +-
 samples/net/telnet/prj_frdm_k64f.conf              |   4 +-
 samples/net/telnet/prj_qemu_x86.conf               |   6 +-
 samples/net/telnet/prj_qemu_x86_iamcu.conf         |   6 +-
 samples/net/telnet/src/telnet.c                    |  12 +-
 samples/net/wpan_serial/prj.conf                   |   4 +-
 samples/net/wpan_serial/src/main.c                 |  12 +-
 samples/net/zoap_client/prj_bt.conf                |   6 +-
 samples/net/zoap_server/prj_cc2520.conf            |   8 +-
 samples/net/zoap_server/src/Makefile               |   7 +
 samples/net/zoap_server/src/zoap-server.c          |  17 +-
 samples/net/zperf/prj_bt.conf                      |   6 +-
 samples/net/zperf/prj_frdm_k64f.conf               |  10 +-
 samples/net/zperf/prj_qemu_x86.conf                |  10 +-
 samples/net/zperf/prj_quark_se_c1000_devboard.conf |   9 +-
 samples/net/zperf/src/Makefile                     |   7 +
 samples/net/zperf/src/zperf_internal.h             |  12 +-
 samples/net/zperf/src/zperf_shell.c                |  11 +
 subsys/net/ip/Kconfig                              |  10 +-
 subsys/net/ip/Kconfig.app                          | 106 ++++++
 subsys/net/ip/Kconfig.rpl                          | 130 ++++---
 subsys/net/ip/Kconfig.samples                      |  50 ---
 subsys/net/ip/icmpv6.c                             |  23 +-
 subsys/net/ip/l2/ieee802154/Kconfig                |  58 +--
 subsys/net/ip/l2/ieee802154/Makefile               |   2 +
 subsys/net/ip/l2/ieee802154/ieee802154.c           |  30 +-
 subsys/net/ip/l2/ieee802154/ieee802154_frame.c     | 292 +++++++++++++--
 subsys/net/ip/l2/ieee802154/ieee802154_frame.h     | 103 ++++-
 subsys/net/ip/l2/ieee802154/ieee802154_mgmt.c      |  75 +++-
 subsys/net/ip/l2/ieee802154/ieee802154_security.c  | 198 ++++++++++
 subsys/net/ip/l2/ieee802154/ieee802154_security.h  |  36 ++
 subsys/net/ip/l2/ieee802154/ieee802154_shell.c     |   4 +-
 subsys/net/ip/nbuf.c                               |  12 +-
 subsys/net/ip/net_core.c                           |  12 +-
 subsys/net/ip/net_if.c                             |   6 +-
 subsys/net/ip/net_mgmt.c                           |  11 +-
 subsys/net/ip/net_shell.c                          |  80 ++--
 subsys/net/ip/rpl.c                                | 187 +++++++---
 subsys/net/ip/tcp.c                                |   6 +-
 tests/net/ieee802154/crypto/Makefile               |  12 +
 .../hw => tests/net/ieee802154/crypto}/prj.conf    |   8 +-
 tests/net/ieee802154/crypto/src/Makefile           |   1 +
 .../ieee802154/crypto/src/ieee802154_crypto_test.c | 310 +++++++++++++++
 tests/net/ieee802154/crypto/testcase.ini           |   5 +
 tests/net/ieee802154/l2/prj.conf                   |   6 +-
 tests/net/ieee802154/l2/src/Makefile               |   2 +
 .../net/ieee802154/l2/src/ieee802154_fake_driver.c |  26 +-
 tests/net/ieee802154/l2/src/ieee802154_test.c      | 206 ++++++----
 tests/net/mgmt/src/mgmt.c                          |   6 +-
 tests/net/route/src/main.c                         |  82 +---
 tests/net/rpl/prj.conf                             |   1 +
 tests/net/rpl/src/main.c                           |  17 +-
 137 files changed, 2795 insertions(+), 967 deletions(-)
 create mode 100644 samples/net/common/ieee802154_settings.c
 create mode 100644 samples/net/common/ieee802154_settings.h
 create mode 100644 samples/net/ieee802154/hw/prj_cc2520_1.conf
 create mode 100644 samples/net/ieee802154/hw/prj_cc2520_2.conf
 create mode 100644 subsys/net/ip/Kconfig.app
 delete mode 100644 subsys/net/ip/Kconfig.samples
 create mode 100644 subsys/net/ip/l2/ieee802154/ieee802154_security.c
 create mode 100644 subsys/net/ip/l2/ieee802154/ieee802154_security.h
 create mode 100644 tests/net/ieee802154/crypto/Makefile
 rename {samples/net/ieee802154/hw => tests/net/ieee802154/crypto}/prj.conf (86%)
 create mode 100644 tests/net/ieee802154/crypto/src/Makefile
 create mode 100644 tests/net/ieee802154/crypto/src/ieee802154_crypto_test.c
 create mode 100644 tests/net/ieee802154/crypto/testcase.ini

Change-Id: I41c259c48daf010ad4f4ece1f43503caf94f4eb6
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-03-31 15:58:02 +03:00
Tomasz Bursztyka 8108a608ff net/mgmt: Mask vs event should be verified part by part
It needs to check if current event matches:

- cb's layer
- cb's layer code
- cb's command

If none match, it will not raise the event.

Fixing the unit test as layer must be always != 0.

Jira: ZEP-1940

Change-Id: Iadd63e751fa6e534a10e7da9cae0f5bb5a384461
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-03-31 12:15:29 +00:00
Tomasz Bursztyka 8292dc16d4 net/ieee802154: Remove useless __packed annotation
These structs are not mapped to network data, and allocated on stack.

Change-Id: Ib00e15c3d0cdb21fd124ef6f61ec010100bcc9bf
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-03-31 11:24:28 +02:00
Tomasz Bursztyka dc7be7c54f net/ieee802154: Disable ACK reply handling by default
Most (if not all) 802.15.4 devices can handle ACK replies by
themselves.

Change-Id: I0319d59de767b20eb67c1592bacaa4a7b7015cad
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-03-31 11:24:28 +02:00
Tomasz Bursztyka e716b4dcb0 net/ieee802154: Use context instead of interface to reduce stack usage
Now that interface is not directly used in data and mac frame creation,
let's just pass context pointer.

Change-Id: If002e6790d044eeffc57cb5685ac9525fbd6e43c
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-03-31 11:24:28 +02:00
Tomasz Bursztyka 0948149b92 net/ieee802154: Use context's extended address when generating frame
Now that RFD is default, the extended address can be changed through net
mgmt API, and thus no longer be the same as device's generated mac address.

Change-Id: I07ee647615c2caa1994712147c6c8a2b4306900d
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-03-31 11:24:28 +02:00
Tomasz Bursztyka 0df2a2fdbe net/ieee802154: Simplify data FS settings function signature
There is no need of interface anymore.
After previous changes, it appears that net_if parameter is not used so
we can remove it.

Change-Id: Id3570f50865696818a9be2280172e2e25fc537f7
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-03-31 11:24:28 +02:00
Tomasz Bursztyka e027645c88 net/samples/ieee802154: Making hw sample simpler
- Let's use samples settings
- Enable both net and 15.4 shell modules
- Change prj_*.conf accordingly

Change-Id: If7e32a42c8dc7026d0580b1e94e819e1eda82e5b
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-03-31 11:24:28 +02:00
Tomasz Bursztyka 5e3354dad5 net/ieee802154: We don't get the MFR from device drivers
commit id 7a11439020 changed this.
Hopefully that changed did not affect anything.

Reducing minimal frame length and applying the change everywhere where
relevant.

Change-Id: I5ae203751bfcf70cef833620106d2c2d0e33b7a5
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-03-31 11:24:28 +02:00
Tomasz Bursztyka 82709802a9 tests/net/ieee802154: Add a unit test for secured data frame validation
Change-Id: I3e35d13d1fdfacb6625dfe1b7b30cc2354a7ee93
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-03-31 11:24:28 +02:00
Tomasz Bursztyka cca117d8b9 tests/net/ieee802154: Switch l2 to ztest framework
Change-Id: Ibce93d4652e3991a06e870fc81e952788f0c6465
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-03-31 11:24:27 +02:00
Tomasz Bursztyka d2f8a5a27f net/samples: Add 802.15.4 link-layer security settings for the samples
And use them accordingly in the common code part.

Change-Id: Id91b76e5baea607c0d68eebcde6f84e4e35ca44c
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-03-31 11:24:27 +02:00
Tomasz Bursztyka e3c0310d98 net/ieee802154: Remove ORFD choice altogether.
ORFD was a hack, from the beginning of the IEEE 802.15.4 Soft MAC stack,
but is now useless and can therefore be removed.

Change-Id: I74d5e1995993f4a0749b6d9d553406d5ae162bda
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-03-31 11:24:27 +02:00
Tomasz Bursztyka 7b8af87fdf samples/net: Remove the need for IEEE 802.15.4 stack in wpan serial
It can uses CONFIG_NET_APP_IEEE802154_* options instead.

Change-Id: I2501ca2015cfc1e68c6c384cb32c21084d2cb30d
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-03-31 11:24:27 +02:00
Tomasz Bursztyka 26a4df620f samples/net: Uses CONFIG_NET_APP_IEEE802154_* options relevantly
In order to simplify when 802.15.4 is selected on these samples, let's
setup the device through a common code.

For this to work, RFD is now the default.

Change-Id: I46590864442f77d83f681cc0e854c94344648856
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-03-31 11:24:27 +02:00