Commit Graph

12231 Commits

Author SHA1 Message Date
Jukka Rissanen 8db13f905b net: ipv6: Free received NA net_buf
If we receive a neighbor advertisement, we need to free its
net_buf because we are returning NET_OK to the caller. This
return code means that we consumed the net_buf but we did
not call net_nbuf_unref() in this case.

Change-Id: Ia6d8f1b440be87eff5d2b14a23336a37be6d6a04
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-08 10:12:35 +02:00
Jukka Rissanen f25d4768b2 net: ipv6: Fix pending buf leak when NA is received
The pending buf needs to be freed after it has been sent
to the network. We took the ref when pending buf was saved,
now we need to unref it when it is about to be sent.

Change-Id: I1e429969895700000a8aa124bd645db2d52d036c
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-08 10:12:34 +02:00
Jukka Rissanen b4ca6e8300 drivers/eth/mcux: Free net_buf using net_nbuf_unref
The driver was using net_buf_unref(). This technically works
ok but debugging the network buffer allocations is more
difficult if done like this.

Change-Id: If3453a49337c7a359c8af22cfdf331fccc697af5
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-08 10:12:34 +02:00
Jukka Rissanen b9ac440d02 samples: net: Fix invalid memory access for TCP
Set protocol family value only after the buf is verified
to be non-null.

Change-Id: I0ce7bab3539087d0f522b4bb3024f46a7eb3c15f
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-08 10:12:34 +02:00
Johann Fischer baa4939b94 drivers: mcr20a: control access to SPI with semaphore
Change-Id: I5498452d11c435ca3e4d3889ef8e9b19b031782a
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2017-02-08 10:12:34 +02:00
Wojciech Bober c84b765fdd drivers/ieee802154: Split drivers Kconfig
This commit splits 802.15.4 drivers configuration into separate files.

Change-Id: Ie1bed862e8f4248240fef18bc211d0ee8ca1493c
Signed-off-by: Wojciech Bober <wojciech.bober@nordicsemi.no>
2017-02-08 10:12:34 +02:00
Flavio Santes c2c32d24e3 samples/net/http: Add the HTTP client sample application
This patch adds a basic HTTP client sample application.
The following HTTP 1.1 methods are supported: GET, HEAD,
OPTIONS and POST.

This sample application does not define an API for HTTP,
for more information see ZEP-346.

Jira: ZEP-827

Change-Id: Iee63a53f2ef424964f040eba20326d648249fc24
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-02-08 10:12:34 +02:00
Juan Manuel Cruz 35011815f3 drivers: enc28j60: Enables reception of multicast packets
Jira: ZEP-1544

Change-Id: I96a7f9cd40612c1eaebac79845f4a3157a8f7457
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2017-02-08 10:12:34 +02:00
Anas Nashif 6fa71b8302 net: nbuf: Fix style of doxygen comment
Change-Id: I791a2b585cc008bd9101957f1ca0540be1220833
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-08 10:12:34 +02:00
Ramesh Thomas 632964e010 samples: power: Remove mention of specific versions in README
The README was referring to a specific version of the boot loader.
Since the boot loader version is expected to change in future
and Zephyr code would also correspond to that version, it is better
to not mention any specific version. Instead, the requirement
is to use the latest version of the boot loader.

Change-Id: I04082eec4af16426f6456702c521e8f61bd4e0df
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2017-02-08 06:28:25 +00:00
Flavio Santes 362a12200a net/dns: Fix inline documentation
Fix inline documentation for the dns client API.

Jira: ZEP-1669

Change-Id: I9e6ae4e1301f1e4a125b75add1a8bc7331a818b0
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-02-07 22:33:47 +00:00
Mazen NEIFER e2bbad9600 kernel: init: use C implementation for STACK_CANARY_INIT
Due to a limitation on XCC, the inline assembly does not
produce the expected instructions. This results in a wrong
code sequence. On the other hand, plain C code works well.
The note about compilers seems to not be an issue on any of
our currently supported compilers.

Change-Id: I9d2ab0fbf8a48d9dad51da3fd54453f205516d74
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-07 22:18:21 +00:00
Andrew Boie e67828ba20 tests: remove old ARM vector table test
This was ported to the new kernel, no need to keep the old one around.

