Commit graph

41120 commits

Author SHA1 Message Date
Flavio Santes
4979accb9f samples/net/mqtt: Improve inline doc
Remove the brief keyword for the mqtt_client_ctx structure's
inline documentation.

Change-Id: Ia3999bbb7e3246495fd1cab0ca828d95f5896835
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-02-27 10:28:55 +02:00
Flavio Santes
31f014a56d samples/net/mqtt: Simplify MQTT publisher
Remove the global bluemix flag and use a #define to set the
MQTT publisher topic and its parameters at compile time.

This change will save a few bytes and speed up computations.

Change-Id: I27bfc6b38c73d32c6105f1d506e147e9a5583097
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-02-27 10:28:55 +02:00
Jukka Rissanen
b892c4c61b net: ipv6: Bluetooth address fix
If IPv6 address is generated from Bluetooth MAC address,
then the Universal/Local bit must not be toggled or touched
at all. See RFC 7668 ch 3.2.2 for details.

Because this change is not compatible with older Linux kernel
BT IPSP support, the old behavior can be enabled by setting
CONFIG_NET_L2_BLUETOOTH_ZEP1656 option.

Change-Id: I05d48723b70f1eb60fbd46107ef6a2a4e8f9154a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-27 10:28:55 +02:00
Vinicius Costa Gomes
270673e112 samples/zoap_client: Fix using the wrong timeout for retransmissions
It was assumed that the unit was microseconds, it is in miliseconds,
the same unit that is stored in the timeout field of the pending
transmission.

Change-Id: Ia99f363c7de4ec76a7ed229cb94a9964bcf609aa
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2017-02-27 10:28:55 +02:00
Vinicius Costa Gomes
2f574c7db5 samples/zoap_server: Add retransmissions for CON messages
This adds retransmission support for confirmable responses sent by the
server.

Jira: ZEP-1732

Change-Id: I77c0c6375fa666e4cfdda4016ad1e0e90caf4ac9
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2017-02-27 10:28:54 +02:00
Vinicius Costa Gomes
8e304ef2e6 iot/zoap: Fix requiring that the buffer is unchanged for retransmit
It is possible that the buffer waiting for retransmission is modified
after it is sent, for example, it can be compacted by 6lo, and our
assumption of where is the message ID is located in the buffer is no
longer valid.

As the message ID is the only information that is necessary for
keeping track of retransmissions, we keep a copy of it in the pending
struct, as well as the destination address of the retransmission.

Change-Id: Id33d54353404628673541225a1a05e27ee08765f
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2017-02-27 10:28:54 +02:00
Vinicius Costa Gomes
45fe87a425 tests/zoap: Adds test for the length of payload on the RX side
This unit test verifies that zoap_packet_get_payload() returns the
expected size for received packets.

Jira: ZEP-1662

Change-Id: Ibe011959f4d6593f4f20f0f5901c9033c76c9518
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2017-02-27 10:28:54 +02:00
Vinicius Costa Gomes
346edff2ca samples/zoap_server: Adds example for the link-format feature
This implements the /.well-known/core resouce and two children
resources (/core1 and /core2) so the link-format feature is better
explained.

Change-Id: I9dd8c69040c952c5d12a9987c1966a71b0257ef2
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2017-02-27 10:28:54 +02:00
Vinicius Costa Gomes
ddb9cf90a7 samples/zoap_server: Add a test case for the observer feature
This adds the resource necessary for the TD_COAP_OBS group of tests.

Change-Id: I33bd09910f74db90ad0d713e4479ab2e3ec343a5
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2017-02-27 10:28:54 +02:00
Vinicius Costa Gomes
8ce3d4ec82 samples/zoap_server: Add more validation tests for block-wise
Add the resource for the TD_COAP_BLOCK_04 ETSI testcase.

Change-Id: Ied901db34ce79d3e1f7f8c7fd55bc398b1f88640
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2017-02-27 10:28:54 +02:00
Vinicius Costa Gomes
da4580dc32 samples/zoap_server: Remove useless return statements
The functions that retrieve net_buf will wait forever until a buffer
is available.

