Commit graph

19237 commits

Author SHA1 Message Date
Marcus Shawcroft
878aa5f15c net/dhcpv4: Correct backoff and retransmit behaviour
Implement RFC2131 4.1.1 requirement that at dhcp implementation wait
for a random delay of 1 to 10s before sending the initial DISCOVER.

Implement RF2131 4.1 requirement that at dhcp implementation set the
initial retransmit timeout at 4 seconds and exponentially backoff on
each retransmit.

Change-Id: Id7029f3ed16a5f886dbd555fed87320aeffe31aa
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-09 14:27:11 +00:00
Marcus Shawcroft
d06ca47eb3 net/dhcpv4: Use unique XID on each request.
Rather than reuse XID's on retransmissions, always use a unique XID.

Either behaviour is permitted by rfc2131.  Debugging the dhcp client
in the presence of multiple dhcp servers with significant packet loss
in the network is much easier if we don't unnecessarily reuse request
identifiers.

Change-Id: I5c82cbdbf3dfc0ef88cae036aa863946844c144f
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-09 14:27:11 +00:00
Marcus Shawcroft
8cd2e089d6 net/dhcpv4: Add further diagnostics.
Change-Id: I13fed6b6102d7711082f16de3f782c606808b142
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-09 14:27:10 +00:00
Marcus Shawcroft
7421928ae5 samples/dhcpv4_client: Switch from private net_sprint_ipv4_addr to public net_addr_ntop
Change-Id: I894c22548aeea4dcb42e457266e7e140acdace0f
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-09 14:27:09 +00:00
Marcus Shawcroft
7a903ede9f samples/dhcpv4_client: Increase number of DATA buffers.
Change-Id: I0116613cb63070d08c4cb6ad7a5864d09a014c68
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-09 14:27:09 +00:00
Marcus Shawcroft
571bdbb7c3 samples/dhcpv4_client: Reduce default debug to dhcpv4
Turn down the default logging verbosity on the dhcpv4 frdm_k64f config
to focus on the dhcpv4 implementation.

Change-Id: Ifb450181add653951517a7b128b11657ec2bab62
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-09 14:27:08 +00:00
Marcus Shawcroft
15a151a0a0 samples/mbedtls_dtls_client: Fix wild write in entropy_source
The example entropy_source implementation should write entropy to the
output buffer rather than to the context pointer which in this example
happens to be NULL.

Take the opportunity to reorganize the entropy_source to use all of
the entropy provided by a call to sys_rand32_get() rather than just
1/4 of it.

The entropy_source() callback from mbedtls is given a maximum amount
of entropy to return, rather than a minimum amount.  Hence it makes
more sense to deliver exactly one chunk (32 bits) of entropy from the
call to sys_rand32_get() per call and let the mbedtls entropy handler
worry about how much entropy we actually need to collect (ie the threshold).

Change-Id: I57ed438de5cb1223619fde0fb8039d6eca284646
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-09 14:26:58 +00:00
Marcus Shawcroft
8a612c3a44 samples/mbedtls_dtls_server: Use k_uptime_get_32()
The kernel provides an API call to get the least signficant 32 bits of
system time, use it rather than	reaching under the hood.

Change-Id: I98fabdcadfd0a4fe5ae10226dabf4e6d31e88df6
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-09 14:26:57 +00:00
Marcus Shawcroft
e2e43774d2 samples/mbedtls_dtls_client: Use k_uptime_get_32()
The kernel provides an API call to get the least signficant 32 bits of
system time, use it rather than reaching under the hood.

Change-Id: I9c303ef949f7670f2a2d9691c342e496873e96e6
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-09 14:26:57 +00:00
Ravi kumar Veeramally
f6916acbee net: samples: Unref the buf if app data length is zero
Core stack is not removing the network buffer if app data length
is zero. So memory leak happening here.

Change-Id: I3d354b5e7008396ca7cb977631036871998165b4
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-02-09 12:29:29 +02:00
Ravi kumar Veeramally
3bb2f3b29a net: tests: Unref net_buf using net_nbuf_unref
Using net_buf_unref() technically works but debugging the network buffer
allocations is more difficult if done like that.

Change-Id: Ieaa0978aa69e2f0baa924fe842ca1f116c348ef1
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-02-09 12:29:29 +02:00
Ravi kumar Veeramally
083e112197 net: samples: Unref net_buf using net_nbuf_unref
Using net_buf_unref() technically works but debugging the network buffer
allocations is more difficult if done like that.

Change-Id: Ib8e3f8b412c2f8388315c2f63cae4392f814ea2f
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-02-09 12:29:29 +02:00
Gil Pitney
8c143090ba net: offload_ip: Update net_context_accept_cb_t to net_tcp_accept_cb_t
This is required to allow an "IP Offload" driver to build,
once CONFIG_NET_L2_OFFLOAD_IP is enabled.

