Commit graph

41120 commits

Author SHA1 Message Date
Andrew Boie
d4e0b41665 ztest.h: add required definition for unified kernel
Change-Id: I21a3b7ce8aefc69193f362a5b299fa83da303eb5
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-11-07 19:29:02 +00:00
Andrew Boie
2c55bc5f7f legacy: fix fiber_start on non 32-bit
Change-Id: Icf4ccef8e1b520dafcdfe17a28cb548ecc8abf15
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-11-07 19:29:02 +00:00
Andrew Boie
ef09f8dd5f tests: remove errant -O0
Should never be necessary.

Change-Id: I8c7d1be3e9c9279e12ed6f26d8ab8404ee7d6cb0
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-11-07 19:29:01 +00:00
Fabien Parent
060cca0c78 stm32cube: import stm32cube files for STM32L4xx
Import the STM32CUBE files that will be used for the support
of the STM32L4xx series.

The files were taken from stm32cube_fw_l4_v152.zip.

Origin: STM32CubeMX
URL: http://www.st.com/en/development-tools/stm32cubemx.html?icmp=stm32cubemx_pron_pr-stm32cubef2_apr2014&sc=stm32cube-pr2
Version: v152
Purpose: Introduction of STM32L4xx SoC definitions
Maintained-by: External

Change-Id: Ib33a86aa35168827ff2d47f0793554fe35945762
Signed-off-by: Fabien Parent <fparent@baylibre.com>
2016-11-07 18:57:46 +00:00
Chuck Jordan
381cb25f63 arc: cache.h support added for em7d and em11d SOC
An implementation to flush multiple d-cache lines has been added
per the top-level cache.h API. ZEP-1153 was opened to express
the need for MORE i-cache and d-cache APIs. For example, the current
cache.h API doesn't provide a means to invalidate d-cache lines
and has nothing for i-cache.

I've also modified some of the i-cache related aux registers to have
better names so that they won't be confused with d-cache.
These changes are for
ZEP-1176.

Change-Id: If4c5410451cc40dcd5618fc871093c8febf7e061
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-11-07 18:53:49 +00:00
Allan Stephens
22ea605eab kernel: Remove traces of legacy task groups from public API
Change-Id: Id4c4508020063ac8a7186daea7b56f5ce29a62d6
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-11-07 18:52:32 +00:00
Allan Stephens
f48f263665 kernel: Rename USE_FP and USE_SSE symbols
Symbols now use the K_ prefix which is now standard for the
unified kernel. Legacy support for these symbols is retained
to allow existing applications to build successfully.

Change-Id: I3ff12c96f729b535eecc940502892cbaa52526b6
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-11-07 18:52:31 +00:00
Jorge Ramirez-Ortiz
27ecd5d8f3 drivers: flash: SoC KSDK
This KSDK flash shim driver supports the device in the FRDM K64F
platform (enabled with this commit).

WARNING: the driver disables the system interrupts for potentially
long periods of time. This is required to avoid Read-While-Write
issues since most platforms run in XIP mode.

For more detailed information see the link below:
http://cache.freescale.com/files/32bit/doc/app_note/AN4695.pdf

Change-Id: I70f8d09080251033ce2f45be0c2eb95c19fded08
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
2016-11-07 18:43:16 +00:00
Anas Nashif
4dac457bf3 trivial: remove old reference to nanokernel/cpu.h
Change-Id: I917b71feb0894b59b9c5b5e753d2b0f116ee63f4
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-07 15:39:16 +00:00
Anas Nashif
12ffc58d4b benchmarks: rename _NanoTscRead -> _tsc_read
Change-Id: Id5687f79ac13136f14a14d250e149436a0173f04
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-07 15:39:15 +00:00
Daniel Thompson
608abd987c build: Handle ALL_LIBS dependencies correctly
ALL_LIBS is used by applications to introduce extra libraries to the
build. Currently zephyr is not relinked when the library is altered.
Fix this the obvious way by adding ALL_LIBS to the list of zephyr
dependencies.