Change-Id: I03ddd1239f50fe4467e86e31c8fbfc9b05c8b190
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2017-02-27 10:28:54 +02:00
Jukka Rissanen
c27aced5bf net: if: Remove local address from IPv6 neighbor cache
When we do DAD (Duplicate Address Detection), the local IPv6
address gets added to the neighbor cache. This is useless so
remove it after DAD has finished.

Change-Id: I9625d367e96d8108a7d3d1d8b2e95f3c4ea11c45
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-27 10:28:54 +02:00
Jukka Rissanen
f5477582bd net: ipv6: Add util to remove neighbor from cache
Add net_ipv6_nbr_rm() utility function that can be used to
remove an IPv6 neighbor from the cache.

Change-Id: I9794856a4f65c5e943656970648e5c5762b0338c
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-27 10:28:54 +02:00
Jukka Rissanen
ab740c00c7 net: shell: Print IPv6 neighbor information
Add "net nbr" command which prints IPv6 neighbor cache
contents.

Change-Id: I7c26ecb117e8b77e64e3be3c0164a94f0d1775bf
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-27 10:28:54 +02:00
Jukka Rissanen
d29e073c62 net: ipv6: Add util to traverse neighbor cache entries
Add utility function to go through all the stored neighbors
in the IPv6 neighbor cache.

Change-Id: I42fe0ec48c000215403aef63629d0763189ebdbb
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-27 10:28:54 +02:00
Jukka Rissanen
c13753587f net: icmpv6: Echo-Reply seq and id fix
The sequence and identifier fields are 16-bit instead of 32-bit
long. This did not cause any issue in Echo-Reply but those two
fields should be set properly.

Change-Id: I5e4878f53d6bb37660d46d173159d27bbe0e94dc
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-27 10:28:53 +02:00
Jukka Rissanen
02a06f6489 net: icmpv6: Add TCP header when sending ICMPv6 error
TCP header was not sent back to originator when ICMPv6
error message was prepared to be sent.

Change-Id: I171bd724c4260b83d7d1c37e0894f9ed8cddd2c9
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-27 10:28:53 +02:00
Wojciech Bober
0f878f6c33 drivers/ieee802154: Add missing parameter to net_if_set_link_addr()
Add the link type to net_if_set_link_addr() call. This fixes the
driver after changes introduced in
4eb2020055.

Change-Id: I72475a055ac805524b4b0f0c2380513e8f041368
Signed-off-by: Wojciech Bober <wojciech.bober@nordicsemi.no>
2017-02-27 10:28:53 +02:00
Tomasz Bursztyka
2b5a343a0f samples/ieee802154: Update qemu based samples
- Let's build it with the various shell modules
- Make use of Kconfig.samples options

Thus: adding prj_server.conf and prj_client.conf to differentiate 2
instances of the app by their IPv6.

Then let's use samples/net/common/Makefile.ipstack

In the end, it is possible to build 2 times the samples this way:
make PCAP=154.pcap CONF_FILE=prj_server.conf server
and
make pristine
make CONF_FILE=prj_client.conf client

On client, or server, or both, shell commands can be used to ping each
other, check the statistics etc...

Once done, the given pcap file (154.pcap for instance) will have
recorded the traffic which can be parsed through:

wireshard 154.pcap

(Note: the "Malformed packet" warnings are not relevant, as the 15.4
frame FCS is a dummy one, it seems to make wireshark a bit lost)

Jira: ZEP-1774

Change-Id: I5590971660ecbfaac75af709124d59e1f98206fe
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-02-27 10:28:53 +02:00
Jukka Rissanen
1ca310fc93 samples: net: Fix the 802.15.4 monitor pcap saving
By default the net-tools package is expected to be located in
${ZEPHYR_BASE}/../net-tools directory. User can also specify
the directory using NET_TOOLS variable when running the make.

The net-tools package is located in this repository
https://gerrit.zephyrproject.org/r/net-tools

Change-Id: Ibccd7cabd567a630020fb9efbe1ec9e27b653b46
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-27 10:28:53 +02:00
Jukka Rissanen
8523480ccf net: doc: Invalid config option for TCP
The qemu doc uses wrong config option for TCP support.