Change-Id: I02d39c8e39843cee1862448296e9c1d0dfde75b9
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-07 19:52:09 +00:00
Marcus Shawcroft cf990c1e71 i2c: Elaborate API return values
Elaborate the i2c API documentation with each of the errno codes that
can be returned on failure.

Change-Id: I28a690c06b94f724053238b5eba3142fcace23f6
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-07 18:32:39 +00:00
Marcus Shawcroft 5e77af801a i2c: Name parameters consistently.
Change-Id: Ifcd6e69a42d11bf1269d82500601ff91960dd371
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-07 18:32:38 +00:00
Marcus Shawcroft ec86145adf i2c/dw: Switch from EPERM to EIO
The DW i2c driver chooses to return -EPERM following a PCI error in
driver configuration.  This seems an odd choice.  All of the other I2C
drivers return -EIO for general failures detected during driver
configuration.

Switch the DW driver from EPERM to EIO.

Change-Id: Ia4f96386620319736ae4c09212b0a05ea38169b1
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-07 18:32:37 +00:00
Marcus Shawcroft ccf16c705d i2c/stm32lx: Fix layout.
Change-Id: Ifc474ff703f96e5edd9dfd280533f4d8fe6a6853
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-07 18:32:36 +00:00
Marcus Shawcroft 32167dd644 i2c: Remove unused definition.
Remove stride[] definition from public API, this definition is not
used by any driver and appears to serve no purpose.

Change-Id: Ib7c9ad4a8e7e17884d150ee811b66db0279d0b33
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-07 18:32:36 +00:00
Marcus Shawcroft ddb6b94bd7 i2c: Implement consistent i2c no msgs behaviour
The I2C drivers handle an empty list of I2C messages inconsistenty.
There are two different behaviours, one set of drivers dectects a
requests to transfer zero messages and return -EINVAL while the other
group simple transfer no data and return success.

Adopt the latter behaviour consistently across all drivers.  Update
the i2c.h API documentation to reflect this behaviour.

Change-Id: I427fc1b0e18ddc04b7b59c294e0240b3d6ca4073
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-07 18:32:35 +00:00
Paul Sokolovsky 08e0ade38a doc: frdm_k64f: Document Eth PHY known issue
Working Ethernet, and actually even successfully booting with Ethernet
enabled (and Ethernet is enabled by default on enabling networking)
so far requires a network cable attached.

Change-Id: I9c17e417f867942ddf085db9e8342e945aa07370
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2017-02-06 22:53:30 +03:00
Marcus Shawcroft 7803123d3b gpio/nrf5: Implement port read and write
Implement the missing port read and write behaviour.

Change-Id: I0928379eddf81d806a0ae6b75a1ea2993c3a28ff
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-06 13:15:50 +00:00
Marcus Shawcroft 142bce58a2 gpio/nrf5: Fix GPIO_ACCESS_BY_PIN behaviour
Adjust the implementation of gpio_pin_read() to return 0 or 1 rather
than 0 or 2^pin.  This ensures consistent behaviour with other gpio
device drivers, and conforms to the behaviour documented in gpio.h by
the previous patch.

Change-Id: Ia02aa68105a406f355d16a3f9b0550f948658483
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-06 13:15:50 +00:00
Marcus Shawcroft f88824a0f2 gpio: Clarify API
Clarify the behaviour of gpio read and write functions.

Change-Id: Ib64f9e4bfc6e908a945fd7e17ba4073d3c707fc6
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-06 13:15:49 +00:00
Baohong Liu fd74c0c5a6 samples: bmi160: reduce polling mode sampling frequency
Reduce the accelerometer sampling frequency for polling mode.
So, cpu has more time to fetch the sample.

Also add some waiting time for the new frequency setting to
take effect.

Jira: ZEP-1532

Change-Id: If5c1d8a2b5f30b232a212f2775306ca397b9f80c
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-04 20:08:16 +00:00
Baohong Liu a96ec2351d ext: qmsi: fix an incomplete type issue
Incomplete type is not acceptable to LLVM. Let's use
pointer instead.

Jira: ZEP-1179

Change-Id: Ie6324b2e5076ae2b378fa270d0d9fdcbf29bf8ce
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2017-02-04 20:08:07 +00:00
Baohong Liu 42af60328d samples: spi_flash: remove an unnecessary config symbol
Remove CONFIG_GPIO from the prj config file. It is redundant.