Change-Id: I2d1914fe1b968f488082264d362d8dadfba0f7b2
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
2016-11-07 14:56:16 +00:00
Allan Stephens
68dda5417d kernel: Eliminate duplication of #define FPU
To avoid conflicts with the definition of "FPU" by the external
cmsis sub-system, the symbol "FPU_LEGACY" is now used to denote
the FPU task group. (That is, the group of tasks that utilize
the CPU's floating point registers.)

Backwards compatibility impacts:

* Microkernel applications that define private tasks using the
  DEFINE_TASK() macro must now use "FPU_LEGACY" to indicate
  that the task is part of the FPU task group, rather than "FPU".

* Applications that perform operations on the members of the
  FPU task group must now use "FPU_LEGACY", rather than "FPU".
  (Note: There is no apparent reason for an application to
  perform such an operation, so this is unlikely to impact
  existing applications.)

Backwards compatibility non-impacts:

* Application MDEFs can continue to specify "FPU" when defining
  a public task that is part of the FPU task group.

* Applications written for the unified kernel are unaffected,
  since the kernel implements task groups differently.

Change-Id: I972eecbc7b50d66f0a4f095d2d5177b5ce90cb71
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-11-07 13:31:57 +00:00
Tomasz Bursztyka
3fb51f6f46 drivers: gpio: Remove mmio driver
It's unused anywhere and unlikely to be in the future.

Change-Id: I57926e91da7d31ef6ddda4f86e6dac103dbfa176
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-11-07 07:20:04 -05:00
Carles Cufi
b8d81b8887 boards: Add support for the BBC micro:bit nRF51 board
Board uses nRF51822-QFAA, with 16kB of RAM and 256kB of flash.
The UART has no hardware flow control pins.

Change-Id: I16ffeee15a1f5714c695dc8b38e77fb134ea7a0f
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
2016-11-07 12:04:04 +00:00
Vinayak Chettimada
fb032efa90 Bluetooth: Controller: Use configured clock source
Remove hardcoded use of crystal as 32KHz clock source and
20 ppm accuracy; and use the values from config for sleep
clock source and sleep clock accuracy value in Bluetooth
Controller.

Change-id: I1c0d53ecf8ad158153d5186a6680b5eb03d1641b
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
2016-11-07 12:04:03 +00:00
Vinayak Chettimada
13534dbf2c drivers: clock_control: Add nRF5x 32KHz source and accuracy support
Change-id: I0b0909f06c784e340eeed472124e8bcbdffd4337
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
2016-11-07 12:04:02 +00:00
Kumar Gala
773a3b08de tests: tests: Mark a bunch of testcases that are memory (RAM) limited
We the unified kernel now sizes have gone up and we have some more
testcases that are RAM limited on small memory systems.

Change-Id: I4716a779fac86a420607ba716edd012976d14254
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-11-07 02:18:13 +00:00
Johan Hedberg
74147ae578 MAINTAINERS: Add documentation location to Bluetooth subsystem
Add the path to Bluetooth subsystem documentation so the right
reviewers get added in gerrit for patches that modify the
documentation.

Change-Id: I0f8049989afbd955599eddd6f7623a0574f033c5
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-11-06 10:54:21 +02:00
Sergio Rodriguez
ddd47e2292 samples/net: mbedTLS TCP client use unified kernel
Use unified kernel.

Change-Id: I533321e908de999d9da9bd26adfc6215175a0cd9
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-11-05 13:01:21 +00:00
Anas Nashif
d9188377f0 doc: remove microkernel references from getting starting guide
Change-Id: I5ada27e69982d3488e70ad601488fdadc9ebd9f6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-05 11:20:46 +00:00
Genaro Saucedo Tejada
607edcf066 sanity: dont run footprint on quark_d2000_crb
Commit 4187822d08 removed some filters
at sanitycheck script that were previously preventing foot print test
to run on board quark_d2000_crb.

Added filter excludes such board from min and reg footprint tests.

Change-Id: I2a32e34b1af6d16b3da418cd3113c52b2369eb97
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-11-04 23:32:27 +00:00
Jesus Sanchez-Palencia
f5fa7081f8 ext qmsi i2c: Remove DMA hard dependency
After QMSI 1.3.1 release, qm_dma is no longer a hard dependency for
qm_i2c. Fix our build system to reflect that change.

Change-Id: I3646bc519721a5aa18e8db5d2497d7a2550241ca
Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
2016-11-04 23:31:39 +00:00
Jesus Sanchez-Palencia
55c00ad721 ext qmsi: Update to 1.3.1 version
Update to QMSI 1.3.1 release.

The only build fix needed was due to the split of the I2C ISR on
qm_isr.h .

Change-Id: Ide7a1537572c72981ec3283dc5cf0d543d9ac7d1
Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
2016-11-04 23:31:29 +00:00
Maureen Helm
33ee93d7dd serial/uart_k20: Fix instance source clock frequencies
The uart_k20 serial driver incorrectly assumed that all instances of the
UART peripheral are driven by the system clock, when actually some
instances are driven by the bus clock (which usually runs at half the
system clock). This caused incorrect baud rate calculations for UART
instances driven by the bus clock (UART2-4).

Change-Id: I38041781cdee146912bb5167e7c71d6416b966b5
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2016-11-04 23:00:04 +00:00
Maureen Helm
2393154621 frdm_k64f: Change PTC16-17 pinmux to select UART signals
These pins are routed to the arduino header, and configuring them for
UART signals allows us to use the frdm_k64f with a frdm_kw40z shield
board for bluetooth.

Change-Id: Ie30916409844b1dc1c6e1280d5a755a6dc42e418
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2016-11-04 23:00:03 +00:00
Maureen Helm
6e6532c703 frdm_k64f: Change default Bluetooth UART dev name
Change the default Bluetooth UART device name to the UART connected to
the arduino header. This allows using the frdm_k64f with a frdm_kw40z
shield board.

Change-Id: Id22950f0a48a7c95bcddc6f1ec044f7a37cb9b72
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2016-11-04 23:00:03 +00:00
Maureen Helm
3dcf81576b hexiwear_k64: Change default Bluetooth UART dev name
Change the default Bluetooth UART device name to the UART connected to
the on-board kw40.

Change-Id: I2ae981bce31a58aed4dc6d3c378fc6f6a0bec76f
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2016-11-04 23:00:02 +00:00
Andrew Boie
3a6bd2a552 arm: remove support for legacy kernels
Change-Id: I93c2dd6bf7286f50cb2702a94cbc85dc3bdee807
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-11-04 22:56:18 +00:00
Piotr Mienkowski
dccec68e0f arm: add missing atomic operations selection for Cortex-M7 processor
This change is required to support unified kernel.

Change-Id: I47bd644239eb3e624c7a5cb456eedad5aca79e8e
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2016-11-04 17:46:03 -05:00
Benjamin Walsh
8cf56bcac7 unified: dissociate system workqueue from common workqueue module
Making a reference to the common work queue code should not necessarily
drag in the system workqueue, since it is possible to use a workqueue
that is not the system workqueue. This is done by moving the system
workqueue into its own code module.

Moving the system workqueue to its own code module allows removing the
NANO_WORKQUEUE and SYSTEM_WORKQUEUE kconfig options, and compiling the
common workqueue code and system workqueue all the time. They are only
linked in the final image if a reference to them exist, same as the
other kernel modules.

Change-Id: I6f48d2542bda24f4702e7c2e317818dd082b3c11
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-11-04 22:39:54 +00:00
Andrew Boie
fcfddc0f5d kernel: delete old micro and nanokernel documentation
Change-Id: Id1685930dd11f4b5038d5f98da978c6348b67966
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-11-04 20:51:01 +00:00
Johan Hedberg
c3889ceb5b Merge bluetooth branch into master
Main changes:

 - Move net/bluetooth/ to subsys/bluetooth/host/
 - Move drivers/bluetooth/controller to subsys/bluetooth/controller
 - Fix re-encryption procedure in controller
 - Fixes & cleanups to L2CAP Connection oriented Channels
 - Improved RFCOMM support

----------------------------------------------------------------
Jaganath Kanakkassery (6):
      Bluetooth: RFCOMM: Remove extra tab
      Bluetooth: RFCOMM: Define enum and macros for role and CR
      Bluetooth: RFCOMM: Introduce helper to get session
      Bluetooth: RFCOMM: Introduce helper to initialize dlc
      Bluetooth: RFCOMM: Set sec_level to LOW during L2CAP register
      Bluetooth: RFCOMM: Define macro for PF bit

Johan Hedberg (4):
      Bluetooth: Move Bluetooth host stack to subsys
      Bluetooth: Move controller code to subsys/bluetooth
      Bluetooth: Remove misleading NBLE mentions from sample README files
      Bluetooth: Print full controller info upon init

Luiz Augusto von Dentz (5):
      Bluetooth: L2CAP: Make CoC depend on SMP
      Bluetooth: L2CAP: Handle LE connection response security errors
      Bluetooth: L2CAP: Fix not updating CoC channel state
      Bluetooth: L2CAP: Log state transitions
      Bluetooth: L2CAP: Make use of bt_l2cap_chan_set_state on BR/EDR

Mariusz Skamra (7):
      Bluetooth: tester: Rename config files
      Bluetooth: tester: Add configuration file for Zephyr BLE firmware
      Bluetooth: tester: Set Zephyr-based BLE configuration as default
      Bluetooth: tester: Fix configuration file name
      Bluetooth: GATT: Pass data buffer as NULL if length is 0
      Bluetooth: tester: Increase number of available L2CAP channels
      Bluetooth: tester: Enable privacy for QEMU configuration

Sathish Narasimman (1):
      Bluetooth: Fix initialization of variable

Vinayak Chettimada (1):
      Bluetooth: Controller: Fix re-encryption procedure

 MAINTAINERS                          |   4 +-
 .../bluetooth/bluetooth.rst          |   2 +-
 drivers/bluetooth/Kconfig            |   2 -
 drivers/bluetooth/Makefile           |   1 -
 drivers/bluetooth/nble/Makefile      |   2 +-
 include/bluetooth/l2cap.h            |   4 +-
 include/bluetooth/rfcomm.h           |   9 +-
 net/Kconfig                          |   2 -
 net/Makefile                         |   1 -
 net/ip/Kconfig                       |   1 +
 samples/bluetooth/peripheral/README  |   4 -
 .../bluetooth/peripheral_esp/README  |   4 -
 .../bluetooth/peripheral_hr/README   |   4 -
 subsys/Kconfig                       |   1 +
 subsys/Makefile                      |   1 +
 subsys/bluetooth/Kconfig             |  20 +
 subsys/bluetooth/Makefile            |   2 +
 .../bluetooth/controller/Kconfig     |   0
 .../bluetooth/controller/Makefile    |   6 +-
 .../bluetooth/controller/hal/ccm.h   |   0
 .../bluetooth/controller/hal/cpu.h   |   0
 .../bluetooth/controller/hal/debug.h |   0
 .../bluetooth/controller/hal/ecb.c   |   0
 .../bluetooth/controller/hal/ecb.h   |   0
 .../controller/hal/hal_rtc.h         |   0
 .../controller/hal/hal_work.h        |   0
 .../bluetooth/controller/hal/radio.c |   0
 .../bluetooth/controller/hal/radio.h |   0
 .../bluetooth/controller/hal/rand.c  |   0
 .../bluetooth/controller/hal/rand.h  |   0
 .../bluetooth/controller/hal/rtc.c   |   0
 .../bluetooth/controller/hci/hci.c   |   0
 .../controller/hci/hci_driver.c      |   2 +-
 .../controller/hci/hci_internal.h    |   0
 .../bluetooth/controller/ll/ctrl.c   |   2 +-
 .../bluetooth/controller/ll/ctrl.h   |   0
 .../controller/ll/ctrl_internal.h    |   1 -
 .../bluetooth/controller/ll/ll.c     |   0
 .../bluetooth/controller/ll/ll.h     |   0
 .../bluetooth/controller/ll/pdu.h    |   0
 .../bluetooth/controller/ll/ticker.c |   0
 .../bluetooth/controller/ll/ticker.h |   0
 .../controller/util/defines.h        |   0
 .../bluetooth/controller/util/mem.c  |   0
 .../bluetooth/controller/util/mem.h  |   0
 .../bluetooth/controller/util/memq.c |   0
 .../bluetooth/controller/util/memq.h |   0
 .../bluetooth/controller/util/util.c |   0
 .../bluetooth/controller/util/util.h |   0
 .../bluetooth/controller/util/work.c |   0
 .../bluetooth/controller/util/work.h |   0
 .../bluetooth/host}/Kconfig          |   1 +
 .../bluetooth/host}/Makefile         |   0
 .../bluetooth/host}/a2dp.c           |   0
 .../bluetooth/host}/a2dp_internal.h  |   0
 .../bluetooth/host}/at.c             |   2 +
 .../bluetooth/host}/at.h             |   0
 .../bluetooth/host}/att.c            |   0
 .../bluetooth/host}/att_internal.h   |   0
 .../bluetooth/host}/avdtp.c          |   0
 .../bluetooth/host}/avdtp_internal.h |   0
 .../bluetooth/host}/conn.c           |   0
 .../bluetooth/host}/conn_internal.h  |   0
 .../bluetooth/host}/ecc.h            |   1 -
 .../bluetooth/host}/gatt.c           |  13 +-
 .../bluetooth/host}/gatt_internal.h  |   0
 .../bluetooth/host}/hci_core.c       |  39 +-
 .../bluetooth/host}/hci_core.h       |   2 +
 .../bluetooth/host}/hci_ecc.c        |   0
 .../bluetooth/host}/hci_ecc.h        |   0
 .../bluetooth/host}/hci_raw.c        |   0
 .../bluetooth/host}/hfp_hf.c         |   0
 .../bluetooth/host}/hfp_internal.h   |   0
 .../bluetooth/host}/keys.c           |   1 -
 .../bluetooth/host}/keys.h           |   0
 .../bluetooth/host}/keys_br.c        |   0
 .../bluetooth/host}/l2cap.c          | 265 +++++++++---
 .../bluetooth/host}/l2cap_br.c       | 108 +----
 .../bluetooth/host}/l2cap_internal.h |  12 +
 .../bluetooth/host}/log.c            |   0
 .../bluetooth/host}/monitor.c        |   0
 .../bluetooth/host}/monitor.h        |   0
 .../bluetooth/host}/rfcomm.c         |  98 +++--
 .../host}/rfcomm_internal.h          |  43 +-
 .../bluetooth/host}/sdp.c            |   0
 .../bluetooth/host}/sdp_internal.h   |   0
 .../bluetooth/host}/smp.c            |   0
 .../bluetooth/host}/smp.h            |   0
 .../bluetooth/host}/smp_null.c       |   0
 .../bluetooth/host}/uuid.c           |   0
 tests/bluetooth/shell/README         |   7 -
 tests/bluetooth/tester/Makefile      |   5 +-
 tests/bluetooth/tester/README        |  18 +-
 tests/bluetooth/tester/default.conf  |  15 +
 .../{prj_nble.conf => nble.conf}     |   0
 .../{prj_nimble.conf => nimble.conf} |   0
 .../tester/{prj.conf => qemu.conf}   |   1 +
 tests/bluetooth/tester/src/l2cap.c   |   2 +-
 tests/bluetooth/tester/testcase.ini  |   2 +-
 99 files changed, 455 insertions(+), 255 deletions(-)
 delete mode 100644 samples/bluetooth/peripheral/README
 delete mode 100644 samples/bluetooth/peripheral_esp/README
 delete mode 100644 samples/bluetooth/peripheral_hr/README
 create mode 100644 subsys/bluetooth/Kconfig
 create mode 100644 subsys/bluetooth/Makefile
 rename {drivers => subsys}/bluetooth/controller/Kconfig (100%)
 rename {drivers => subsys}/bluetooth/controller/Makefile (70%)
 rename {drivers => subsys}/bluetooth/controller/hal/ccm.h (100%)
 rename {drivers => subsys}/bluetooth/controller/hal/cpu.h (100%)
 rename {drivers => subsys}/bluetooth/controller/hal/debug.h (100%)
 rename {drivers => subsys}/bluetooth/controller/hal/ecb.c (100%)
 rename {drivers => subsys}/bluetooth/controller/hal/ecb.h (100%)
 rename {drivers => subsys}/bluetooth/controller/hal/hal_rtc.h (100%)
 rename {drivers => subsys}/bluetooth/controller/hal/hal_work.h (100%)
 rename {drivers => subsys}/bluetooth/controller/hal/radio.c (100%)
 rename {drivers => subsys}/bluetooth/controller/hal/radio.h (100%)
 rename {drivers => subsys}/bluetooth/controller/hal/rand.c (100%)
 rename {drivers => subsys}/bluetooth/controller/hal/rand.h (100%)
 rename {drivers => subsys}/bluetooth/controller/hal/rtc.c (100%)
 rename {drivers => subsys}/bluetooth/controller/hci/hci.c (100%)
 rename {drivers => subsys}/bluetooth/controller/hci/hci_driver.c (99%)
 rename {drivers => subsys}/bluetooth/controller/hci/hci_internal.h (100%)
 rename {drivers => subsys}/bluetooth/controller/ll/ctrl.c (99%)
 rename {drivers => subsys}/bluetooth/controller/ll/ctrl.h (100%)
 rename {drivers => subsys}/bluetooth/controller/ll/ctrl_internal.h (99%)
 rename {drivers => subsys}/bluetooth/controller/ll/ll.c (100%)
 rename {drivers => subsys}/bluetooth/controller/ll/ll.h (100%)
 rename {drivers => subsys}/bluetooth/controller/ll/pdu.h (100%)
 rename {drivers => subsys}/bluetooth/controller/ll/ticker.c (100%)
 rename {drivers => subsys}/bluetooth/controller/ll/ticker.h (100%)
 rename {drivers => subsys}/bluetooth/controller/util/defines.h (100%)
 rename {drivers => subsys}/bluetooth/controller/util/mem.c (100%)
 rename {drivers => subsys}/bluetooth/controller/util/mem.h (100%)
 rename {drivers => subsys}/bluetooth/controller/util/memq.c (100%)
 rename {drivers => subsys}/bluetooth/controller/util/memq.h (100%)
 rename {drivers => subsys}/bluetooth/controller/util/util.c (100%)
 rename {drivers => subsys}/bluetooth/controller/util/util.h (100%)
 rename {drivers => subsys}/bluetooth/controller/util/work.c (100%)
 rename {drivers => subsys}/bluetooth/controller/util/work.h (100%)
 rename {net/bluetooth => subsys/bluetooth/host}/Kconfig (99%)
 rename {net/bluetooth => subsys/bluetooth/host}/Makefile (100%)
 rename {net/bluetooth => subsys/bluetooth/host}/a2dp.c (100%)
 rename {net/bluetooth => subsys/bluetooth/host}/a2dp_internal.h (100%)
 rename {net/bluetooth => subsys/bluetooth/host}/at.c (99%)
 rename {net/bluetooth => subsys/bluetooth/host}/at.h (100%)
 rename {net/bluetooth => subsys/bluetooth/host}/att.c (100%)
 rename {net/bluetooth => subsys/bluetooth/host}/att_internal.h (100%)
 rename {net/bluetooth => subsys/bluetooth/host}/avdtp.c (100%)
 rename {net/bluetooth => subsys/bluetooth/host}/avdtp_internal.h (100%)
 rename {net/bluetooth => subsys/bluetooth/host}/conn.c (100%)
 rename {net/bluetooth => subsys/bluetooth/host}/conn_internal.h (100%)
 rename {net/bluetooth => subsys/bluetooth/host}/ecc.h (99%)
 rename {net/bluetooth => subsys/bluetooth/host}/gatt.c (99%)
 rename {net/bluetooth => subsys/bluetooth/host}/gatt_internal.h (100%)
 rename {net/bluetooth => subsys/bluetooth/host}/hci_core.c (99%)
 rename {net/bluetooth => subsys/bluetooth/host}/hci_core.h (98%)
 rename {net/bluetooth => subsys/bluetooth/host}/hci_ecc.c (100%)
 rename {net/bluetooth => subsys/bluetooth/host}/hci_ecc.h (100%)
 rename {net/bluetooth => subsys/bluetooth/host}/hci_raw.c (100%)
 rename {net/bluetooth => subsys/bluetooth/host}/hfp_hf.c (100%)
 rename {net/bluetooth => subsys/bluetooth/host}/hfp_internal.h (100%)
 rename {net/bluetooth => subsys/bluetooth/host}/keys.c (99%)
 rename {net/bluetooth => subsys/bluetooth/host}/keys.h (100%)
 rename {net/bluetooth => subsys/bluetooth/host}/keys_br.c (100%)
 rename {net/bluetooth => subsys/bluetooth/host}/l2cap.c (89%)
 rename {net/bluetooth => subsys/bluetooth/host}/l2cap_br.c (94%)
 rename {net/bluetooth => subsys/bluetooth/host}/l2cap_internal.h (93%)
 rename {net/bluetooth => subsys/bluetooth/host}/log.c (100%)
 rename {net/bluetooth => subsys/bluetooth/host}/monitor.c (100%)
 rename {net/bluetooth => subsys/bluetooth/host}/monitor.h (100%)
 rename {net/bluetooth => subsys/bluetooth/host}/rfcomm.c (93%)
 rename {net/bluetooth => subsys/bluetooth/host}/rfcomm_internal.h (73%)
 rename {net/bluetooth => subsys/bluetooth/host}/sdp.c (100%)
 rename {net/bluetooth => subsys/bluetooth/host}/sdp_internal.h (100%)
 rename {net/bluetooth => subsys/bluetooth/host}/smp.c (100%)
 rename {net/bluetooth => subsys/bluetooth/host}/smp.h (100%)
 rename {net/bluetooth => subsys/bluetooth/host}/smp_null.c (100%)
 rename {net/bluetooth => subsys/bluetooth/host}/uuid.c (100%)
 delete mode 100644 tests/bluetooth/shell/README
 create mode 100644 tests/bluetooth/tester/default.conf
 rename tests/bluetooth/tester/{prj_nble.conf => nble.conf} (100%)
 rename tests/bluetooth/tester/{prj_nimble.conf => nimble.conf} (100%)
 rename tests/bluetooth/tester/{prj.conf => qemu.conf} (95%)