This fixes the offload_ip.h header following the change made by
commit eb9055c019
("net: tcp: move accept_cb from net_context to net_tcp")

Change-Id: I1a6010c2dbdfc5e74a2ae172aa0167783f4a0cfe
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2017-02-09 09:43:06 +02:00
Ravi kumar Veeramally
b45c4c7353 net: tcp: Remove multiple times of nbuf_compact() call
finalize_segment() will call net_ipv4_finalize() or
net_ipv6_finalize(). Both the functions perform net_nbuf_compact().
But after finalize_segment(), net_nbuf_compact() called again, which
is unnecessary.

Change-Id: I9fab63bcc44eec87061a4b55edd5053cf6556a75
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-02-09 09:43:06 +02:00
Ravi kumar Veeramally
d3ea2021f4 net: tcp: Remove multiple checks on nbuf protocol family
Protocol family is checked in prepare_segment() and in same function
it's again verified by finalize_segment(). So remove the double checking
in finalize_segment().

Change-Id: I17123ab8741d017d7e3ff1ef3fb07371b0d4aa66
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-02-09 09:43:06 +02:00
Ravi kumar Veeramally
369e906e31 net: Ref net_buf using net_nbuf_ref
Using net_buf_ref() technically works but debugging the network buffer
allocations is more difficult if done like that.

Change-Id: Iac81bd3ab95547741d49f32763baaa54e97b4877
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-02-09 09:43:06 +02:00
Anas Nashif
1dc135aade boards: add panther board
Panther is a board based on Quark SE C1000 SoC.

Change-Id: I66653c40efcb7e04748a21ea622debee23d7d6c0
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-09 01:39:38 +00:00
Jean-Paul Etienne
5d5265bca4 riscv32: timer: disable riscv_machine_timer driver by default for riscv32
Enabling the riscv_machine_timer driver by default for riscv32
causes compilation issues on riscv32 boards (like zedboard_pulpino)
not supporting it.

Boards supporting the driver enable it via their respective
config file.

Change-Id: Ieb0d25fa339834fd386ae2725f40b6b7b72dc52b
Signed-off-by: Jean-Paul Etienne <fractalclone@gmail.com>
2017-02-09 00:26:26 +01:00
Andrew Boie
d81e033044 build: Separate out prebuilt kernel logic from toplevel
Arch-specific stuff shouldn't be in the toplevel Makefile,
forthcoming patches will soon introduce special interrupt
handling logic for other arches.

Change-Id: Ib5a86cbdf5b32ecfce9e5e234f7cbea2bc3ce9c1
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-08 19:11:10 +00:00
Andrew Boie
d8027a29f3 toolchain: gcc.h: add indirection to _GENERIC_SECTION() macro
Change-Id: Ic30874cafb4a79213feb93666903816d297084f6
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-08 19:10:55 +00:00
Andrew Boie
3c6f572361 section_tags.h: cleanup
Some stuff that was platform-specific is made common, and some repeated
code was made a macro. __in_section() is used elsewhere in the codebase
and its 2nd and 3rd arguments are not necessarily filename/counter.

GCC-specific stuff moved to the toolchain header.

Change-Id: Ibfae919b6dd8a77210801c14e9a1128b43bd63f6
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-08 19:10:43 +00:00
Kuo-Lang Tseng
0e91e84122 drivers: QMSI PWM: simplify driver reentrancy code using IS_ENABLED macro
This is one the series patches that simplifies the driver code by
using the IS_ENABLED macro. This removes the need of the const
variable and the wrapper functions on semaphore APIs.

Jira: ZEP-1251

Change-Id: Ic2df5d04966d2a066478ca3e119f76d24fc4dfb3
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
2017-02-08 19:08:31 +00:00
Kuo-Lang Tseng
8bf14d380b drivers: QMSI RTC: simplify driver reentrancy code using IS_ENABLED
This is one of the series of patches that simplifies the driver
code by using the IS_ENABLED macro. This removes the need of the
const variable and the wrapper functions on semaphore APIs.

Jira: ZEP-1251

Change-Id: I84a09a0aaa3a00452d8c2b4bca7be0f6b2015218
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
2017-02-08 19:08:06 +00:00
Kuo-Lang Tseng
74f7da1bb4 drivers: QMSI SOC flash: simplify driver reentrancy code using IS_ENABLED
This is one the series patches that simplifies the driver code by
using the IS_ENABLED macro. This removes the need of the const
variable and the wrapper functions on semaphore APIs.

Jira: ZEP-1251

Change-Id: I59802cf9f482337656b0fdc4b272f3b1ddc6cbda
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
2017-02-08 19:07:42 +00:00
Andrew Boie
164ba8c5cd sw_isr_table.h: clean up definition
This private data structure now no longer introduces a typedef or
uses CamelCase. It's not necessary to specify the size of extern
arrays, so we don't need a block of #ifdefs for every arch.

