Commit Graph

13914 Commits

Author SHA1 Message Date
Kumar Gala ed70ea7108 arm: linker: remove unused linker sections
We don't use __scs or __scp anymore so we can remove the related linker
script and various defines and such associated with them.

Change-Id: Ibbbe27c23a3f2b816b992dfdeb4f80cf798e0d40
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-28 15:26:39 -05:00
Kumar Gala 62b0750499 arm: soc: ti_lm3s6965: remove dead code
Nothing calls _ScpMainOscEnable, so lets remove it and associated files
that aren't used anymore.

Change-Id: Ibe900d039c531c4da56baa673d309ee961b09e52
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-28 15:26:38 -05:00
Gustavo Denardin 94abb1f7fb arm: Support for new ARM board FRDM-KL25Z
In order to allow the use of such board, a very preliminar port was
developed. It consists of board files, as well as pinmux, uart, gpio,
spi drivers and device tree files.

Change-Id: I5753064e39e0b023cf4481744c176de26d8dbebb
Signed-off-by: Gustavo Denardin <gustavo.denardin@gmail.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-28 15:26:38 -05:00
Kumar Gala 567b733e76 arm: ti: dts: fixup building CC3200 dts
The CC3200 doesn't have on chip flash, so we should be including it in
the dts.

Change-Id: I8d4bbe2b09ed1aa563efe4c979da1f4729b93534
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-28 15:26:38 -05:00
Kumar Gala 62d2d362ac arm: nxp: kl2x: Move to using UART_MCUX_LPSCI for UART0
Cleanup soc code to enable UART_MCUX_LPSCI to support UART0.

Change-Id: I173febffcffc902f228946124e0434f122a67607
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-28 15:26:38 -05:00
Kumar Gala ed467a695a serial: mcux: Shim driver for LPSCI UART on KL25Z
Adds a shim layer around the mcux lpsci driver to adapt it to the Zephyr
serial interface.

Change-Id: I024f1605e3194f34bb57e8a121900e05b3085a82
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-28 15:26:38 -05:00
Erwan Gouriou eee56a7c10 soc: stm32l4xx: add support for STM32L475XG
Add support for STM32L475xG SoC as a preliminary for
Discovery IOT board support.
stm32l476.dtsi file is now including stm32l475.dtsi
since STM32L476 SoC is a STM32L475 SoC with LCD support

Change-Id: I7567255e4172231cbf4899474617ecae0cd68d64
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-04-28 15:26:38 -05:00
Erwan Gouriou 288a9c145d driver: clock control stm32: align f4 factor names on l4
This commits align CONFIG_ factor names between stm32f4 and stm32l4
series to enable code factorization such as use of Q_DIVISOR.
Though, it does not concatenate kconfig sections as we might use
a bit of time to see what is needed in this regard

Change-Id: Ia603406d53949abf5675b801a5448397d5ab8462
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-04-28 15:26:37 -05:00
Erwan Gouriou 424c33825c driver: uart: clock control code refactoring
Small code refactorisation in order to ease up coming
support of stm32f1 series by stm32 commom clock control
driver

Change-Id: I486cfba137cd048d65f0732e10aa29d877bb03e5
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-04-28 15:26:11 -05:00
Erwan Gouriou 242ed389a3 stm32f4: Clean references to stm32f4 specific clock control
Following activation of stm32 common clock driver for stm32f4 series
remove references to stm32f4 specific driver.

Change-Id: I372a0ea046007bcb34944d6b2b8880077583b1d3
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-04-28 15:26:11 -05:00
Erwan Gouriou 80b7bec12c soc: stm32f4: Enable LL based clock control
This commit disables native stm32f4x clock control
driver and enables stm32 LL clock control driver
for stm32f4 family

Jira: ZEP-2039

Change-Id: I98ba6c89c4a3a1f39658c5808cd47a2d1f344130
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-04-28 15:26:11 -05:00
Erwan Gouriou d3951673e4 boards: stm32f4: Provide config for LL Clock control
This commit provides CONFIG_ definitions to support
LL based clock driver on stm32f4 boards:
96b_carbon
nucleo_f401re
nucleo_f411re
This commit sticks to clock configurations previously defined.
Two changes to notice:
-HSE clock value should now be defined
-Prescaler values required as "1" should now be set to "1" instead
of "0".

Change-Id: I003bd226f198217d5e266e11fe37094773c1c62c
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-04-28 15:26:06 -05:00
Erwan Gouriou 9e558fc05a drivers: dma_stm32f4x: make driver compatible with LL Clock Driver
Following update of LL clock driver to suport F4 series,
update dma driver to support LL clock driver API.