Change-id: I27822b128f9dd739e2a7005b1385705800f8e35c
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-11-04 22:08:16 +02:00
Mariusz Skamra
0c8ea2037e Bluetooth: tester: Enable privacy for QEMU configuration
Change-Id: I9030f94bb42bfc0aa3e39dac52570eae1d2121a0
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-11-04 22:06:31 +02:00
Mariusz Skamra
d1b8d25068 Bluetooth: tester: Increase number of available L2CAP channels
This increases number of available L2CAP channels for the test purposes.
This is needed for TC_COS_CFC_BV_05_C test case.

Change-Id: I5df099fb64632e1a0e557852ca55ee45a9cc89ed
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-11-04 22:06:31 +02:00
Johan Hedberg
f26007d212 Bluetooth: Print full controller info upon init
Provide more detailed information about the controller address and
version upon init when debug is enabled.

Change-Id: I5fe9c7c91f95928cb3cc64b801137bb1466e4115
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-11-04 22:06:31 +02:00
Vinayak Chettimada
d62426030c Bluetooth: Controller: Fix re-encryption procedure
During implementation of alternate encryption procedure
usable in nRF51, commited in
c41d3edda8, re-encryption
procedure was broken. This commit fixes the issue, and
now re-encryption should work on both nRF51 and nRF52.