Change-Id: I87344b5af5ce687302e3a3305dd9b3297e171b0e
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-27 10:28:53 +02:00
Jukka Rissanen
3559516dc6 net: doc: Fix incorrect netcat note for qemu setup
If netcat is used with UDP, then one cannot press CTRL-c
as netcat returns immediately to the caller. For TCP the
CTRL-c is needed so move the note to TCP section of this
document.

Change-Id: I936a89e7a7ce8318602c3deae8513007a4620c80
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-27 10:28:53 +02:00
Benjamin Walsh
97f4a48182 doc: fix glaring typo in polling doc
Change-Id: I5e281d57cf8a9a7c9bf784f96b91d12988898a5f
Signed-off-by: Benjamin Walsh <walsh.benj@gmail.com>
2017-02-24 15:24:48 -05:00
Anas Nashif
87a422896c Revert "samples: i2c_lsm9ds0: change hard-coded device name"
This reverts commit 81f85f4e4b.

Need a better solution for this, the patch itself does not solve any problem
and fails on many platforms that do not have I2C enabled.

Change-Id: I060e3d7a9992db8a1ece6da5e8d3a521f4052395
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-24 06:30:39 -08:00
Anas Nashif
33746d4b7c Revert "tests/crypto: Update testcase.ini to build on more platforms"
This reverts commit 7b652b1f84.

Breaks on many boards.

Change-Id: Ie74e7a656094a54b999b99de9a462093525202c3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-23 07:13:42 -08:00
Erwan Gouriou
e895d576db tests: update uart driver api test case
Depending on test environment, termination character could
be '/r' instead of '/n'.
Enabling both possibilities.

Change-Id: I18b47e9055667e0a4f868416ee8d01226a879712
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-02-23 13:30:47 +00:00
Sergio Rodriguez
b6cf56e5cc tests: watchdog: Interrupt reset mode modifications
In order for interrupt reset mode to work (reset the processor
after and interrupt) the interrupt does not has to be cleared,
and the qmsi hal layer clears the interrupt after the callback
has been invoked, the callback does not return and the processor
should reset.

Jira: ZEP-1566

Change-Id: Ic951a0f15fe95fb0ef5d752b831c62e6fa3ceea0
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2017-02-23 13:29:13 +00:00
Andrew Boie
138579a3ad samples: add some missing testcase.ini
Issue: ZEP-1768
Change-Id: Ia59e02bdaf9302b991f0423ef5eba7b0102877b0
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-23 13:28:03 +00:00
Kuo-Lang Tseng
e7f261b748 samples: blink_led: change hard-coded device name
Use the config name defined by the driver Kconfig in device
binding calls as that is more portable and safer because device
name can change and the app does not need to change.

Jira: ZEP-1764

Change-Id: If8c14dd4eb186bace863432d454c9122461f2f9c
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
2017-02-23 13:25:20 +00:00
Kuo-Lang Tseng
0eed7eefee samples: fade_led: change hard-coded device name
Use the config name defined by the driver Kconfig in device
binding calls as that is more portable and safer because device
name can change and the app does not need to change.

Jira: ZEP-1764

Change-Id: I3287da5c5a9df24507efa84bbf7bbb051726bc2c
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
2017-02-23 13:25:05 +00:00
Kuo-Lang Tseng
e47e85e279 samples: driver: led_apa102c: change hard-coded device name
Use the config name defined by the driver Kconfig in device
binding calls as that is safer because device name can change and
the app does not need to change.

Jira: ZEP-1764

Change-Id: I5a3e16e10f7700ec12edbd07603808cd32f15755
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
2017-02-23 13:24:42 +00:00
Kuo-Lang Tseng
81f85f4e4b samples: i2c_lsm9ds0: change hard-coded device name
Instead of using a hard-coded device name in the device binding
call, use the config name defined by the driver Kconfig as that
is safer and the app does not need to change when the device name
is changed.

Jira: ZEP-1764

Change-Id: I99efc4bcae0d1acae70f7820f69dfffbe17510a6
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
2017-02-23 13:24:04 +00:00
Kuo-Lang Tseng
4533734dc6 aon_counter test: fix misspelling in the header include guard
The include guard has a misspelling.

Jira: ZEP-1746