Change-Id: Ife4301e7ce480a9002cadcddfd5eaa569900a391
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2017-02-04 19:45:44 +00:00
Baohong Liu 08f5c26115 drivers: bmi160: add sample ready check
Add sensor sample ready check before fetching the sample.
Otherwise, invalid value will be returned.

Jira: ZEP-1532 ZEP-1358

Change-Id: I570151c8ae93fbb744dac857521f596fd63806a6
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2017-02-04 19:45:31 +00:00
Sharron LIU de7435a73f tests: kernel: mem_heap: added api and concept tests
<kernel.h> APIs covered:
    k_malloc
    k_free
Concept TESTPOINTs extracted from
https://www.zephyrproject.org/doc/kernel/memory/heap.html#concepts

ZEP-1242

Change-Id: I39edc809119984585d78d6abbe33f5be707c5818
Signed-off-by: Sharron LIU <sharron.liu@intel.com>
2017-02-04 19:36:50 +00:00
Tim Nordell 93801c6447 arm: Adjust entry point of XIP kernels to the __reset function
The entry point specified in the elf file should always point to
executable code, and not to the interrupt vector table.  Pointing to the
vector table as the entry point in the elf file presents problems with
running the kernel against a debugger as the debugger starts the program
counter at the top of the interrupt vector table.

Change-Id: I76051f6e99a44bab72936670bead5fb8191a6ec7
Signed-off-by: Tim Nordell <tim.nordell@nimbelink.com>
2017-02-04 19:32:40 +00:00
jing wang 61e5438c51 tests: add zephyr i2c driver api test
the commit verify below i2c apis by sensor
GY271 or HMC58831
    i2c_configure()
    i2c_write()
    i2c_read()
    i2c_burst_write()
    i2c_burst_read()

Change-Id: I072a9897a45636613e811baa7ff79b57206e4130
Signed-off-by: jing wang <jing.j.wang@intel.com>
2017-02-04 19:31:31 +00:00
Anas Nashif 4fb12ae988 kernel: k_timer_stop: remove assert when called from an ISR
Change-Id: I596e0323a7aafc9d7f3834a8d1b655ad2540d4ef
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-04 19:25:11 +00:00
Andrew Boie c2a91b1b2e libc: minimal: rename private macro
As it turns out Xtensa SDK headers also define _Restrict, causing
havoc. As this was intended to be a private macro, rename it to something
less likely to cause a collision.

Change-Id: I0a7501a1af8cf87efb096872a91a7b44bd2bbdca
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-04 19:22:07 +00:00
Baohong Liu 6b5af856d3 boards: arduino_101_sss: use new gpio device name
Use new gpio device name for bmi160 device.

Change-Id: I0154173aa13f8e578b81469ee161d9aa9b378a65
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2017-02-04 19:21:08 +00:00
Baohong Liu a1b8ed0ac6 quark_se: sensor: use consistent device names for GPIO, SPI and I2C
Rename devices. For example, the two i2c devices in the
quark se sensor sub-system will have name string "I2C_0"
and "I2C_1", while the other two i2c devices accessible to
both x86 and arc will have name string "I2C_2" and "I2C_3".
This is valid only when you build arc binary. 

It does not apply if you build x86 or arm binary. Similar change is
also made for GPIO and SPI.

Jira: ZEP-1588 ZEP-1614

Change-Id: Ibad4486e70e0aaf287763514a5a9d28b43bca094
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2017-02-04 19:21:08 +00:00
Anas Nashif 19e56a049a boards: sam e70: add openocd file for SAM E70
This works with openocd 0.10 only.

Change-Id: I0a56701976ac01f3a80e73f00da9c75b4b0e123d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-04 02:58:07 +00:00
Anas Nashif 648ecef7bd sanitcheck: add sam_e70_xplained
Change-Id: Ic16f6132b701b4e2079939302473e5e5b295dc59
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-04 02:57:49 +00:00
Piotr Mienkowski 9670dc582d ext: Atmel ASF: remove unused and broken preprocesor macros
Header files from Atmel ASF define several preprocesor macros
which are unused and break compilation with some toolchains.
This patch removes those macros. Currently only from same70q21.h
header file which is used by SAM E70 Xplained target board.