Change-Id: I71fe61822ecef29820280a43d5ac2822a61f7082
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-08 18:14:37 +00:00
Juan Solano
d490573933 quark_se_ss: Remove enter_arc_state and use QMSI functions
This commit removes the local implementation of enter_arc_state, where
the ARC is instructed to sleep, using instead the QMSI 1.4 functions.

Change-Id: Id489ad53851be50fc5e50add698891fcfaef3abe
Signed-off-by: Juan Solano <juanx.solano.menacho@intel.com>
2017-02-08 13:41:26 +00:00
Juan Solano
48b8dddd95 aonpt_qmsi: Call QMSI 1.4 context save/restore functions.
This commit removes the aonpt interrupt masking/unmasking needed after
wake up as that functionality is now available in QMSI 1.4. The QMSI
save/restore functions are called instead.

Change-Id: I61a4a6952e959d0834904bbc8e1eb98092ae4b1c
Signed-off-by: Juan Solano <juanx.solano.menacho@intel.com>
2017-02-08 13:40:51 +00:00
Juan Solano
e19000603b rtc_qmsi: Call QMSI 1.4 context save/restore functions.
This commit removes the RTC interrupt masking/unmasking needed after
wake up as that functionality is now available in QMSI 1.4. The QMSI
save/restore functions are called instead.

Change-Id: I15b5063fa64c71b125edd2c709410b5ae655032e
Signed-off-by: Juan Solano <juanx.solano.menacho@intel.com>
2017-02-08 13:39:54 +00:00
Marcus Shawcroft
fd604a3a9a gpio: Error unsupported access_op consistently.
Several GPIO device drivers support only one of the two possible
access_op modes and return an errno error code for the mode they do
not support.  Use the same errno code across all drivers.

Change-Id: Ic01ce9dee7fb2405d254c60cebee22053c803270
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-08 13:31:09 +00:00
Marcus Shawcroft
48831a9d4c gpio: Error pin out of range consistently.
Several GPIO drivers detect an out of range pin number and return an
errno error code.  Use the same errno code across all drivers.

Change-Id: I0e2949432d6845d12c37064c78f9c228b8e8e45a
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-08 13:31:08 +00:00
Marcus Shawcroft
c35b90890a gpio: Error GPIO_INT with GPIO_DIR_OUT consistently.
Several gpio drivers consider GPIO_INT with GPIO_DIR_OUT to be illegal
and return an errno code.  Use the same errno code across all drivers.

Change-Id: I1594df0cfdf96194685c83c34dff36261896f2de
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-08 13:31:08 +00:00
Qiu Peiyang
8a119a4319 tests: add filesystem api test
This commit verifies below FS APIs:
	fs_open()
	fs_close()
	fs_read()
	fs_write()
	fs_truncate()
	fs_seek()
	fs_tell()
	fs_sync()
	fs_unlink()
	fs_mkdir()
	fs_opendir()
	fs_closedir()
	fs_readdir()
	fs_stat()
	fs_statvfs()

Change-Id: I1a48b9e960b62a1c4986cc577f658199da7a28cd
Signed-off-by: Qiu Peiyang <peiyangx.qiu@intel.com>
2017-02-08 13:25:35 +00:00
jing wang
4e5fa0ede2 tests: add systhreads test case
this commit check the priority of 2 system threads - main and idle

Change-Id: Ie57e7fdab3d15c0b69d85ed6282bfa6aa04133b4
Signed-off-by: jing wang <jing.j.wang@intel.com>
2017-02-08 13:22:49 +00:00
David B. Kinder
4031da8c92 doc: add permalinks to document headings
Permalinks make it much easier to create html links to specific sections
in a document (you over over the section heading and an icon appears that
you can click on to get a reference link directly to that section).

Change-Id: I905449158f834783b9df6c04bf5fa3e5f245b3fd
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-02-08 13:16:40 +00:00
Daniel Thompson
f9733e492d misc: Let the compiler choose whether to omit frame pointer
Currently CONFIG_OMIT_FRAME_POINTER is a boolean and defaults to N,
which increases code size. This is intended to improve debugability
but on many architectures the use of this option does not actually
compromise debugging. Further the compiler already knows whether or not
omitting the frame pointer is harmful to debugging and its defaults
are selected accordingly.

By making this choice optional we can have a sane default on *all*
architectures by letting the compiler decide for us.

This patch significantly improves the default code generation on
arm (thumb), nios2 and arc. The benefit looks to be about between 5%
and 10% code size reduction depending upon architecture). x86 is
unaffected.

Change-Id: I5790634a40e2462cc1089dce4087040833793ae7
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
2017-02-08 13:14:16 +00:00
Jukka Rissanen
a7e8bd6845 checkpatch: Remove reference to legacy IP stack
Old uIP based legacy IP stack is no longer there so it can
be removed from checkpatch conf file.

