Commit graph

42249 commits

Author SHA1 Message Date
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
Jaganath Kanakkassery
5d40ea1d15 Bluetooth: RFCOMM: Introduce helper to initialize dlc
This is to avoid code duplication while implementing outgoing
connection.

Change-Id: I52f882b7be9180f29def59c8ac3ef0a4798b719d
Signed-off-by: Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
2016-11-04 22:05:05 +02:00
Jaganath Kanakkassery
e3c258e286 Bluetooth: RFCOMM: Introduce helper to get session
This is to avoid code duplication while implementing outgoing
connection.

This also moves setting initiator flag while allocating, than
doing it when SABM is received.

Change-Id: I8e811c995bf0eaa0bd24715e2e96d8a578a79c5d
Signed-off-by: Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
2016-11-04 22:05:05 +02:00
Jaganath Kanakkassery
2eba256fd2 Bluetooth: RFCOMM: Define enum and macros for role and CR
This replaces initiator flag of session and dlc to enum which has
two values INITIATOR and ACCEPTOR.

Also this defines macros for CRs in header. Basically there are
three types fo CRs. Frame header CR has different meaning for
UIH and non UIH packets. Also this renames the existing msg hdr
CR to make it consistent.

These changes are basically done to make it more readable

Change-Id: Ic15e93465b0afbd19d8805f27d7a43f34ef38689
Signed-off-by: Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
2016-11-04 22:05:05 +02:00
Jaganath Kanakkassery
f6f4acbced Bluetooth: RFCOMM: Remove extra tab
Change-Id: I2edafa32711cbac933d719a1ea0736e955bbb12c
Signed-off-by: Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
2016-11-04 22:05:05 +02:00
Johan Hedberg
26d39cd107 Bluetooth: Move controller code to subsys/bluetooth
Move controller code from drivers/controller to
subsys/bluetooth/controller.

Change-Id: I73f675188485aa3267507bad7647796e593a3da0
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-11-04 22:05:05 +02:00
Johan Hedberg
6bc645962a Bluetooth: Move Bluetooth host stack to subsys
Move the Bluetooth host stack from net/bluetooth to
subsys/bluetooth/host. This is preparation for having both host and
controller under the same root, i.e. subsys/bluetooth/.

Change-Id: I3bc796f7e331fca0c485f3890d62b9c03e027b96
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-11-04 22:05:05 +02:00
Anas Nashif
d622b09bc0 samples: tests: remove obsolete KERNEL_TYPE and kernel variables
Remove those from Makefiles and testcase.ini, we now support unified kernel
only and sanitycheck script now knows how to deal with this.

Change-Id: I853ebcadfa7b56a4de5737d95f2ba096babb2e13
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-04 15:47:25 -04:00
Andrew Boie
b4cc4c9bea sysgen: build for unified kernel only
sysgen will also now re-run if the build system detects that
the script itself has changed.

Change-Id: I2bf5c4893da088fa27729bc6337bc66cc4cee341
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-11-04 19:19:17 +00:00
Genaro Saucedo Tejada
d26b47bd9b sanity: Exclude platform cc3200_launchxl from test_xip
Test tests/kernel/test_xip does not fit FLASH region of new platform
cc3200_launchxl that was added by commit 10ea5d0, hence it must be
excluded from such test so daily sanitycheck script completes
successfully.

Jira: ZEP-1201

Change-Id: I01ec2b9af45e34934d91922bd749a83f305746b1
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-11-04 19:07:09 +00:00
Andrew Boie
a62d4be68b nios2: remove support for legacy kernels
Change-Id: If16533a478e5cd10f924eb6abe4b25c9902733c5
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-11-04 11:45:14 -07:00
Andrew Boie
8871cf0994 arc: remove support for legacy kernels
Change-Id: Id3d8285dc39428752758ee47fb1b826f05b1f3e0
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-11-04 11:45:14 -07:00
Andrew Boie
6e172b8abd x86: remove legacy kernel support
Change-Id: I81111a58d1305bd521ea93adc40c66b43f20977c
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-11-04 11:45:13 -07:00
Andrew Boie
4187822d08 sanitycheck: build for unified kernel only
Change-Id: I3bd744b10341bc7292fb0670faf217933efe9edc
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-11-04 18:32:15 +00:00
Andrew Boie
c2de216154 build: force all kernel builds to be Unified kernel
KERNEL_TYPE build parameter is now ignored.

Change-Id: I7523f14ff674ef8b8e24246e5f71111df81cf7df
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-11-04 18:25:32 +00:00
Benjamin Walsh
1bfa7e3d93 unified/arm: fix missing setting of default _Swap() return value
The unified kernel expect the default return value from a _Swap() call
to be set to -EAGAIN by the architecture code. Cortex-M3/M4 does this in
the SVC call handler, and it was missing from the Cortex-M0/M0+ before
pending PendSV.

Change-Id: I3316901186ab409f49043eb4f1972c4b0dd9a4a2
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-11-04 17:51:14 +00:00
Sergio Rodriguez
fdf77e56bc samples: aio_comparator: use unified kernel
Use unified kernel for AIO comparator sample app.

Change-Id: Id6a9016a9c00d7400395dfbc431d7438804ffe37
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-11-04 17:26:16 +00:00
Jaakko Hannikainen
24a2fb19f9 lib: Add implementation for strrchr
Signed-off-by: Jaakko Hannikainen <jaakko.hannikainen@intel.com>
Change-Id: I57c549fae0fa8b2321794e9256da63b0a2fe6eaf
2016-11-04 16:53:50 +00:00
Gil Pitney
e8b43cbc81 cc3200: Add a UART driver (polled and interrupt modes)
The pinmux configuration is done during board initialization.

This was validated using the following Zephyr apps:
- samples/hello_world
- samples/philosophers
- samples/drivers/uart
- samples/shell

UARTA0 is currently supported.

Change-Id: I85727c622d4d42183cc9f2f8b43d653e245dd17e
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2016-11-04 14:53:33 +00:00
Gil Pitney
d17cf1d465 cc3200: Add pinmux initialization for UART0
Leverages the pinmux.c file generated by the TI PinMux utility
to enable UART pins.  The pinmux configuration is used in lieu of a Zephyr
pinmux driver, and is called during board initialization.

UARTA0 is currently supported.

Jira: ZEP-1109

Change-Id: Iddb01f79043af034886859b608b7b6aadf844e53
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2016-11-04 14:53:32 +00:00
Anas Nashif
213b972f97 samples: shell: remove useless ifdefs
Change-Id: Ic164b952205dcadb80f9d9765f9618a6bcb487b5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-04 13:48:16 +00:00
Anas Nashif
f815d069b8 shell: move documentation out of kernel
The shell is not a kernel feature, it is more of a subsystem.

Change-Id: Iaba60b2086ddfe77af427d70b8fc8d06a8bebe14
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-04 13:48:16 +00:00