Jira: ZEP-976
Change-Id: I13adb92c73773815c6df221ef33b0f56795f1d8c
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2017-02-04 02:53:08 +00:00
Anas Nashif 268fa152f2 scripts: add configuration file for uncrustify
Use this configuration file with the uncrustify tool to fix style
issues. the configuration should apply the zephyr coding style on
source code files with a few minor excrption. Do not take the output for
granted, always check for correctness after running.

To use, for example:

uncrustify --replace --no-backup -l C -c $ZEPHYR_BASE/scripts/uncrustify.conf

This will do the changes inline.

Change-Id: Iecfd2e10bc7e475ca83de0d921ebb5d72156d286
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-04 01:46:29 +00:00
David B. Kinder e23099bcc4 doc: add cross-references to hello_world sample
Change-Id: I23c4d361251251cce8887dd67be2e548f7365491
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-02-03 22:57:05 +00:00
Jean-Paul Etienne aa58ba2e92 MAINTAINERS: added maintainer for riscv32
Change-Id: Iceecb77e9a537e142235147cd2c91a8aeccb52ca
Signed-off-by: Jean-Paul Etienne <fractalclone@gmail.com>
2017-02-03 19:31:41 +01:00
Jean-Paul Etienne 47e2f4e3d7 riscv32: added a generic linker script for the riscv32 platform
Added a linker script that shall be common to most riscv SOCs.
Linker script also accounts for execution in place in ROM, when
CONFIG_XIP is set.

Nonetheless, riscv32 SOCs (like pulpino) requiring a different
system layout can still define their own linker script.

Change-Id: I3ad670446d439772c29a8204e307ac79643dc650
Signed-off-by: Jean-Paul Etienne <fractalclone@gmail.com>
2017-02-03 19:20:52 +01:00
Jean-Paul Etienne c989f0b408 riscv32: timer: replace riscv_qemu_driver by the generic riscv_machine_driver
riscv defines the machine-mode timer registers that are implemented
by the all riscv SOCs that follow the riscv privileged architecture
specification.

The timer registers implemented in riscv-qemu follow this specification.
To account for future riscv SOCs, reimplement the riscv_qemu_driver by
the riscv_machine_driver.

Change-Id: I645b03c91b4e07d0f2609908decc27ba9b8240d4
Signed-off-by: Jean-Paul Etienne <fractalclone@gmail.com>
2017-02-03 19:20:52 +01:00
Andrew Boie e01dd87377 x86: implement direct interrupts
Change-Id: Icac461a361dde969f023e7aa11f0605a97a3c009
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-03 18:18:30 +00:00
Flavio Santes 5a4ae76eaa MAINTAINERS: Update network applications section
Update the network applications section now that the http_server
and mqtt_publisher sample apps were merged.

Change-Id: I65dd568b7f92a1f7c89f7aa4f876f53a32ecb878
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-02-03 17:55:52 +00:00
Anas Nashif 57683bc01f doc: reference bluetooth section of Arduino 101
Change-Id: Ide11ac9e22c175603791c6a3b65a64fa12fe6d5c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-03 17:55:04 +00:00
Johan Hedberg dc42b2df43 net: buf: Fix timeout parameter documentation
The timeout given to APIs is in milliseconds and not ticks.

Change-Id: Iae198ca3aee326c19d0894a22f6e5cfca19ba131
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-02-03 15:24:07 +00:00
Jukka Rissanen 792c0209f1 Merge net branch into master
Main changes:

- Documentation enhancements and fixes
- TCP fixes
- MQTT fixes
- HTTP server sample application
- IRC sample application
- DNS sample application fixes
- Zperf sample application fixes
- IEEE 802.15.4 fixes
- ZoAP server fixes
- BT IPSP fixes

----------------------------------------------------------------
Anas Nashif (3):
      doc: update networking with Qemu section
      doc: net: use Qemu setup section in current documentation
      doc: net: restructure networking documentation

Andy Ross (5):
      net: tcp: Clean up net_context lifecycle
      net: tcp: Don't send active close FIN packets synchronously
      net: tcp: Clean up FIN handling
      net: net_context: Drop callbacks in net_context_put()
      net: tcp: Add optional TIME_WAIT support