Change-id: Ia41200f42b1d46e1f3f35ff44b582d4ffcc5f4fa
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
2016-11-04 22:06:31 +02:00
Mariusz Skamra
748c00b31e Bluetooth: GATT: Pass data buffer as NULL if length is 0
So that application could check data pointer to see if any
data have been received and if read operation is complete.

Change-Id: I36c3ff81baefbc535374d937e5297938445eafa6
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-11-04 22:06:31 +02:00
Luiz Augusto von Dentz
1b7c219f8a Bluetooth: L2CAP: Make use of bt_l2cap_chan_set_state on BR/EDR
This makes use of the same code used by LE to print the state transitions.

Change-Id: I90a04f3c3f426fde1e0987acb572f7371c483c1c
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-11-04 22:06:31 +02:00
Luiz Augusto von Dentz
5fecf98c8e Bluetooth: L2CAP: Log state transitions
This adds a common function to log state transitions including the caller
function and line in case something goes wrong:

[bt] [DBG] bt_l2cap_chan_disconnect: (0x0011b14c) chan 0x001199c0 scid 0x0040 dcid 0x0040
[bt] [DBG] bt_l2cap_chan_set_state_debug: (0x0011b14c) chan 0x001199c0 psm 0x0080 connect -> disconnect
[bt] [WRN] bt_l2cap_chan_set_state_debug: bt_l2cap_chan_disconnect()1562: invalid transition