Change-Id: Ic8ecfe4f33109204f3b5f8c22bcb9c41de81531d
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-04-28 15:06:41 -05:00
Erwan Gouriou fda01e52c2 drivers: clock control: Provide LL based clock control for stm32f4 series
This commit enables STM32Cube LL based driver for stm32f4 series.
This generic driver provides a unified API to clock driver for all
stm32 series.
LL API allows driver to be lightweight and to keep genericity across
stm32 family to ease further devlopment and maintenance.

Change-Id: Ie31ae8f433313787f9c9eda77de41925721d54dd
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-04-28 15:06:41 -05:00
Gil Pitney f3361797e3 cc3220sf: Minor board documentation updates
Added some review changes suggested by TI-er Bill Mills.

Jira: ZEP-1958

Change-Id: I892f22a5740ae7ae4dc949bc72de366e0e85d03c
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2017-04-28 15:06:41 -05:00
Gil Pitney b2b965d3e9 cc3200: Set warning to deprecate board in Zephyr v1.8
This board is being replaced by the CC3220SF LaunchXL,
which has essentially the same peripheral map, 256Kb
of SRAM, but in addition has 1Mb of on-chip secure flash.

Jira: ZEP-1958

Change-Id: I80629474cab9ce41bce3903213f5c9f148cc138a
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2017-04-28 15:06:41 -05:00
Gil Pitney 98cdbc4e32 cc3220sf: Update "baud-rate" dts property to "current-speed"
This to align with previous patch:
"dts: Align uart "baud-rate" property to device tree spec "current-speed""

Jira: ZEP-1958

Change-Id: I65328cf63e25b0378f270b5f60deb9d6a1f49b8c
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2017-04-28 15:06:41 -05:00
Gil Pitney a3e8a850f7 MAINTAINERS: Update maintainer for TI CC3220SF LaunchXL board
This replaces the cc3220s_launchxl board with the cc3220sf_launchxl
board directory.

Jira: ZEP-1958

Change-Id: I550061319d458d6ba694dbf26082f14666dd150e
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2017-04-28 15:06:41 -05:00
Gil Pitney 70040f0e11 boards: Add support for the CC3220SF_LAUNCHXL board
CC3220SF_LAUNCHXL effectively replaces the CC3200_LAUNCHXL,
with support for the CC3220SF SoC, which is an update for
the CC3200 SoC.

This is supported by the Texas Instruments CC3220 SDK.

Jira: ZEP-1958

Change-Id: I2484d3ee87b7f909c783597d95128f2b45db36f2
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2017-04-28 15:06:41 -05:00
Gil Pitney c73a1eb806 cc3220sf: Add support for the TI CC3220SF SoC
The CC3220SF is a replacement for the CC3200 SoC, comprising
a network coprocessor and Cortex-M4 MPU.

This leverages the CC3220 SDK driver peripheral library in ROM,
and some files built from ext/hal/ti/.

Jira: ZEP-1958

Change-Id: I892b212c178e05d84ff1d716dde593ced653ae6d
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2017-04-28 15:06:41 -05:00
Erwan Gouriou 9bd2a42d60 dts: Align uart "baud-rate" property to device tree spec "current-speed"
Devicetree.org specifies that serial devices property used to set
baud rate is "current-speed", while zephyr uses "baud-rate".
Align property name in order to keep zephyr dts files compatible
with device tree specification and could be re-used from/to
Linux for instance.  We also cleanup a few SoCs that set "baud-rate" in
the SoC dts and not the board.

Jira: ZEP-2048

Change-Id: I097e7439ee46fe77c628b56531772950382fafcc
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-28 15:06:40 -05:00
Gil Pitney de20a6558a cc3200: Make use of mem.h file in soc dtsi file.
This in preparation for adding a cc3220sf DTS file, which
has a different address for sram0 than the cc3200.

Also moved baud-rate out of soc dtsi file to board dts.

Jira: JEP-1958

Change-Id: I641452c0a8a6d1ad4424e132d6ef2de71d8545b4
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2017-04-28 15:06:40 -05:00
Erwan Gouriou af6ca469e8 ext: stm32cube: update stm32f1xx cube version
Update Cube version for STM32F1XX family
from version: V1.14.0
to version: V1.15.0

Add support for Low Level API on stm32f1 family

Change-Id: I8cb5fe2fd94be3a320e863c7b5ed59e4c2312e87
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-04-28 15:06:40 -05:00
Christer Weinigel cc93aceb83 usb: cdc_acm: Use 2 instead of 4 for IN BULK endpoint
The highest endpoint number supported by the STM32F4xx USB device
controller is 3.  Change the cdc_acm driver to use endpoint 2
instead of endpoint 4 so that it will work with this platform.