Flavio Santes (11):
      net/mqtt: Move upwards buffer size validation
      net/mqtt: Simplify the MQTT high-level API
      net/mqtt: Add the "malformed" callback to the MQTT ctx structure
      net/mqtt: Validate null or app level zero-length rx buffers
      net/mqtt: Add the MQTT Publisher sample application
      net/mqtt: Remove redundant line
      samples/net/dns: Add the FRDM_K64F board to the testcase.ini file
      samples/net/dns: Move conf variables to config.h and delete unused defines
      samples/net/dns: Improve network configuration
      samples/net/dns: Update README file
      samples/net/http: Add the HTTP server sample application

Jorge Ramirez-Ortiz (1):
      net/mqtt: Check function return value

Jukka Rissanen (16):
      net: tcp: Call connect callback later
      net: Increasing the default number of network contexts
      samples: zperf: Use native IP stack for TCP support
      samples: zperf: Enable TCP for zperf configuration
      doc: net: Migrate from Zephyr 1.6 to 1.7
      net: nbuf: Removing dead code from net_nbuf_compact()
      net: tests: Add unit tests for net_nbuf_compact()
      tests: net: rpl: Fix unicast NS sending
      tests: net: Add tests for network interface
      net: nbuf: Do no use timeout if called from isr
      net: stats: Collect bytes sent and received
      net: ipv6: Use the nexthop when sending the packet
      samples: net: zperf: Initialize address family properly
      samples: net: zperf: Fix udp.upload command
      samples: net: zperf: Fix compiler warnings
      samples: net: zperf: Set the proper UDP payload

Julien Chevrier (1):
      net: iface: Fix bad comparisons in net_if

Kumar Gala (1):
      net: ip: stat: fix typo in rpl.dio.sent stat

Leandro Pereira (1):
      samples: net: Add IRC bot example

Luiz Augusto von Dentz (5):
      net: bt: Fix failing to resolve link-local address
      net: Add ll addresses on net_if_send_data
      net: Introduce NET_IF_POINTOPOINT flag
      net: bt: Add Kconfig to interoperate with Linux
      net: samples: Add CONFIG_NET_L2_BLUETOOTH_ZEP1656

Michael Scott (24):
      net: correct in*_addr parameter of net_addr_pton()
      samples: net: irc_bot: run sample process as a thread
      samples: net: irc_bot: establish privmsg callback typedef
      samples: net: irc_bot: release net_context reference upon error
      samples: net: irc_bot: remove unneeded typecasts and extra var
      samples: net: irc_bot: add helper function in_addr_set()
      samples: net: irc_bot: remove sockaddr globals
      samples: net: irc_bot: make panic() more accessible
      samples: net: irc_bot: use #defines for server and port
      samples: net: irc_bot: make some functions more accessible
      samples: net: irc_bot: simplify connect path
      samples: net: irc_bot: expand some char buffers
      samples: net: irc_bot: fix null pointer deref
      samples: net: irc_bot: use irc parameter's connection
      samples: net: irc_bot: dont hardcode NET_SYS_LOG_LEVEL
      samples: net: irc_bot: modify disco check in on_context_recv()
      samples: net: irc_bot: create semi-unique IRC user names
      samples: net: irc_bot: handle messages across multiple fragments
      samples: net: irc_bot: add Linaro copyright
      samples: net: irc_bot: add FRDM K64F project .conf
      samples: net: irc_bot: add IPv4 support
      samples: net: irc_bot: add DNS support
      samples: net: irc_bot: add DHCPv4 support
      net: tcp: Only return -ETIMEDOUT if timeout!=0 in connect

Paul Sokolovsky (1):
      net: echo_server: Enable TCP for frdm_k64f

Ravi kumar Veeramally (5):
      net: tests: Add unit tests for net_addr_pton() utils function
      net: utils: Add net_addr_ntop() helper function
      net: tests: Add unit tests for net_addr_ntop() utils function
      net: context: Skip reserved ports
      net: context: Assign a random port number when context is created

Sergio Rodriguez (1):
      driver: ethernet: Fix typo on enc28j60 driver Kconfig

Tomasz Bursztyka (10):
      samples/net: Fix a tiny mistake in dhcpv4_client README.rst
      samples/net: Add a simple telnet sample
      doc: Include main Network APIs doxygen documentation
      doc/api/networking: Add existing network protocol libraries APIs
      net/ieee802154: Set IEEE extended address whatever runtime mode it is
      net/ieee802154: Setting short address is about local node
      net/ieee802154/mgmt: Add getters/setters for various radio network info
      net/ieee802154/shell: Add commands to set/get radio network info
      net/ieee802154: Fixing active scan buffer reference counting
      net/ipv6: Updating ll reserve should be done for all IPv6 packet.