Change-Id: I4d8000ef5c8e037f80acbf2491d0b9466670816a
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
2017-02-23 13:23:35 +00:00
Anas Nashif
ac27101f64 quark_se: arc: do not enable second I2C by default
Change-Id: Ib76edbcfd050cbf04f60aa48125117550b460195
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-23 13:20:38 +00:00
David B. Kinder
2178f62d2f doc: tweak .gitignore to allow doc theme dev
doc processing wants themes to be in the doc/themes folder
This patch makes it easier to develop and test the website
theme with local content generation usint the web theme.

Change-Id: Icc615f2ecbe3b7cecb7974405a44304ffdf68966
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-02-23 13:20:04 +00:00
Flavio Santes
7b652b1f84 tests/crypto: Update testcase.ini to build on more platforms
This patch excludes qemu riscv32 due to the following msg:

qemu-system-riscv32: cannot set up guest memory
'riscv_sifive_board.ram': Cannot allocate memory

Jira: ZEP-1721

Change-Id: Ib1784fa57ad1e3d69871d4e216af1ad5dbe55a76
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-02-23 13:19:21 +00:00
Andre Guedes
c7f01dc90d tests/power/multicorei/lmt: Fix RTC configuration
After QMSI 1.4 update, the alarm callback is not saved when
'alarm_en' is set to zero during RTC configuration. So this
patch fixes tests/power/multicore/lmt application according.

ZEP-1778

Change-Id: Ie1468458bc23a6394484aef2aeee97745d5d23b8
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2017-02-23 13:17:47 +00:00
Kumar Gala
31c5b4f112 Merge arm branch into master
Main changes:

- Various ST SoC changes:
  * Some bugfixes for ST platforms
  * Add support for 2 new STM32F4 SoCs
  * Flash driver support for STM32F4x
- Allow ROM offset to be configurable

----------------------------------------------------------------
Erwan Gouriou (4):
      dts: minor update for nucleo_l476rg
      arch: stm32: provide tick to Cube HAL
      gpio: enable ports F G (and H) for stm32f1xx (stm32f4xx)
      clock_control: fix to get PLL2 source for PREDV1 working

Gustavo Denardin (1):
      arm: Support for new STM32F4 socs (STM32F407 and STM32F429)

Jorge Ramirez-Ortiz (1):
      flash/stm32: driver for STM32F4x series

Marti Bolivar (1):
      arm: cortex-m: allow configurable ROM offset

 arch/arm/core/cortex_m/Kconfig                     |  11 +
 arch/arm/core/cortex_m/prep_c.c                    |   3 +-
 arch/arm/soc/st_stm32/stm32f1/soc.c                |  11 +
 arch/arm/soc/st_stm32/stm32f3/soc.c                |  11 +
 .../st_stm32/stm32f4/Kconfig.defconfig.stm32f407xx |  24 ++
 .../st_stm32/stm32f4/Kconfig.defconfig.stm32f429xx |  24 ++
 arch/arm/soc/st_stm32/stm32f4/Kconfig.soc          |   6 +
 arch/arm/soc/st_stm32/stm32f4/flash_map.h          |  58 +++++
 arch/arm/soc/st_stm32/stm32f4/flash_registers.h    |  20 +-
 arch/arm/soc/st_stm32/stm32f4/soc.c                |  11 +
 arch/arm/soc/st_stm32/stm32l4/soc.c                |  11 +
 drivers/clock_control/stm32f107xx_clock.c          |  13 +-
 drivers/flash/Kconfig                              |   2 +-
 .../flash/{Kconfig.stm32f3x => Kconfig.stm32fxx}   |   8 +-
 drivers/flash/Makefile                             |   4 +
 drivers/flash/flash_stm32f4x.c                     | 269 +++++++++++++++++++++
 drivers/gpio/gpio_stm32.c                          |  33 ++-
 dts/arm/nucleo_l476rg.dts                          |  55 +----
 dts/arm/stm32l476.dtsi                             |  17 +-
 include/arch/arm/cortex_m/scripts/linker.ld        |   6 +-
 .../drivers/clock_control/stm32f1_clock_control.h  |   2 +
 21 files changed, 521 insertions(+), 78 deletions(-)
 create mode 100644 arch/arm/soc/st_stm32/stm32f4/Kconfig.defconfig.stm32f407xx
 create mode 100644 arch/arm/soc/st_stm32/stm32f4/Kconfig.defconfig.stm32f429xx
 create mode 100644 arch/arm/soc/st_stm32/stm32f4/flash_map.h
 rename drivers/flash/{Kconfig.stm32f3x => Kconfig.stm32fxx} (72%)
 create mode 100644 drivers/flash/flash_stm32f4x.c