Change-Id: I4a3cd08f546a7fe01558528de0990156f642d93b
Signed-off-by: Christer Weinigel <christer@weinigel.se>
2017-04-28 18:48:58 +00:00
David B. Kinder f338a16dee doc: fix broken link in nordic-segger board doc
Change-Id: If39d1b015bc0313b37fcfd00be0489ee259126ef
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-04-28 16:00:47 +00:00
Mazen NEIFER 51eb081311 xtensa port: Fixed crash on interrupt handlers when logger is enabled.
This fixes ZEP-1955. The issue was that the interrupt stack frame only
allocates 4 registers. This means that if any window overflow happens,
only 4 registers can be saved. This implies that the interrupt handler
can not call functions other than using call4. If this rule is not
honored, then it will result in the registers being overwriting other
context information and thus a stack corruption.

The fix consists on using call4 for calling even t logger function,
which is by the way more optimal as the interrupt handler does not need
to save more than 4 registers when these functions are called.

Issue: ZEP-1955

Change-Id: Iacea626443d1d61d95a52253ac8ff15fc3722d2c
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
2017-04-28 15:49:01 +00:00
Jessica Wagantall 2bbaa13533 doc: Updating installation instructions
The installation instructions for Ubuntu 16.04
needed to be updated to use the correct packages
rt:40021

Change-Id: Ia6bfb66b7d24dda2556b76a495988eea20037607
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
2017-04-28 15:32:44 +00:00
Anas Nashif 8dd2a35c30 Merge "Merge net branch into master" 2017-04-28 14:54:10 +00:00
Anas Nashif da871298b4 checkpatch: per coding style, we do not allow c++ style comments
Change-Id: I933f317f2117917bf6413fa0514342f6df4c1e90
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-28 13:03:33 +00:00
Michael Scott 841a59cb0c slist/dlist: container node can't be NULL in *_PEEK_NEXT_CONTAINER
Using MPU enabled HW it was evident that a NULL access
(with offset) was happening in the TCP stack due to the
following message:
***** MPU FAULT *****
  Executing thread ID (thread): 0x20009b0c
  Faulting instruction address:  0x8034496
  Data Access Violation
  Address: 0x34
Fatal fault in essential thread! Spinning...

Turns out we are referencing a potentially de-referenced
NULL pointer in the SYS_SLIST_PEEK_NEXT_CONTAINER macro.

Let's avoid this by checking the container node for NULL.

Also fix dlist.h SYS_DLIST_PEEK_NEXT_CONTAINER with the same
issue.

Change-Id: I2e765b9af7bcaf8fb13f7c9b7e081f9e6d4928f2
Signed-off-by: Michael Scott <michael.scott@linaro.org>
2017-04-28 12:36:40 +00:00
Jukka Rissanen 943d28c51e Merge net branch into master
Main changes:

- Add IEEE 802.15.4 XCVR driver for KW41Z.
- Freedom board mcux eth driver RX fixes.
- Atmel SAM e70 Xplained driver support for MAC EEPROM.
- Network architecture documentation fixes.
- Make net-shell function available for other components.
- Slip fixes for escaping special chars.
- Added support for clearing ARP cache when needed.
- net_pkt_append() refactoring.
- BT TX packet leak fix.
- DNS fixes.
- MQTT fixes.
- RPL fixes.
- ZoAP fixes.

----------------------------------------------------------------
Andrei Emeltchenko (1):
      net: security: Use sys_put_be32() relevantly

Bogdan Davidoaia (5):
      ext: mcux: import XCVR driver for KW41Z
      ext: mcux: add OSAbstraction layer for Zephyr
      ext: mcux: add Makefiles for building the XCVR driver
      net: ieee802154: add native IEEE 802.15.4 driver for KW41Z
      samples: net: ieee802154: add KW41Z config file

Jukka Rissanen (6):
      net: tcp: Fix TCP trace value debug
      net: rpl: Do not crash if DIO message contains garbage
      drivers/eth/mcux: Fix the fragment ordering in RX
      samples/dns: Add config file for Arduino-101 and FRDM-K64F
      dns: Remove unused fields from dns_addrinfo struct
      doc: net: Fix IP stack architecture data flow pictures

Luiz Augusto von Dentz (1):
      net: bt: Fix leaking TX packets

Marti Bolivar (1):
      net/mqtt: fix race condition in mqtt_init()