Vinicius Costa Gomes (5):
      samples/zoap_server: Enable support for 802.15.4
      samples/zoap_server: Allow overriding the BOARD variable
      samples/zoap_server: Add a 802.15.4 case to the test suite
      iot/zoap: Fix the return value of zoap_packet_get_payload()
      samples/zoap_server: Fix errors for GET requests without payloads

 .known-issues/doc/networking.conf                |  49 ++
 doc/api/api.rst                                  |   1 +
 doc/api/networking.rst                           |  66 ++
 doc/subsystems/networking/ip-stack-migrate.rst   |  61 ++
 doc/subsystems/networking/networking.rst         |  61 +-
 doc/subsystems/networking/overview.rst           |  58 ++
 doc/subsystems/networking/qemu_setup.rst         | 158 ++++
 drivers/ethernet/Kconfig.enc28j60                |   2 +-
 include/net/dhcpv4.h                             |  10 +
 include/net/dns_client.h                         |  10 +
 include/net/ieee802154.h                         |  33 +-
 include/net/mqtt.h                               |  74 +-
 include/net/mqtt_types.h                         |  10 +
 include/net/net_context.h                        |  79 +-
 include/net/net_if.h                             |  20 +
 include/net/net_ip.h                             |  28 +-
 include/net/net_mgmt.h                           |  11 +
 include/net/net_stats.h                          |  17 +
 include/net/zoap.h                               |  15 +-
 include/net/zoap_link_format.h                   |  10 +
 samples/bluetooth/ipsp/prj.conf                  |   1 +
 samples/bluetooth/ipsp/src/main.c                |   2 +-
 samples/net/coaps_client/README.rst              |   4 -
 samples/net/coaps_client/src/udp.c               |   2 +-
 samples/net/coaps_server/README.rst              |   1 -
 samples/net/coaps_server/src/coaps_server.c      |   2 +-
 samples/net/dhcpv4_client/README.rst             |  19 +-
 samples/net/dns_client/README.rst                |  44 +-
 samples/net/dns_client/prj_arduino_101.conf      |  11 +-
 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              |  29 +-
 samples/net/dns_client/src/main.c                | 170 ++--
 samples/net/dns_client/testcase.ini              |   2 +-
 samples/net/echo_client/src/echo-client.c        |   8 +-
 samples/net/echo_server/prj_bt.conf              |   1 +
 samples/net/echo_server/prj_frdm_k64f.conf       |   1 +
 samples/net/echo_server/src/echo-server.c        |   4 +-
 samples/net/http_server/Makefile                 |  13 +
 samples/net/http_server/README.rst               | 232 ++++++
 samples/net/http_server/prj_frdm_k64f.conf       |  29 +
 samples/net/http_server/src/Makefile             |  10 +
 samples/net/http_server/src/config.h             |  28 +
 samples/net/http_server/src/http_server.c        | 409 ++++++++++
 samples/net/http_server/src/http_server.h        |  51 ++
 samples/net/http_server/src/http_types.h         |  98 +++
 samples/net/http_server/src/http_utils.c         |  51 ++
 samples/net/http_server/src/http_utils.h         |  18 +
 samples/net/http_server/src/http_write_utils.c   | 183 +++++
 samples/net/http_server/src/http_write_utils.h   |  63 ++
 samples/net/http_server/src/main.c               | 142 ++++
 samples/net/http_server/testcase.ini             |   4 +
 samples/net/irc_bot/Makefile                     |  24 +
 samples/net/irc_bot/prj_frdm_k64f.conf           |  36 +
 samples/net/irc_bot/prj_qemu_x86.conf            |  33 +
 samples/net/irc_bot/src/Makefile                 |   1 +
 samples/net/irc_bot/src/irc-bot.c                | 940 +++++++++++++++++++++++
 samples/net/mbedtls_dtlsclient/README.rst        |   4 -
 samples/net/mbedtls_dtlsclient/src/dtls_client.c |   4 +-
 samples/net/mbedtls_dtlsclient/src/udp.c         |   4 +-
 samples/net/mbedtls_dtlsserver/README.rst        |   1 -
 samples/net/mbedtls_dtlsserver/src/dtls_server.c |   4 +-
 samples/net/mqtt_publisher/Makefile              |  14 +
 samples/net/mqtt_publisher/README.rst            | 236 ++++++
 samples/net/mqtt_publisher/prj_frdm_k64f.conf    |  36 +
 samples/net/mqtt_publisher/src/Makefile          |   8 +
 samples/net/mqtt_publisher/src/config.h          |  37 +
 samples/net/mqtt_publisher/src/main.c            | 410 ++++++++++
 samples/net/mqtt_publisher/testcase.ini          |   4 +
 samples/net/net.rst                              |   1 -
 samples/net/qemu_setup.rst                       |  31 -
 samples/net/telnet/Makefile                      |  14 +
 samples/net/telnet/README.rst                    | 137 ++++
 samples/net/telnet/prj_frdm_k64f.conf            |  44 ++
 samples/net/telnet/prj_qemu_x86.conf             |  43 ++
 samples/net/telnet/prj_qemu_x86_iamcu.conf       |  43 ++
 samples/net/telnet/src/Makefile                  |   2 +
 samples/net/telnet/src/telnet.c                  | 150 ++++
 samples/net/telnet/testcase.ini                  |   5 +
 samples/net/zoap_client/prj_bt.conf              |   1 +
 samples/net/zoap_server/Makefile                 |   2 +-
 samples/net/zoap_server/README.rst               |   7 +
 samples/net/zoap_server/prj_bt.conf              |   1 +
 samples/net/zoap_server/prj_cc2520.conf          |  15 +
 samples/net/zoap_server/src/zoap-server.c        |  30 +-
 samples/net/zoap_server/testcase.ini             |   6 +
 samples/net/zperf/README.rst                     |  38 +-
 samples/net/zperf/prj_bt.conf                    |   1 +
 samples/net/zperf/prj_frdm_k64f.conf             |   2 +-
 samples/net/zperf/src/zperf.h                    |   1 +
 samples/net/zperf/src/zperf_internal.h           |   1 +
 samples/net/zperf/src/zperf_shell.c              | 141 +++-
 samples/net/zperf/src/zperf_tcp_receiver.c       | 282 +++++--
 samples/net/zperf/src/zperf_tcp_uploader.c       |  89 ++-
 samples/net/zperf/src/zperf_udp_uploader.c       |  28 +-
 subsys/net/ip/Kconfig                            |  14 +-
 subsys/net/ip/ipv6.c                             | 106 ++-
 subsys/net/ip/l2/Kconfig                         |  11 +
 subsys/net/ip/l2/bluetooth.c                     |  41 +-
 subsys/net/ip/l2/ethernet.c                      |  63 +-
 subsys/net/ip/l2/ieee802154/ieee802154.c         |  24 +-
 subsys/net/ip/l2/ieee802154/ieee802154_mgmt.c    |  80 +-
 subsys/net/ip/l2/ieee802154/ieee802154_shell.c   | 101 +++
 subsys/net/ip/nbuf.c                             |  19 +-
 subsys/net/ip/net_context.c                      | 467 +++++------
 subsys/net/ip/net_core.c                         |  12 +-
 subsys/net/ip/net_if.c                           |  45 +-
 subsys/net/ip/net_private.h                      |  25 +-
 subsys/net/ip/net_shell.c                        |  11 +-
 subsys/net/ip/net_stats.c                        |  11 +-
 subsys/net/ip/net_stats.h                        |  12 +
 subsys/net/ip/tcp.c                              |  65 +-
 subsys/net/ip/tcp.h                              |  11 +-
 subsys/net/ip/utils.c                            |  44 +-
 subsys/net/lib/mqtt/mqtt.c                       |  53 +-
 subsys/net/lib/zoap/zoap.c                       |   7 +-
 tests/net/iface/Makefile                         |   4 +
 tests/net/iface/prj.conf                         |  22 +
 tests/net/iface/src/Makefile                     |   4 +
 tests/net/iface/src/main.c                       | 376 +++++++++
 tests/net/iface/testcase.ini                     |   4 +
 tests/net/nbuf/src/main.c                        | 172 +++++
 tests/net/rpl/src/main.c                         |  18 +-
 tests/net/utils/src/main.c                       | 377 ++++++++-
 124 files changed, 6560 insertions(+), 975 deletions(-)
 create mode 100644 .known-issues/doc/networking.conf
 create mode 100644 doc/api/networking.rst
 create mode 100644 doc/subsystems/networking/ip-stack-migrate.rst
 create mode 100644 doc/subsystems/networking/overview.rst
 create mode 100644 doc/subsystems/networking/qemu_setup.rst
 create mode 100644 samples/net/http_server/Makefile
 create mode 100644 samples/net/http_server/README.rst
 create mode 100644 samples/net/http_server/prj_frdm_k64f.conf
 create mode 100644 samples/net/http_server/src/Makefile
 create mode 100644 samples/net/http_server/src/config.h
 create mode 100644 samples/net/http_server/src/http_server.c
 create mode 100644 samples/net/http_server/src/http_server.h
 create mode 100644 samples/net/http_server/src/http_types.h
 create mode 100644 samples/net/http_server/src/http_utils.c
 create mode 100644 samples/net/http_server/src/http_utils.h
 create mode 100644 samples/net/http_server/src/http_write_utils.c
 create mode 100644 samples/net/http_server/src/http_write_utils.h
 create mode 100644 samples/net/http_server/src/main.c
 create mode 100644 samples/net/http_server/testcase.ini
 create mode 100644 samples/net/irc_bot/Makefile
 create mode 100644 samples/net/irc_bot/prj_frdm_k64f.conf
 create mode 100644 samples/net/irc_bot/prj_qemu_x86.conf
 create mode 100644 samples/net/irc_bot/src/Makefile
 create mode 100644 samples/net/irc_bot/src/irc-bot.c
 create mode 100644 samples/net/mqtt_publisher/Makefile
 create mode 100644 samples/net/mqtt_publisher/README.rst
 create mode 100644 samples/net/mqtt_publisher/prj_frdm_k64f.conf
 create mode 100644 samples/net/mqtt_publisher/src/Makefile
 create mode 100644 samples/net/mqtt_publisher/src/config.h
 create mode 100644 samples/net/mqtt_publisher/src/main.c
 create mode 100644 samples/net/mqtt_publisher/testcase.ini
 delete mode 100644 samples/net/qemu_setup.rst
 create mode 100644 samples/net/telnet/Makefile
 create mode 100644 samples/net/telnet/README.rst
 create mode 100644 samples/net/telnet/prj_frdm_k64f.conf
 create mode 100644 samples/net/telnet/prj_qemu_x86.conf
 create mode 100644 samples/net/telnet/prj_qemu_x86_iamcu.conf
 create mode 100644 samples/net/telnet/src/Makefile
 create mode 100644 samples/net/telnet/src/telnet.c
 create mode 100644 samples/net/telnet/testcase.ini
 create mode 100644 samples/net/zoap_server/prj_cc2520.conf
 create mode 100644 tests/net/iface/Makefile
 create mode 100644 tests/net/iface/prj.conf
 create mode 100644 tests/net/iface/src/Makefile
 create mode 100644 tests/net/iface/src/main.c
 create mode 100644 tests/net/iface/testcase.ini

Change-Id: Ie477c0aed33d281319afa27c10ec7d42a84346b8
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-03 16:13:42 +02:00
Tomasz Bursztyka 93ed88a670 net/ipv6: Updating ll reserve should be done for all IPv6 packet.
Doing it only in net_context, prevented to do it once NS succesfully
finished. This generated an error in 15.4, where pending data had wrong
ll reserve size.

Change-Id: I0f917fb76171457e5dff2c29e44edb8f00662150
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-02-03 15:59:20 +02:00
Jukka Rissanen 2612b04d80 samples: net: zperf: Set the proper UDP payload
Use a static buffer for sending UDP payload instead of reading
values from memory.

Change-Id: I037db5cd9b8784966d481c36e8cbe92d19760475
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-03 15:59:20 +02:00
Jukka Rissanen 517fb19586 samples: net: zperf: Fix compiler warnings
Compiler was giving "Unused variables" warnings if IPv6 was
enabled and IPv4 was not, and vice versa.

Change-Id: I3b17534bb8bdef207512ea5b618e138edb420871
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-03 15:59:20 +02:00