Change-Id: I0e1791ccd0cf7a072ec8c481ff5510c10b98c290
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-02-22 18:12:51 -06:00
Erwan Gouriou
de684bbdaa clock_control: fix to get PLL2 source for PREDV1 working
Some fixes where needed to get PLL2 source of PREVI1 functional.
Compiled ok with following configuration:
CONFIG_CLOCK_STM32F10X_CONN_LINE_PREDIV1_SRC_PLL2CLK=y
CONFIG_CLOCK_STM32F10X_CONN_LINE_PREDIV2=0
CONFIG_CLOCK_STM32F10X_CONN_LINE_PLL2_MULTIPLIER=8

Jira: ZEP-1758

Change-Id: I5ddfaef1b44c4c4e5e6adedc158a1c9092bc8df5
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-02-22 18:09:22 -06:00
Erwan Gouriou
0aea704462 gpio: enable ports F G (and H) for stm32f1xx (stm32f4xx)
Some GPIO ports activation where missing since not used
on available soc/boards.
Since stm32 family increases, activation of these ports
should be made available.

Jira: ZEP-1551

Change-Id: I612d135b28ef255bc771599e33796671ff81d0ac
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-02-22 18:09:11 -06:00
Jorge Ramirez-Ortiz
29a8e0292e flash/stm32: driver for STM32F4x series
Change-Id: I0f90bcda7a694de81c594a6616da0faf40306702
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
2017-02-22 18:08:57 -06:00
Erwan Gouriou
d39eedbad1 arch: stm32: provide tick to Cube HAL
Cube HAL implements timeout based on 1ms tick.
This commit allows Cube HAL to get Zephyr system clock.

Change-Id: I9a59edcf6fa8e0ebfd5040348db537dadd9fcdfa
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-02-22 18:08:57 -06:00
Erwan Gouriou
ddfce25f17 dts: minor update for nucleo_l476rg
Move SRAM and flash nodes out of stm32l476.dtsi
RAM and Flash sizes depend on last letter ("G" in the case).
Hence it must be defined out of soc description file
Update information for leds

Change-Id: I980129c44c335322ddbe57252a7001296094c7cb
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-02-22 18:08:57 -06:00
Gustavo Denardin
3fdfcfc94f arm: Support for new STM32F4 socs (STM32F407 and STM32F429)
In order to support the discovery STM32F4 and STM32F429 boards,
it is necessary to make these socs available.

Change-Id: I351d294fb02c4385f291a6e258a3f7d81e85627e
Signed-off-by: Gustavo Denardin <gustavo.denardin@gmail.com>
2017-02-22 18:08:57 -06:00
Marti Bolivar
bf2d34ba30 arm: cortex-m: allow configurable ROM offset
Currently, ARM Cortex-M image ROMs are linked starting at the flash
device's base address (CONFIG_FLASH_BASE_ADDRESS). This prevents XIP
Zephyr applications from being linked to run from elsewhere on the
flash device. Linking Zephyr applications to run from elsewhere can be
necessary when running under a bootloader (i.e., booting into a Zephyr
application from a bootloader, not using Zephyr as a bootloader).

To enable this use case, add a new config option: FLASH_LOAD_OFFSET.
This option directs the linker to treat ROM as if it started that many
bytes from the base of flash on Cortex-M targets. The option defaults
to zero to preserve backwards compatibility.

Change-Id: I64f82aee257c19c2451f9789b0ab56999775b761
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-02-22 18:08:57 -06:00
Andy Ross
c6e27a05c2 quark_se: Don't enable UART 0 always
The defconfigs would always create a device for UART 0, which is
problematic in circumstances where both the x86 and ARC cores are
alive and one wants to use it in a non-default configuration.