Michael Scott (4):
      net/mqtt: combine mqtt_parser for PUBLISHER and SUBSCRIBER
      net/mqtt: use rlen to calculate # of QoS items in SUBACK packet
      net/mqtt: cleanup TX function unref handling
      net/mqtt: return error codes from net_context_send

Paul Sokolovsky (4):
      net: net_pkt_append: Refactor to return length of data actually added
      net: Switch to common values for SOCK_STREAM, SOCK_DGRAM
      samples: net: dns_resolve: Clarify that DNS queries aren't immediate
      net: shell: Make shell commands non-static to allow reuse.

Piotr Mienkowski (4):
      drivers: eth_sam_gmac: clean up after net_nbuf to net_pkt change
      drivers: eth_sam_gmac: support reading MAC from I2C EEPROM
      boards: sam_e70_xplained: read MAC from I2C EEPROM by default
      samples: net: remove redundant Kconfig options for sam_e70_xplained

Ravi kumar Veeramally (9):
      net: zoap: Add timeout while requesting packets
      net: zoap: Remove magic number
      net: zoap: Minor comment style fixes
      net: zoap: Remove unused struct definition
      net: zoap: Add block wise support for well-known response
      net: ipv6: Use correct API to remove router
      net: rpl: Fix router when it's timer expires
      net: rpl: Fix invalid usage of router addition api
      net: samples: Use correct API to get net pkt length

Ruslan Mstoi (1):
      drivers: slip: escape SLIP special characters in headers too