Change-Id: I2a17391f9cc8c0f8f8b81d520be1db8e2e8608f7
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-08 13:05:27 +00:00
Ramesh Thomas
444ecafeee kernel: Remove redundant TICKLESS_IDLE_SUPPORTED option
This flag is no longer necessary and TICKLESS_IDLE will be
enabled by default if SYS_POWER_MANAGEMENT is enabled.

Jira: ZEP-1325
Change-Id: Ic6cd4b8dc0a17c6a413cabf6509b215a4558318d
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2017-02-08 13:02:34 +00:00
Anas Nashif
1fdfc5dc2b doc: rename doxygen configuration file and build from doc/
Rename file to zephyr.doxyfile to allow integration in eclipse and make
it build locally in the doc/ directory without have to change to ../
first.

Change-Id: Ib2c4c26f385b050ea3d0e814ebfc3509f31e5e12
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-08 12:04:35 +00:00
Anas Nashif
31f01f8ed6 Merge "Merge net branch into master" 2017-02-08 12:03:09 +00:00
Jesus Sanchez-Palencia
a19d4ad041 quark_d2000: Add shared GDT memory to linker
A new shared memory area has been added to the QMSI bootloader in
order to store the GDT in RAM reliably.

Add the new entry to the QUARK D2000 linker script and new
kconfig options:

 * CONFIG_BSP_SHARED_GDT_RAM_ADDR to set the address location
   of the GDT in RAM.

 * CONFIG_BSP_SHARED_GDT_RAM_SIZE to set the size used by the
   GDT in RAM.

This is only enabled when  CONFIG_SET_GDT is NOT set.

Change-Id: Ie084079475853dce153dd9f3e88ad4a9784bdedf
Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
2017-02-08 11:59:15 +00:00
Jesus Sanchez-Palencia
bcee91d70e quark_se: Add shared GDT in RAM memory to linker
A new shared memory has been added to the QMSI bootloader in order to
store the GDT in RAM reliably.

Add this new entry to the QUARK SE C1000 linker script and new kconfig
options:

 * CONFIG_BSP_SHARED_GDT_RAM_ADDR to set the address location
   of the GDT in RAM.

 * CONFIG_BSP_SHARED_GDT_RAM_SIZE to set the size used by the
   GDT in RAM.

Additionally, both BSP_SHARED_RAM_ADDR and BSP_SHARED_RAM_SIZE have been
renamed to BSP_SHARED_RESTORE_INFO_RAM_ADDR and
BSP_SHARED_RESTORE_INFO_SIZE respectively, in order to better resemble
what these options are for. All these configs are available
unconditionally.

Change-Id: I07ee8b440d4a3f5e9bdeb62441ff6a7bd6d4c153
Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
Signed-off-by: Bartlomiej Majka <bartlomiejx.majka@intel.com>
2017-02-08 11:59:14 +00:00
Jesus Sanchez-Palencia
78224e1a75 quark_se: Fix restore info address
For the next QMSI release, the shared restore info address has been
modified to 0xA8013FDC .

Change-Id: I72eaef4f15f7ef6fb8e7eb9acd7d96451623e103
Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
2017-02-08 11:59:13 +00:00
Kuo-Lang Tseng
23b0074012 ext qmsi: Update to QMSI 1.4 RC2
Update the builtin QMSI code to 1.4 (RC2).
The below shim drivers were updated for API or interface changes:
- aio
- counter
- i2c_ss
- rtc
- wdt.

Also, arch soc specific power management code were updated.

Jira: ZEP-1572

Change-Id: Ibc8fae032a39ffb2c2c997f697835bc0208fd308
Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
2017-02-08 11:59:12 +00:00
Johan Hedberg
79883c9834 Merge bluetooth branch into master
- Use k_poll to consolidate all TX threads into a single one
 - Reuse HCI command buffers for storing their response
 - Improvements to SDP client support
 - New "volatile subscription" flag to GATT API
 - Various smaller fixes & cleanups here and there

----------------------------------------------------------------
Arkadiusz Lichwa (8):
      Bluetooth: SDP: Get ProtocolDescriptorList attribute internals
      Bluetooth: shell: Add SDP client support
      Bluetooth: uuid: Fix assigned UDP uuid value
      Bluetooth: SDP: Add API to get ProfileDescriptorList attribute
      Bluetooth: shell: Add getting ProfileDescriptorList attribute
      Bluetooth: SDP: Add API to get SupportedFeature attribute
      Bluetooth: shell: Use SupportedFeature attribute API
      Bluetooth: shell: Add support to retrieve A2SRC record

Arun Jagadish (2):
      Bluetooth: AVDTP: Remove buffer pool
      Bluetooth: AVDTP: Add AVDTP Discover Function Definition

Carles Cufi (1):
      Bluetooth: hci_core: Use nRF5x FICR address

Jaganath Kanakkassery (2):
      Bluetooth: RFCOMM: Fix session timer during acl disc
      Bluetooth: RFCOMM: Use common tx pool for control packets