Specifically: on Arduino 101 this is the bluetooth device and it
operates at 1MBps instead of of 115200kbps.  If an x86 app sets this
up correctly, but then starts the ARC core running an app which
doesn't reference this UART at all, the device will still exist and
set up the (wrong!) configuration, clobbering the correct settings.

Just remove the "def-bool y" bits from the defconfig.  There's no
need, users of these devices (e.g. the console) will enable them
anyway.  There's no value to compiling it in without a configured
user.

Issue: ZEP-1677
Change-Id: I4a0e944f23705495433e9f3d0459065f131579cb
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2017-02-22 22:42:25 +00:00
Andrew Boie
b8d57738b8 cortex_m_systick: fix _timer_cycle_get_32() race
We need to account for the interrupt happening in the middle
of the calculation.

Issue: ZEP-1546
Change-Id: I193534856d7521cac7ca354d3e5b65e93b984bb1
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-22 18:45:36 +00:00
Jukka Rissanen
1839cabe14 Merge net branch into master
Main changes:

- MQTT compiler warning fix.
- Fixes to NXP MCR20A driver for IEEE 802.15.4.
- Link (MAC) short address fixes for IEEE 802.15.4.
- TCP memory leak fixes.
- SLIP fixes.
- More fixes to build errors in net when using ISSM's llvm/icx
  compiler.
- Added Nordic IEEE 802.15.4 driver for nrf5.

----------------------------------------------------------------
Flavio Santes (1):
      tests/mqtt: Fix compiler warnings in MQTT Packet test case

Johann Fischer (1):
      drivers: mcr20a: cleanup and refactor interrupt processing

Jukka Rissanen (6):
      net: Add network link technology type to linkaddr
      net: Set the network link address type when setting link address
      net: nbuf: Set the link address type in nbuf
      net: ipv6: IEEE 802.15.4 short address fix
      net: buf: net_buf_frag_del() had insufficient debugging
      drivers/ieee802154/pipe: Use net_nbuf_unref to release net_buf

Michael Scott (1):
      net: context: let tcp_established() handle more TCP states

Ravi kumar Veeramally (5):
      net: context: Fix invalid order of statements
      drivers: slip: Remove unused variables
      drivers: slip: Add more comments for slip write scenario
      drivers: slip: Skip buffer allocation for incomplete packet
      net: tcp: Retransmit buffers are not freed on tcp_release

Tomasz Bursztyka (2):
      net: Fix stack type
      net/utils: Fix parameters type