june li (1):
      net: l2: Clear arp cache when disable interface.

 boards/arm/sam_e70_xplained/Kconfig.defconfig      |   42 +
 .../networking/ip-stack-architecture.rst           |    5 +-
 doc/subsystems/networking/ip-stack-data-flow.dia   |  Bin 3735 -> 3184 bytes
 doc/subsystems/networking/ip-stack-data-flow.png   |  Bin 47931 -> 39217 bytes
 doc/subsystems/networking/ip-stack-data-flow.svg   |  117 +-
 drivers/console/telnet_console.c                   |    4 +-
 drivers/ethernet/Kconfig.sam_gmac                  |   63 +-
 drivers/ethernet/eth_mcux.c                        |   11 +-
 drivers/ethernet/eth_sam_gmac.c                    |   66 +-
 drivers/ethernet/eth_sam_gmac_priv.h               |    2 +-
 drivers/ieee802154/Kconfig                         |    2 +
 drivers/ieee802154/Kconfig.kw41z                   |   26 +
 drivers/ieee802154/Makefile                        |    1 +
 drivers/ieee802154/ieee802154_kw41z.c              |  604 +++++++
 drivers/slip/slip.c                                |   57 +-
 ext/hal/nxp/mcux/Makefile                          |   10 +
 ext/hal/nxp/mcux/middleware/Makefile               |    7 +
 ext/hal/nxp/mcux/middleware/wireless/Makefile      |    7 +
 .../framework_5.3.2/Common/EmbeddedTypes.h         |  214 +++
 .../middleware/wireless/framework_5.3.2/Makefile   |   23 +
 .../OSAbstraction/Interface/fsl_os_abstraction.h   |  598 +++++++
 .../Interface/fsl_os_abstraction_config.h          |   63 +
 .../Source/fsl_os_abstraction_zephyr.c             |   29 +
 .../XCVR/MKW41Z4/XCVR_Test/xcvr_test_fsk.c         |  210 +++
 .../XCVR/MKW41Z4/XCVR_Test/xcvr_test_fsk.h         |  149 ++
 .../framework_5.3.2/XCVR/MKW41Z4/dbg_ram_capture.c |  149 ++
 .../framework_5.3.2/XCVR/MKW41Z4/dbg_ram_capture.h |  109 ++
 .../framework_5.3.2/XCVR/MKW41Z4/fsl_xcvr.c        | 1642 ++++++++++++++++++++
 .../framework_5.3.2/XCVR/MKW41Z4/fsl_xcvr.h        |  981 ++++++++++++
 .../XCVR/MKW41Z4/fsl_xcvr_ant_config.c             |  200 +++
 .../XCVR/MKW41Z4/fsl_xcvr_ble_config.c             |  197 +++
 .../XCVR/MKW41Z4/fsl_xcvr_common_config.c          |  586 +++++++
 .../MKW41Z4/fsl_xcvr_gfsk_bt_0p3_h_0p5_config.c    |  353 +++++
 .../MKW41Z4/fsl_xcvr_gfsk_bt_0p5_h_0p32_config.c   |  340 ++++
 .../MKW41Z4/fsl_xcvr_gfsk_bt_0p5_h_0p5_config.c    |  357 +++++
 .../MKW41Z4/fsl_xcvr_gfsk_bt_0p5_h_0p7_config.c    |  341 ++++
 .../MKW41Z4/fsl_xcvr_gfsk_bt_0p5_h_1p0_config.c    |  343 ++++
 .../MKW41Z4/fsl_xcvr_gfsk_bt_0p7_h_0p5_config.c    |  353 +++++
 .../XCVR/MKW41Z4/fsl_xcvr_mode_datarate_config.c   |  206 +++
 .../XCVR/MKW41Z4/fsl_xcvr_msk_config.c             |  345 ++++
 .../framework_5.3.2/XCVR/MKW41Z4/fsl_xcvr_trim.c   |  494 ++++++
 .../framework_5.3.2/XCVR/MKW41Z4/fsl_xcvr_trim.h   |  134 ++
 .../XCVR/MKW41Z4/fsl_xcvr_zgbe_config.c            |  244 +++
 .../framework_5.3.2/XCVR/MKW41Z4/ifr_radio.c       |  349 +++++
 .../framework_5.3.2/XCVR/MKW41Z4/ifr_radio.h       |  185 +++
 include/net/arp.h                                  |    2 +
 include/net/dns_resolve.h                          |    7 +-
 include/net/net_ip.h                               |    4 +-
 include/net/net_pkt.h                              |   48 +-
 samples/net/coaps_client/src/udp.c                 |    4 +-
 samples/net/coaps_server/src/udp.c                 |    4 +-
 samples/net/dns_resolve/prj_arduino_101.conf       |   58 +
 samples/net/dns_resolve/prj_frdm_k64f.conf         |   46 +
 samples/net/dns_resolve/src/main.c                 |    5 +-
 samples/net/echo_client/prj_sam_e70_xplained.conf  |    7 -
 samples/net/echo_client/src/echo-client.c          |    2 +-
 samples/net/echo_server/prj_sam_e70_xplained.conf  |    6 -
 samples/net/http_client/src/http_client_rcv.c      |    2 +-
 samples/net/http_server/src/ssl_utils.c            |    8 +-
 samples/net/ieee802154/hw/prj_kw41z.conf           |   50 +
 samples/net/irc_bot/src/irc-bot.c                  |    2 +-
 samples/net/mbedtls_dtlsclient/src/udp.c           |    2 +-
 samples/net/mbedtls_dtlsserver/src/udp.c           |    2 +-
 samples/net/mbedtls_sslclient/src/tcp.c            |    8 +-
 samples/net/nats/src/nats.c                        |    3 +-
 samples/net/zperf/src/zperf_tcp_uploader.c         |    2 +-
 samples/net/zperf/src/zperf_udp_uploader.c         |    4 +-
 subsys/net/ip/dhcpv4.c                             |    6 +-
 subsys/net/ip/ipv6.c                               |   12 +-
 subsys/net/ip/l2/arp.c                             |   15 +-
 subsys/net/ip/l2/bluetooth.c                       |    9 +-
 subsys/net/ip/l2/ethernet.c                        |   14 +-
 subsys/net/ip/l2/ieee802154/ieee802154_security.c  |    5 +-
 subsys/net/ip/net_pkt.c                            |   17 +-
 subsys/net/ip/net_shell.c                          |   50 +-
 subsys/net/ip/net_shell.h                          |   13 +
 subsys/net/ip/rpl.c                                |   40 +-
 subsys/net/ip/tcp.c                                |    6 +-
 subsys/net/lib/dns/resolve.c                       |    2 +-
 subsys/net/lib/http/http_client.c                  |   18 +-
 subsys/net/lib/http/http_server.c                  |    9 +-
 subsys/net/lib/mqtt/mqtt.c                         |  152 +-
 subsys/net/lib/mqtt/mqtt_pkt.c                     |    2 +-
 subsys/net/lib/zoap/Kconfig                        |   21 +
 subsys/net/lib/zoap/zoap.c                         |    6 -
 subsys/net/lib/zoap/zoap_link_format.c             |  551 +++++--
 tests/net/iface/src/main.c                         |    2 +-
 tests/net/mld/src/main.c                           |    2 +-
 tests/net/net_pkt/src/main.c                       |   12 +-
 89 files changed, 10939 insertions(+), 519 deletions(-)
 create mode 100644 drivers/ieee802154/Kconfig.kw41z
 create mode 100644 drivers/ieee802154/ieee802154_kw41z.c
 create mode 100644 ext/hal/nxp/mcux/middleware/Makefile
 create mode 100644 ext/hal/nxp/mcux/middleware/wireless/Makefile
 create mode 100644 ext/hal/nxp/mcux/middleware/wireless/framework_5.3.2/Common/EmbeddedTypes.h
 create mode 100644 ext/hal/nxp/mcux/middleware/wireless/framework_5.3.2/Makefile
 create mode 100644 ext/hal/nxp/mcux/middleware/wireless/framework_5.3.2/OSAbstraction/Interface/fsl_os_abstraction.h
 create mode 100644 ext/hal/nxp/mcux/middleware/wireless/framework_5.3.2/OSAbstraction/Interface/fsl_os_abstraction_config.h
 create mode 100644 ext/hal/nxp/mcux/middleware/wireless/framework_5.3.2/OSAbstraction/Source/fsl_os_abstraction_zephyr.c
 create mode 100644 ext/hal/nxp/mcux/middleware/wireless/framework_5.3.2/XCVR/MKW41Z4/XCVR_Test/xcvr_test_fsk.c
 create mode 100644 ext/hal/nxp/mcux/middleware/wireless/framework_5.3.2/XCVR/MKW41Z4/XCVR_Test/xcvr_test_fsk.h
 create mode 100644 ext/hal/nxp/mcux/middleware/wireless/framework_5.3.2/XCVR/MKW41Z4/dbg_ram_capture.c
 create mode 100644 ext/hal/nxp/mcux/middleware/wireless/framework_5.3.2/XCVR/MKW41Z4/dbg_ram_capture.h
 create mode 100644 ext/hal/nxp/mcux/middleware/wireless/framework_5.3.2/XCVR/MKW41Z4/fsl_xcvr.c
 create mode 100644 ext/hal/nxp/mcux/middleware/wireless/framework_5.3.2/XCVR/MKW41Z4/fsl_xcvr.h
 create mode 100644 ext/hal/nxp/mcux/middleware/wireless/framework_5.3.2/XCVR/MKW41Z4/fsl_xcvr_ant_config.c
 create mode 100644 ext/hal/nxp/mcux/middleware/wireless/framework_5.3.2/XCVR/MKW41Z4/fsl_xcvr_ble_config.c
 create mode 100644 ext/hal/nxp/mcux/middleware/wireless/framework_5.3.2/XCVR/MKW41Z4/fsl_xcvr_common_config.c
 create mode 100644 ext/hal/nxp/mcux/middleware/wireless/framework_5.3.2/XCVR/MKW41Z4/fsl_xcvr_gfsk_bt_0p3_h_0p5_config.c
 create mode 100644 ext/hal/nxp/mcux/middleware/wireless/framework_5.3.2/XCVR/MKW41Z4/fsl_xcvr_gfsk_bt_0p5_h_0p32_config.c
 create mode 100644 ext/hal/nxp/mcux/middleware/wireless/framework_5.3.2/XCVR/MKW41Z4/fsl_xcvr_gfsk_bt_0p5_h_0p5_config.c
 create mode 100644 ext/hal/nxp/mcux/middleware/wireless/framework_5.3.2/XCVR/MKW41Z4/fsl_xcvr_gfsk_bt_0p5_h_0p7_config.c
 create mode 100644 ext/hal/nxp/mcux/middleware/wireless/framework_5.3.2/XCVR/MKW41Z4/fsl_xcvr_gfsk_bt_0p5_h_1p0_config.c
 create mode 100644 ext/hal/nxp/mcux/middleware/wireless/framework_5.3.2/XCVR/MKW41Z4/fsl_xcvr_gfsk_bt_0p7_h_0p5_config.c
 create mode 100644 ext/hal/nxp/mcux/middleware/wireless/framework_5.3.2/XCVR/MKW41Z4/fsl_xcvr_mode_datarate_config.c
 create mode 100644 ext/hal/nxp/mcux/middleware/wireless/framework_5.3.2/XCVR/MKW41Z4/fsl_xcvr_msk_config.c
 create mode 100644 ext/hal/nxp/mcux/middleware/wireless/framework_5.3.2/XCVR/MKW41Z4/fsl_xcvr_trim.c
 create mode 100644 ext/hal/nxp/mcux/middleware/wireless/framework_5.3.2/XCVR/MKW41Z4/fsl_xcvr_trim.h
 create mode 100644 ext/hal/nxp/mcux/middleware/wireless/framework_5.3.2/XCVR/MKW41Z4/fsl_xcvr_zgbe_config.c
 create mode 100644 ext/hal/nxp/mcux/middleware/wireless/framework_5.3.2/XCVR/MKW41Z4/ifr_radio.c
 create mode 100644 ext/hal/nxp/mcux/middleware/wireless/framework_5.3.2/XCVR/MKW41Z4/ifr_radio.h
 create mode 100644 samples/net/dns_resolve/prj_arduino_101.conf
 create mode 100644 samples/net/dns_resolve/prj_frdm_k64f.conf
 create mode 100644 samples/net/ieee802154/hw/prj_kw41z.conf