Change-Id: I246a9004a04d93a38b8c7f7633705f6c191698b2
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-11-04 22:06:31 +02:00
Luiz Augusto von Dentz
349230321f Bluetooth: L2CAP: Fix not updating CoC channel state
Channel state shall be updated properly otherwise it may cause unexpected
errors.

Change-Id: Ifd54d6bd3c5b44a40c315fd8a2946b30168aa65f
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-11-04 22:06:31 +02:00
Jaganath Kanakkassery
88038d1782 Bluetooth: RFCOMM: Define macro for PF bit
This defines and clarifies PF bit macro for both UIH and
non UIH packets.

Change-Id: Ide7736c0fc8607708824766adbfccf1bd7bc48e9
Signed-off-by: Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
2016-11-04 22:06:31 +02:00
Jaganath Kanakkassery
70f1df22a4 Bluetooth: RFCOMM: Set sec_level to LOW during L2CAP register
Security will be elevated based on the DLC required level
during connection.

Change-Id: I0b63885582f34a5689f7bc8081c1f9f011b2325f
Signed-off-by: Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
2016-11-04 22:06:31 +02:00
Sathish Narasimman
56392e5c2e Bluetooth: Fix initialization of variable
Initialize the variable to zero before computing.

Change-Id: Iccdf77a085667728dbb68779f001c8d940a7a89d
Signed-off-by: Sathish Narasimman <sathish.narasimman@intel.com>
2016-11-04 22:06:31 +02:00
Mariusz Skamra
3b27f9857d Bluetooth: tester: Fix configuration file name
This fixes configuration file name in testcase.ini file.