Johan Hedberg (15):
      Bluetooth: Fix trivial coding style issue
      Bluetooth: Fix checking for invalid public address
      Bluetooth: Fix using correct variable type for interrupt mask
      Bluetooth: Fix buffer leak when HCI driver send() fails
      Bluetooth: drivers/h4: Add support for discarding certain events
      Bluetooth: Add convenience macros for common header sizes
      Bluetooth: Kconfig: Merge headroom reserve variables into a single one
      Bluetooth: Controller: Redesign response buffer allocation for commands
      Bluetooth: Reuse HCI command buffers for the command response
      Bluetooth: conn: Use delayed work for LE connection timeout
      Bluetooth: Merge bt_conn TX threads into a single one with k_poll
      Bluetooth: Merge HCI command and connection TX threads
      Bluetooth: samples: Add missing README.rst files
      Bluetooth: Controller: Use LL_ASSERT instead of BT_ASSERT
      Bluetooth: Fix incorrect checks for command buffer user data

Jonathan Gelie (3):
      Bluetooth: GATT: introduce volatile subscription flag
      Bluetooth: GATT: set subscribe value to zero for unsubscription
      Bluetooth: GATT: fixing unsubscription

Luiz Augusto von Dentz (1):
      Bluetooth: GATT: Fix not removing subscriptions safely

Sathish Narasimman (5):
      Bluetooth: HFP HF: Service level connection completed
      Bluetooth: HFP HF: Enable extended AG Error Result Code
      Bluetooth: HFP HF: Indicate disconnect to application
      Bluetooth: HFP HF: Disconnect rfcomm on SLC error
      Bluetooth: HFP HF: Remove unused variable 'buf'

Szymon Janc (5):
      Bluetooth: Use assert when getting net buf with K_FOREVER
      Bluetooth: Remove some dead code
      Bluetooth: L2CAP: Remove dead code
      Bluetooth: SDP: Make bt_sdp_create_pdu static
      Bluetooth: L2CAP: Make l2cap_br_send_conn_rsp return void

 drivers/bluetooth/hci/Kconfig                   |  13 +-
 drivers/bluetooth/hci/h4.c                      |  93 +++-
 drivers/bluetooth/hci/h5.c                      |  47 +-
 drivers/bluetooth/hci/spi.c                     |  13 +-
 drivers/bluetooth/nble/gatt.c                   |  76 +--
 include/bluetooth/buf.h                         |  13 +-
 include/bluetooth/gatt.h                        |  18 +-
 include/bluetooth/hci.h                         |   9 +-
 include/bluetooth/l2cap.h                       |  20 +-
 include/bluetooth/sdp.h                         |  51 ++-
 include/bluetooth/uuid.h                        |   2 +-
 samples/bluetooth/handsfree/README.rst          |  23 +
 samples/bluetooth/hci_uart/src/main.c           |  11 +-
 samples/bluetooth/hci_usb/src/main.c            |  11 +-
 samples/bluetooth/peripheral_sc_only/README.rst |  26 ++
 subsys/bluetooth/controller/hci/hci.c           | 153 ++++---
 subsys/bluetooth/controller/hci/hci_driver.c    |  23 +-
 subsys/bluetooth/controller/hci/hci_internal.h  |   2 +-
 subsys/bluetooth/controller/ll/ctrl.c           |   2 +-
 subsys/bluetooth/host/Kconfig                   |  10 +-
 subsys/bluetooth/host/at.c                      |   2 +-
 subsys/bluetooth/host/at.h                      |   3 +-
 subsys/bluetooth/host/avdtp.c                   |  81 +++-
 subsys/bluetooth/host/avdtp_internal.h          |   7 -
 subsys/bluetooth/host/conn.c                    | 178 ++++----
 subsys/bluetooth/host/conn_internal.h           |  15 +-
 subsys/bluetooth/host/gatt.c                    | 142 +++---
 subsys/bluetooth/host/hci_core.c                | 285 ++++++++----
 subsys/bluetooth/host/hci_core.h                |   6 +
 subsys/bluetooth/host/hci_ecc.c                 |   6 +-
 subsys/bluetooth/host/hci_raw.c                 |  12 +
 subsys/bluetooth/host/hfp_hf.c                  |  50 +-
 subsys/bluetooth/host/l2cap.c                   |  35 --
 subsys/bluetooth/host/l2cap_br.c                |  49 +-
 subsys/bluetooth/host/l2cap_internal.h          |   7 +-
 subsys/bluetooth/host/rfcomm.c                  |  31 +-
 subsys/bluetooth/host/rfcomm_internal.h         |   5 +-
 subsys/bluetooth/host/sdp.c                     | 584 +++++++++++++++++++++++-
 tests/bluetooth/shell/src/main.c                | 172 +++++++
 39 files changed, 1700 insertions(+), 586 deletions(-)
 create mode 100644 samples/bluetooth/handsfree/README.rst
 create mode 100644 samples/bluetooth/peripheral_sc_only/README.rst