Change-Id: If3c227f05aaf77643a1de0a3a925b7919296f6d1
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-04-28 15:03:56 +03:00
Jukka Rissanen f65c06eea5 doc: net: Fix IP stack architecture data flow pictures
The TX side of network data flow was changed so update the
network architecture documentation.

Change-Id: I88680a776dfe87a8dac868cba1b536f2c926c0cd
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-04-28 15:01:12 +03:00
Michael Scott 438492843c net/mqtt: return error codes from net_context_send
Instead of returning EIO let's bubble the error from net_context_send
back up to the caller in the following functions:
mqtt_tx_connect()
mqtt_tx_disconnect()
mqtt_tx_pub_msgs()
mqtt_tx_publish()
mqtt_tx_pingreq()
mqtt_tx_subscribe()
mqtt_tx_unsubscribe()

Change-Id: I9bb4396b227b8902ac1195a97bc37eb1959b643e
Signed-off-by: Michael Scott <michael.scott@linaro.org>
2017-04-28 15:01:12 +03:00
Michael Scott 7bce4af81f net/mqtt: cleanup TX function unref handling
With CONFIG_NET_DEBUG_NET_PKT enabled, the log messages are full of
errors regarding NULL parameters passed into net_pkt_unref in almost
every TX function for handling MQTT messages:
mqtt_tx_connect()
mqtt_tx_disconnect()
mqtt_tx_pub_msgs()
mqtt_tx_publish()
mqtt_tx_pingreq()
mqtt_tx_subscribe()
mqtt_tx_unsubscribe()
mqtt_parser()