Change-Id: I6496f98694415bfc3a76308aa9ee6dfd008e1691
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-11-04 22:06:31 +02:00
Mariusz Skamra
00f4f2f66c Bluetooth: tester: Set Zephyr-based BLE configuration as default
This updates README as well as makefile to choose Zephyr BLE firmware
configuration as a default one.

Closes: ZEP-1187

Change-Id: I78dec2a4e2b5bfe634a8b7b8897d4f6ab6b37b44
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-11-04 22:06:31 +02:00
Mariusz Skamra
8f2ffb6a45 Bluetooth: tester: Add configuration file for Zephyr BLE firmware
This adds sample configuration file for tester application that
supports controllers with Zephyr-based BLE firmware.

Change-Id: I8b63f93d1395837b8485aba7060b6626be1daab1
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-11-04 22:06:07 +02:00
Mariusz Skamra
79b5e7e6fa Bluetooth: tester: Rename config files
This removes redundant prj_* prefix from configuration file name.

Change-Id: I9867fa345791e68b64f83bb0cd75634cf1cde887
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-11-04 22:06:07 +02:00
Luiz Augusto von Dentz
807bd5fec8 Bluetooth: L2CAP: Handle LE connection response security errors
If there are security errors bump the security of the connection and
retry:

7C:7A:91:18:82:5F (public)> l2cap-connect 0x0080
[bt] [DBG] bt_l2cap_chan_connect: (0x0011ae8c) conn 0x0011b940 chan 0x00119700 psm 0x0080
[bt] [DBG] l2cap_chan_tx_init: (0x0011ae8c) chan 0x00119700
[bt] [DBG] l2cap_chan_rx_init: (0x0011ae8c) chan 0x00119700
[bt] [DBG] bt_l2cap_chan_add: (0x0011ae8c) conn 0x0011b940 chan 0x00119700
L2CAP connection pending
7C:7A:91:18:82:5F (public)> [bt] [DBG] bt_l2cap_recv: (0x0011ced8) Packet for CID 5 len 14
[bt] [DBG] l2cap_chan_recv: (0x0011ced8) chan 0x0011bd00 len 14
[bt] [DBG] l2cap_recv: (0x0011ced8) Signaling code 0x15 ident 2 len 10
[bt] [DBG] le_conn_rsp: (0x0011ced8) dcid 0x0000 mtu 0 mps 0 credits 0 result 0x0005
[bt] [DBG] bt_l2cap_recv: (0x0011ced8) Packet for CID 6 len 7
[bt] [DBG] l2cap_chan_recv: (0x0011ced8) chan 0x0011bf00 len 7
[bt] [DBG] bt_l2cap_recv: (0x0011ced8) Packet for CID 6 len 65
[bt] [DBG] l2cap_chan_recv: (0x0011ced8) chan 0x0011bf00 len 65
[bt] [DBG] bt_l2cap_recv: (0x0011ced8) Packet for CID 6 len 17
[bt] [DBG] l2cap_chan_recv: (0x0011ced8) chan 0x0011bf00 len 17
[bt] [DBG] bt_l2cap_recv: (0x0011ced8) Packet for CID 6 len 17
[bt] [DBG] l2cap_chan_recv: (0x0011ced8) chan 0x0011bf00 len 17
Security changed: 7C:7A:91:18:82:5F (public) level 2
[bt] [DBG] bt_l2cap_recv: (0x0011ced8) Packet for CID 5 len 14
[bt] [DBG] l2cap_chan_recv: (0x0011ced8) chan 0x0011bd00 len 14
[bt] [DBG] l2cap_recv: (0x0011ced8) Signaling code 0x15 ident 3 len 10
[bt] [DBG] le_conn_rsp: (0x0011ced8) dcid 0x0040 mtu 672 mps 230 credits 10 result 0x0000
Channel 0x00119700 connected

Change-Id: I2402fd86cc6bdf41a537053325e0a1973c23377a
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-11-04 22:05:05 +02:00
Luiz Augusto von Dentz
d1ae81eddd Bluetooth: L2CAP: Make CoC depend on SMP
This is necessary in order to properly handle security errors which are
part of the testing specification thus can influence qualification.

Change-Id: If444e753be9196f3d5bb36cea00e332a33aa249f
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-11-04 22:05:05 +02:00
Johan Hedberg
ac844cf687 Bluetooth: Remove misleading NBLE mentions from sample README files
The README files provided with the samples contain references to NBLE,
which is not a publicly supported solution for Bluetooth. Simply
remove these files. If the need arises to provide application-specific
information in the future we can add back per-application README
files.

Jira: ZEP-1183

Change-Id: I81b3ea5491d50fb16062ccd5a421ddc8fcb7ea42
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-11-04 22:05:05 +02:00