Change-Id: I7589dbad8b97477c72d1b856121593bcf6d11339
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-02-08 13:03:20 +02:00
Arun Jagadish
93e28c75fe Bluetooth: AVDTP: Add AVDTP Discover Function Definition
Implementation of Send AVDTP_DISCOVER functionality

< ACL Data TX: Handle 256 flags 0x00 dlen 6
      Channel: 64 len 2 [PSM 25 mode 0] {chan 0}
      AVDTP: Discover (0x01) Command (0x00) type 0x00 label 0 nosp 0

Change-Id: Ieb6d1e5379d8933d57f3b1399f091378ce3c0756
Signed-off-by: Arun Jagadish <arun.jagadish@intel.com>
2017-02-08 11:02:09 +00:00
Jonathan Gelie
048a15bcc8 Bluetooth: GATT: fixing unsubscription
If subcription was found within the subscription list,
we have check if remains identical subscription
from the next node.
Otherwise none unsubscription is realized.

Change-Id: I38132d7c80575801885b8057902f3d4666b08aea
Signed-off-by: Jonathan Gelie <jonathanx.gelie@intel.com>
2017-02-08 11:00:06 +00:00
Johan Hedberg
ce2d74a58a Bluetooth: Fix incorrect checks for command buffer user data
If the buffer given to hci_cmd_done() is not from the command buffer
then using the cmd(buf) macro is not valid. Simply bail out from
hci_cmd_done() if this is an event that didn't have a matching command
buffer.

Change-Id: Id8357a23a307f4ef3a9214a4e1f7d853a18cb907
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-02-08 11:59:50 +02:00
Jukka Rissanen
7498e22f6e Merge net branch into master
Main changes:

- Documentation enhancements and fixes
- HTTP client sample application
- TCP fixes
- net_buf access fixes in IP stack
- IEEE 802.15.4 fragmentation fixes

----------------------------------------------------------------
Anas Nashif (1):
      net: nbuf: Fix style of doxygen comment

Flavio Santes (1):
      samples/net/http: Add the HTTP client sample application

Johann Fischer (1):
      drivers: mcr20a: control access to SPI with semaphore

Juan Manuel Cruz (2):
      drivers: enc28j60: Enables reception of multicast packets
      mbedtls: add arduino 101 configuration to ssl client sample

Jukka Rissanen (10):
      samples: net: Fix invalid memory access for TCP
      drivers/eth/mcux: Free net_buf using net_nbuf_unref
      net: ipv6: Fix pending buf leak when NA is received
      net: ipv6: Free received NA net_buf
      net: todo: Add CAN support entry
      net: nbuf: Add timeout to net_buf getters
      net: nbuf: Add helper to print fragment chain
      net: nbuf: Remove dead code in net_nbuf_compact()
      net: nbuf: Fix double free in net_nbuf_compact()
      net: arp: Fix the ethernet header location

Michael Scott (6):
      net: context: keep randomly assigned port for TCP bind() calls
      net: ip: change some error messages to NET_ERR
      net: context: fix net context / net conn leak
      samples: net: irc_bot: fix build break
      samples: net: irc_bot: fix size_t related build warnings
      samples: net: irc_bot: add testcase.ini

Ravi kumar Veeramally (4):
      net: fragment: Fix the 802.15.4 fragmentation
      net: tests: 15.4: Increase max data size and fix config option
      net: nbuf: Remove unused net_nbuf_push() API
      net: nbuf: Fix net_nbuf_compact() API

Tomasz Bursztyka (1):
      doc/net: Add L2 and device driver document