Let's clean up the unref handling so that our debug log isn't quite
so full of error spam (as opposed to the normal amount of spam from
the net buf log).

Change-Id: Ib49d1192f51abe4329e6dc9da3c51a4a36290082
Signed-off-by: Michael Scott <michael.scott@linaro.org>
2017-04-28 15:01:12 +03:00
Michael Scott fa5503fb44 net/mqtt: use rlen to calculate # of QoS items in SUBACK packet
The data->len of an inbound netbuf can be larger than a single
MQTT packet.  For instance when a PINGRESP is also included
in the same netbuf.  For this reason we should not be using
the data->len to determine how large the rest of the MQTT data is.

Specific Example: we've seen in testing that PINGRESP packets
can be included with a SUBACK packet in the same netbuf. Under
this case the current code uses the data->len incorrectly and
tries to find 3 QoS elements for the SUBACK packet when there
is only 1 (the rest of the data is for PINGRESP).

NOTE: A larger patch to iterate through the netbuf data parsing
individual MQTT packets will be needed to fix the MQTT subsys.
This patch only corrects the SUBACK parsing.

Change-Id: I7f6cebaaed9570b778d466de84331cf8c5060755
Signed-off-by: Michael Scott <michael.scott@linaro.org>
2017-04-28 15:01:12 +03:00
Michael Scott e5f1112b07 net/mqtt: combine mqtt_parser for PUBLISHER and SUBSCRIBER
Currently, app type MQTT_APP_PUBLISHER_SUBSCRIBER is not supported.
mqtt_init() will return EINVAL because the context rcv function is
either mqtt_publisher_parser or mqtt_subscriber_parser (not both).

Let's combine these functions into mqtt_parser and remove the app
type check from mqtt_init().

Change-Id: I60460e011395864706e293c997e9f8a65681b368
Signed-off-by: Michael Scott <michael.scott@linaro.org>
2017-04-28 15:01:12 +03:00
Marti Bolivar 5fab97c9d0 net/mqtt: fix race condition in mqtt_init()
We need to set the mqtt context recv function prior to calling
net_context_recv which installs the mqtt_recv callback.
If not, we risk a race condition where an unprotected reference
to mqtt->rcv(mqtt, buf) is made in mqtt_recv().

Change-Id: If90ee58f4ea6f7879ef7c12b969ba27647426acc
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-04-28 15:01:12 +03:00
Paul Sokolovsky ff3b019054 net: shell: Make shell commands non-static to allow reuse.
Some applications may want to reuse implementations of these
commands for debugging/diagnostics purpose even if they don't
use net shell per se, or implement an alternative shell.