Wojciech Bober (5):
      ext: Import Nordic 802.15.4 radio driver
      ext: Integrate Nordic's 802.15.4 radio driver into Zephyr
      drivers/net/ieee802154: nRF5 802.15.4 radio driver
      samples/net: ieee802154: Add configuration for nrf5
      samples/net/ieee802154: Update example with nrf5 802.15.4

 drivers/ethernet/eth_enc28j60.c                    |    3 +-
 drivers/ethernet/eth_mcux.c                        |    3 +-
 drivers/ethernet/eth_sam_gmac.c                    |    3 +-
 drivers/ieee802154/Kconfig                         |    2 +
 drivers/ieee802154/Kconfig.nrf5                    |   72 +
 drivers/ieee802154/Makefile                        |    1 +
 drivers/ieee802154/ieee802154_cc2520.c             |    2 +-
 drivers/ieee802154/ieee802154_mcr20a.c             |  693 ++++----
 drivers/ieee802154/ieee802154_mcr20a.h             |    6 +-
 drivers/ieee802154/ieee802154_nrf5.c               |  411 +++++
 drivers/ieee802154/ieee802154_nrf5.h               |   59 +
 drivers/ieee802154/ieee802154_uart_pipe.c          |    4 +-
 drivers/slip/slip.c                                |   79 +-
 ext/hal/Kbuild                                     |    1 +
 ext/hal/nordic/Kconfig                             |    6 +-
 ext/hal/nordic/Makefile                            |    4 +
 ext/hal/nordic/drivers/Kbuild                      |   33 +
 ext/hal/nordic/drivers/Makefile                    |    3 +
 ext/hal/nordic/drivers/README.md                   |  128 ++
 ext/hal/nordic/drivers/nrf_drv_radio802154.c       | 1649 ++++++++++++++++++++
 ext/hal/nordic/drivers/nrf_drv_radio802154.h       |  348 +++++
 include/net/buf.h                                  |    8 +
 include/net/nbuf.h                                 |    9 +
 include/net/net_core.h                             |    2 +-
 include/net/net_if.h                               |    5 +-
 include/net/net_ip.h                               |   23 +-
 include/net/net_linkaddr.h                         |   20 +
 samples/net/echo_client/prj_nrf5.conf              |   55 +
 samples/net/echo_server/prj_nrf5.conf              |   54 +
 samples/net/ieee802154/hw/prj_nrf5.conf            |   50 +
 samples/net/ieee802154/hw/src/ieee802154_test.c    |    4 +
 subsys/net/buf.c                                   |   11 +
 subsys/net/ip/l2/bluetooth.c                       |    6 +-
 subsys/net/ip/l2/dummy.c                           |    2 +
 subsys/net/ip/l2/ethernet.c                        |    2 +
 subsys/net/ip/l2/ieee802154/ieee802154.c           |    2 +
 subsys/net/ip/net_context.c                        |    6 +-
 subsys/net/ip/tcp.c                                |    8 +
 subsys/net/ip/utils.c                              |    4 +-
 tests/net/6lo/src/main.c                           |    2 +-
 tests/net/arp/src/main.c                           |    2 +-
 tests/net/context/src/main.c                       |    3 +-
 tests/net/dhcpv4/src/main.c                        |    2 +-
 tests/net/ieee802154/fragment/src/main.c           |    2 +-
 .../net/ieee802154/l2/src/ieee802154_fake_driver.c |    2 +-
 tests/net/iface/src/main.c                         |    3 +-
 tests/net/ip-addr/src/main.c                       |    2 +-
 tests/net/ipv6/src/main.c                          |    3 +-
 tests/net/lib/mqtt_packet/src/mqtt_packet.c        |   34 +-
 tests/net/mgmt/src/mgmt.c                          |    2 +-
 tests/net/route/src/main.c                         |    3 +-
 tests/net/rpl/src/main.c                           |    3 +-
 tests/net/tcp/src/main.c                           |    2 +-
 tests/net/udp/src/main.c                           |    2 +-
 54 files changed, 3406 insertions(+), 442 deletions(-)
 create mode 100644 drivers/ieee802154/Kconfig.nrf5
 create mode 100644 drivers/ieee802154/ieee802154_nrf5.c
 create mode 100644 drivers/ieee802154/ieee802154_nrf5.h
 create mode 100644 ext/hal/nordic/drivers/Kbuild
 create mode 100644 ext/hal/nordic/drivers/Makefile
 create mode 100644 ext/hal/nordic/drivers/README.md
 create mode 100644 ext/hal/nordic/drivers/nrf_drv_radio802154.c
 create mode 100644 ext/hal/nordic/drivers/nrf_drv_radio802154.h
 create mode 100644 samples/net/echo_client/prj_nrf5.conf
 create mode 100644 samples/net/echo_server/prj_nrf5.conf
 create mode 100644 samples/net/ieee802154/hw/prj_nrf5.conf

Change-Id: I727a2f97fbb7f443a5f947bb4ca7e4274695737b
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-22 17:31:42 +02:00
Jukka Rissanen
c85127db80 drivers/ieee802154/pipe: Use net_nbuf_unref to release net_buf
Using net_nbuf_unref to release the net_buf so that we can
debug the allocations more easily. It is ok to use the original
net_buf_unref() too, we just miss some important net_buf
housekeeping information if done like that.

Change-Id: Ieb7b39ed525bfc46eb5c07a01f2a3a75fdbeb9fd
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-22 17:28:26 +02:00
Jukka Rissanen
75c48fcbf2 net: buf: net_buf_frag_del() had insufficient debugging
In order to see who is freeing the fragment, add function
and line information to net_buf_frag_del() when net_buf
debugging is activated.

Change-Id: I732f579fab2390cb16804cb35b83f46e65fca342
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-22 17:28:26 +02:00