Wojciech Bober (2):
      drivers/ieee802154: Split drivers Kconfig
      drivers/net/ieee802154: Change configuration prefix

 boards/arm/frdm_k64f/pinmux.c                      |   2 +-
 .../x86/quark_se_c1000_devboard/Kconfig.defconfig  |  18 +-
 boards/x86/quark_se_c1000_devboard/board.c         |  14 +-
 boards/x86/quark_se_c1000_devboard/board.h         |  10 +-
 .../networking/connectivity-example-app.c          |   4 +-
 doc/subsystems/networking/l2-and-drivers.rst       | 154 +++++++++++
 doc/subsystems/networking/networking.rst           |   2 +-
 drivers/console/telnet_console.c                   |   6 +-
 drivers/ethernet/eth_enc28j60.c                    |   4 +-
 drivers/ethernet/eth_enc28j60_priv.h               |   3 +-
 drivers/ethernet/eth_mcux.c                        |  10 +-
 drivers/ethernet/eth_sam_gmac.c                    |   6 +-
 drivers/ieee802154/Kconfig                         | 190 +-------------
 drivers/ieee802154/Kconfig.cc2520                  |  67 +++++
 drivers/ieee802154/Kconfig.mcr20a                  | 120 +++++++++
 drivers/ieee802154/Makefile                        |  10 +-
 drivers/ieee802154/ieee802154_cc2520.c             |  37 +--
 drivers/ieee802154/ieee802154_cc2520.h             |   2 +-
 drivers/ieee802154/ieee802154_mcr20a.c             |  88 +++++--
 drivers/ieee802154/ieee802154_mcr20a.h             |   3 +-
 drivers/ieee802154/ieee802154_uart_pipe.c          |   6 +-
 drivers/slip/slip.c                                |   6 +-
 ext/hal/nxp/mcux/Makefile                          |   2 +-
 include/net/nbuf.h                                 | 200 +++++++++------
 samples/bluetooth/ipsp/src/main.c                  |   2 +-
 samples/net/coaps_client/src/udp.c                 |   4 +-
 samples/net/coaps_server/src/udp.c                 |   4 +-
 .../net/echo_client/prj_arduino_101_cc2520.conf    |  10 +-
 samples/net/echo_client/prj_cc2520.conf            |   4 +-
 samples/net/echo_client/prj_frdm_k64f_cc2520.conf  |  10 +-
 samples/net/echo_client/prj_frdm_k64f_mcr20a.conf  |   2 +-
 samples/net/echo_client/prj_qemu_802154.conf       |   2 +-
 samples/net/echo_client/src/Makefile               |   2 +-
 samples/net/echo_client/src/echo-client.c          |   5 +-
 .../net/echo_server/prj_arduino_101_cc2520.conf    |  10 +-
 samples/net/echo_server/prj_cc2520.conf            |   4 +-
 samples/net/echo_server/prj_frdm_k64f_cc2520.conf  |  10 +-
 samples/net/echo_server/prj_frdm_k64f_mcr20a.conf  |   2 +-
 samples/net/echo_server/prj_qemu_802154.conf       |   2 +-
 samples/net/echo_server/src/Makefile               |   2 +-
 samples/net/echo_server/src/echo-server.c          |   8 +-
 samples/net/http_client/Makefile                   |  10 +
 samples/net/http_client/README.rst                 | 229 +++++++++++++++++
 samples/net/http_client/prj_frdm_k64f.conf         |  34 +++
 samples/net/http_client/src/Makefile               |  11 +
 samples/net/http_client/src/config.h               |  74 ++++++
 samples/net/http_client/src/http_client.c          | 158 ++++++++++++
 samples/net/http_client/src/http_client.h          |  38 +++
 samples/net/http_client/src/http_client_cb.c       | 133 ++++++++++
 samples/net/http_client/src/http_client_cb.h       |  38 +++
 samples/net/http_client/src/http_client_rcv.c      | 101 ++++++++
 samples/net/http_client/src/http_client_rcv.h      |  15 ++
 samples/net/http_client/src/http_client_types.h    |  28 ++
 samples/net/http_client/src/main.c                 | 128 +++++++++
 samples/net/http_client/src/tcp_client.c           | 162 ++++++++++++
 samples/net/http_client/src/tcp_client.h           |  31 +++
 samples/net/http_client/testcase.ini               |   4 +
 samples/net/http_server/src/http_write_utils.c     |  10 +-
 samples/net/ieee802154/hw/prj.conf                 |   4 +-
 samples/net/ieee802154/hw/prj_mcr20a.conf          |   2 +-
 samples/net/ieee802154/hw/src/ieee802154_test.c    |   8 +-
 samples/net/ieee802154/qemu/prj.conf               |   2 +-
 .../net/ieee802154/qemu/src/ieee802154_qemu_test.c |   2 +-
 samples/net/irc_bot/src/irc-bot.c                  |   6 +-
 samples/net/irc_bot/testcase.ini                   |   4 +
 samples/net/leds_demo/prj_802154.conf              |   2 +-
 samples/net/leds_demo/src/leds-demo.c              |  16 +-
 samples/net/mbedtls_dtlsclient/src/udp.c           |   4 +-
 samples/net/mbedtls_dtlsserver/src/udp.c           |   4 +-
 samples/net/mbedtls_sslclient/Makefile             |   4 +-
 samples/net/mbedtls_sslclient/prj_arduino_101.conf |  34 +++
 samples/net/mbedtls_sslclient/src/tcp.c            |   4 +-
 samples/net/wpan_serial/prj.conf                   |   2 +-
 samples/net/wpan_serial/src/Makefile               |   2 +-
 samples/net/wpan_serial/src/main.c                 |  10 +-
 samples/net/wpanusb/prj.conf                       |   4 +-
 samples/net/wpanusb/src/Makefile                   |   8 +-
 samples/net/wpanusb/src/wpanusb.c                  |  15 +-
 samples/net/zoap_client/src/zoap-client.c          |   4 +-
 samples/net/zoap_server/prj_cc2520.conf            |   2 +-
 samples/net/zoap_server/src/zoap-server.c          |  40 +--
 samples/net/zperf/prj_quark_se_c1000_devboard.conf |   2 +-
 samples/net/zperf/src/zperf_tcp_uploader.c         |  11 +-
 samples/net/zperf/src/zperf_udp_receiver.c         |   4 +-
 samples/net/zperf/src/zperf_udp_uploader.c         |  18 +-
 subsys/net/TODO                                    |  16 ++
 subsys/net/ip/6lo.c                                |  21 +-
 subsys/net/ip/connection.c                         |   6 +-
 subsys/net/ip/dhcpv4.c                             |  38 ++-
 subsys/net/ip/icmpv4.c                             |   8 +-
 subsys/net/ip/icmpv6.c                             |  10 +-
 subsys/net/ip/ipv4.c                               |   2 +-
 subsys/net/ip/ipv6.c                               |  24 +-
 subsys/net/ip/l2/arp.c                             |  19 +-
 subsys/net/ip/l2/bluetooth.c                       |   4 +-
 subsys/net/ip/l2/ieee802154/ieee802154.c           |   4 +-
 subsys/net/ip/l2/ieee802154/ieee802154_fragment.c  | 137 ++++++----
 subsys/net/ip/l2/ieee802154/ieee802154_frame.c     |   4 +-
 subsys/net/ip/nbuf.c                               | 199 +++++++-------
 subsys/net/ip/net_context.c                        |  38 ++-
 subsys/net/ip/net_private.h                        |  29 +++
 subsys/net/ip/rpl.c                                |  21 +-
 subsys/net/ip/tcp.c                                |   6 +-
 subsys/net/lib/dns/dns_client.c                    |   4 +-
 subsys/net/lib/mqtt/mqtt.c                         |  20 +-
 subsys/net/lib/zoap/zoap_link_format.c             |   4 +-
 tests/net/6lo/src/main.c                           |   6 +-
 tests/net/arp/src/main.c                           |  24 +-
 tests/net/context/src/main.c                       |  24 +-
 tests/net/dhcpv4/src/main.c                        |   7 +-
 tests/net/ieee802154/fragment/prj.conf             |   2 +-
 tests/net/ieee802154/fragment/src/main.c           |  14 +-
 tests/net/ieee802154/l2/src/ieee802154_test.c      |   6 +-
 tests/net/iface/src/main.c                         |   4 +-
 tests/net/ipv6/src/main.c                          |  20 +-
 tests/net/nbuf/src/main.c                          | 285 +++++----------------
 tests/net/route/src/main.c                         |   4 +-
 tests/net/rpl/src/main.c                           |   4 +-
 tests/net/tcp/src/main.c                           |   8 +-
 tests/net/udp/src/main.c                           |   8 +-
 tests/net/utils/src/main.c                         |  34 +--
 121 files changed, 2503 insertions(+), 1030 deletions(-)
 create mode 100644 doc/subsystems/networking/l2-and-drivers.rst
 create mode 100644 drivers/ieee802154/Kconfig.cc2520
 create mode 100644 drivers/ieee802154/Kconfig.mcr20a
 create mode 100644 samples/net/http_client/Makefile
 create mode 100644 samples/net/http_client/README.rst
 create mode 100644 samples/net/http_client/prj_frdm_k64f.conf
 create mode 100644 samples/net/http_client/src/Makefile
 create mode 100644 samples/net/http_client/src/config.h
 create mode 100644 samples/net/http_client/src/http_client.c
 create mode 100644 samples/net/http_client/src/http_client.h
 create mode 100644 samples/net/http_client/src/http_client_cb.c
 create mode 100644 samples/net/http_client/src/http_client_cb.h
 create mode 100644 samples/net/http_client/src/http_client_rcv.c
 create mode 100644 samples/net/http_client/src/http_client_rcv.h
 create mode 100644 samples/net/http_client/src/http_client_types.h
 create mode 100644 samples/net/http_client/src/main.c
 create mode 100644 samples/net/http_client/src/tcp_client.c
 create mode 100644 samples/net/http_client/src/tcp_client.h
 create mode 100644 samples/net/http_client/testcase.ini
 create mode 100644 samples/net/irc_bot/testcase.ini
 create mode 100644 samples/net/mbedtls_sslclient/prj_arduino_101.conf

Change-Id: I2d92e41991f322c6d440f0545feee8f4d9a60edc
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-08 10:18:45 +02:00
Tomasz Bursztyka
85103e15de doc/net: Add L2 and device driver document
This one will quickly describe how the L2 concept fits into the network
stack, what is its role and how device drivers are then made.

Jira: ZEP-824

Change-Id: Ib5d49a5194fe4f67ad1196266ad09f40d732d5ee
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-02-08 10:12:36 +02:00
Juan Manuel Cruz
5225daad94 mbedtls: add arduino 101 configuration to ssl client sample
Jira: ZEP-748

Change-Id: Ied8c521f80b8f1d4b22497a059ee5c948449613f
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2017-02-08 10:12:36 +02:00