Jira: ZEP-2064

Change-Id: I48cb66ccc41bd41a75a4eb8eb3c366316ec5a096
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2017-04-28 15:01:12 +03:00
Paul Sokolovsky ddf23f3167 samples: net: dns_resolve: Clarify that DNS queries aren't immediate
The sample in its default configuration waits for DNS server
configuration via IPv4 or IPv6 specific means. Until this
information is receives, DNS querying won't even start. Make
diagnostic messages explicit of this fact, because if user
doesn't have required services available in the network, the
sample will appear to just hang.

Jira: ZEP-2061

Change-Id: I56a5b7354a2d1239a35d8334ed95a15ebd19254f
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2017-04-28 15:01:12 +03:00
Ravi kumar Veeramally e4d8900cc6 net: samples: Use correct API to get net pkt length
net_pkt_get_len() is the correct API to get network packet
length.

Jira: ZEP-2076

Change-Id: Ifff6f3d5df28b3684cc8bb3758f9e8bccd5d4534
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-04-28 15:01:11 +03:00
Ravi kumar Veeramally ead481a041 net: rpl: Fix invalid usage of router addition api
net_if_ipv6_router_add() will return router pointer on success.
This information must be cached in RPL instance, otherwise RPL
instance doesn't know about default route.

Change-Id: Ic6d80ebfa95c9a64df9adf2621ae2631d9bdb990
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-04-28 15:01:11 +03:00
Ravi kumar Veeramally 5edf55f771 net: rpl: Fix router when it's timer expires
When router or default router timer expired, interface will remove
router from the list. In this case RPL does not know about this.
When RPL node receives DIO messages it only verifies whether parent
exists or not. This extra checks will verify whether router really
in "used" state or not.

Jira: ZEP-2080

Change-Id: I4b36b3a2d495e76a38caddd058451daff08fab0c
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-04-28 15:01:11 +03:00
Ravi kumar Veeramally d9bde9a5ab net: ipv6: Use correct API to remove router
net_if_ipv6_router_rm() is the correct API to remove IPv6 router
from the interface as it also cancels the timer and raises a mgmt
event. The net_if_router_rm() only sets router as unused and
nothing else.

Change-Id: I55114288c9ae748520b67b206edcd4f5e420b1af
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-04-28 15:01:11 +03:00
Ravi kumar Veeramally d787ccb40a net: zoap: Add block wise support for well-known response
If the ./well-known/core response is bigger than L2 MTU then
response will be sent in multiple fragments. In mesh kind of networks
getting response from farthest node might loose packets. So better to
send response in a block wise fashion. Block size is configurable.

Change-Id: Id421c66597fe448c12a7215f04f63f4a284c14ab
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-04-28 15:01:11 +03:00
Ravi kumar Veeramally 0cdfd75c7f net: zoap: Remove unused struct definition
Change-Id: I1b57972386b0def02eb125b6ae4825f11268f6ce
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-04-28 15:01:11 +03:00
Ravi kumar Veeramally 9d0a484690 net: zoap: Minor comment style fixes
Change-Id: I8f63781a39263e110aec2e6f1e14d72650ce4e30
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-04-28 15:01:11 +03:00
Ravi kumar Veeramally 6740e691e8 net: zoap: Remove magic number
Value 0xFF represents End Of Options marker in CoAP message.
Use #define than magic numbers in code.

Change-Id: I3bef21ea827987f7c2e670447ee20574cb6288ae
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-04-28 15:01:11 +03:00
Ravi kumar Veeramally 38503f8c76 net: zoap: Add timeout while requesting packets
Add timeout for packet and buffer requests. If there are no
buffers available gracefully drop the request.

Change-Id: I56fe2b606556149c83751aadc1c5eee7828a84a8
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-04-28 15:01:10 +03:00
Luiz Augusto von Dentz 86a72e1ed4 net: bt: Fix leaking TX packets
Bluetooth only cares about the actual payload so net_pkt can be unref
as soon as the data fragments are detached.

Jira: ZEP-2070
Change-Id: Id528d5440f42903378883f5e696b3f663bbfa313
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-04-28 15:01:10 +03:00
Bogdan Davidoaia efc3ba6b98 samples: net: ieee802154: add KW41Z config file
Add config file to be used for testing KW41Z's IEEE 802.15.4 driver.

Jira: ZEP-2026
Change-Id: I7042c57ad33ff72b35d24fbf28085b99b2301726
Signed-off-by: Bogdan Davidoaia <bogdan.davidoaia@linaro.org>
2017-04-28 15:01:10 +03:00