Commit graph

19237 commits

Author SHA1 Message Date
Anas Nashif
69d4f2a2ca Merge "Merge bluetooth branch into master" 2016-09-17 16:25:47 +00:00
Anas Nashif
7094273af7 trivial: fixed typos
Change-Id: Id374d5b738bac79cb5e0fd400f120b9c0daf4610
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-17 13:47:36 +00:00
Anas Nashif
442987f542 intel_quark: move X86_IAMCU to defconfig
Do not force selection of X86_IAMCU

Jira: ZEP-867
Change-Id: I2ca0bcd73502321e9e6f5a4638c309393da54e43
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-17 11:14:12 +00:00
Anas Nashif
ecf96d2cfa arduino 101: make factory bootloader config the default
The Arduino 101 comes with a bootloader that supports DFU
and flashing of all cores using the dfu-util package.

This changes the memory layout of the image built for the
Arduino 101 and remove previous work-arounds to allow booting,
including the version-header section in the linker script.

The bootloader expects the text section at +0x30 from the physical
load address and thus requires special treatment in the linker
script.

Other changes by Andrew Boie:
The flash size parameters were both wrong. X86 side has 192K
of flash from 0x4003000 - 0x40060000, the entire span of
sys_flash1.

ARC side is now the span from 0x40010000 - 0x40030000, 128K.

Change-Id: Iecfa5d2b84a3f522d9eca06268d6b8b71a094aaa
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-17 11:13:59 +00:00
Inaky Perez-Gonzalez
37d6551286 known-issues: update rule for TCF summary line
TCF now prints more detail in the summary line to conform with the
rest of the lines to ease up parsing; update said line to filter it
properly.

Change-Id: I7c21eea18a67dbfd027d680036762546556f90db
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-09-16 11:31:27 -07:00
Daniel Thompson
de2be17fee arm/nrf52: Set CPU_HAS_FPU
Quoting the product specification this device contains an "ARM
Cortex-M4 processor with floating-point unit" or, as this would
more normally be expressed an ARM Cortex-M4F.

Update Kconfig accordingly.

Change-Id: I5bd6f17724d0d4aa9aaab9961f12d4e8502c38a5
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
2016-09-16 12:33:24 +01:00
Johan Hedberg
5cc5141371 Merge bluetooth branch into master
Main changes:

 - Cleanups & refactoring to the native controller code
 - Support for cross-transport pairing from BR/EDR to LE
 - Fix potential deadlock in TX fiber when disconnecting
 - Initial skeleton for the Hands-Free Profile (HFP)
 - Fix to Resolvable Private Address (RPA) updates
 - Added flow control support to RFCOMM

----------------------------------------------------------------
Carles Cufi (21):
      Bluetooth: HCI: Fix the length of supported commands
      Bluetooth: Controller: Switch to Zephyr's hci.h for cmd handling
      Bluetooth: HCI: Add handle to LTK command complete events
      Bluetooth: HCI: Add handle to conn param update command complete
      Bluetooth: Controller: Switch to Zephyr's hci.h for cmd handling
      Bluetooth: Controller: Switch to Zephyr's hci.h for cmd handling
      Bluetooth: Controller: Switch to Zephyr's hci.h for cmd handling
      Bluetooth: Controller: Switch to Zephyr's hci.h for cmd handling
      Bluetooth: Controller: Unify handling of async events
      Bluetooth: HCI: Fix and extend advertising report events
      Bluetooth: HCI: Add auth payload expiry event
      Bluetooth: Controller: Use hci.h for control event handling
      Bluetooth: HCI: Add read remote version info event
      Bluetooth: Controller: Use hci.h for data-control evt handling
      Bluetooth: Controller: Use hci.h for num complete
      Bluetooth: Controller: Remove HCI event definitions from hci.c
      Bluetooth: Controller: Use hci.h for ACL data
      Bluetooth: Controller: Clean up HCI macros
      Bluetooth: Controller: Implement LE_RAND command
      Bluetooth: Controller: Make HCI endianness-independent
      Bluetooth: Controller: Refactor HCI files

Grzegorz Kolodziejczyk (3):
      Bluetooth: tester: Add support for L2CAP connect command
      Bluetooth: tester: Add support for L2CAP disconnect commands
      Bluetooth: tester: Add support for L2CAP listen command

Itankar, Piyush T (1):
      Bluetooth: Init: Updated filiter options for test_20

Jaganath Kanakkassery (1):
      Bluetooth: RFCOMM: Implement RX flow control

Johan Hedberg (2):
      Bluetooth: GATT: Fix potential bt_conn reference leak
      Bluetooth: Fix giving back pkts semaphore when disconnecting

Luiz Augusto von Dentz (3):
      Bluetooth: ATT: Fix not handling error response properly
      Bluetooth: HCI: Fix updating RPA too early
      Bluetooth: eddystone: Fix byteorder of advertisement

Mariusz Skamra (1):
      Bluetooth: tester: Add support for L2CAP send data command

Sathish Narasimman (1):
      Bluetooth: HFP HF: Initialize Handsfree profile

Sukumar Ghorai (1):
      Bluetooth: Pre-allocated RFCOMM Channels

Szymon Janc (16):
      Bluetooth: SMP: Move smp_create_pdu function up in a file
      Bluetooth: SMP: Add initial code for BR/EDR support
      Bluetooth: SMP: Clear keys on timeout when running over BR/EDR
      Bluetooth: SMP: Support Pairing Request over BR/EDR
      Bluetooth: SMP: Support Pairing Failed over BR/EDR
      Bluetooth: SMP: Distribute local keys over BR/EDR
      Bluetooth: Add support for reading encryption key size for BR/EDR
      Bluetooth: SMP: Fix encryption key size check in BR/EDR pairing req
      Bluetooth: SMP: Support Pairing Response over BR/EDR
      Bluetooth: SMP: Allow to force BR/EDR without SC support
      Bluetooth: SMP: Add support for LTK derivation from LinkKey
      Bluetooth: SMP: Add support for sending Pairing Request over BR/EDR
      Bluetooth: SMP: Add support for Identity Information over BR/EDR
      Bluetooth: SMP: Add support for Signing Information over BR/EDR
      Bluetooth: SMP: Add helper for reporting BR/EDR pairing complete
      Bluetooth: SMP: Factor out BR/EDR encryption check to helper

Vinayak Chettimada (4):
      Bluetooth: ATT: Remove unnecessary call to BT_ASSERT
      Bluetooth: log: Call _SysFatalErrorHandler in BT_ASSERT()
      Bluetooth: log: Include nanokernel.h to use BT_ASSERT()
      Bluetooth: Controller: Use BT_ASSERT instead of custom impl.

 drivers/bluetooth/controller/Makefile             |    2 +-
 drivers/bluetooth/controller/hal/clock.c          |    8 +-
 drivers/bluetooth/controller/hal/debug.h          |   27 +-
 drivers/bluetooth/controller/hal/ecb.c            |    2 +-
 drivers/bluetooth/controller/hal/radio.c          |    2 +-
 drivers/bluetooth/controller/hal/rand.c           |    2 +-
 drivers/bluetooth/controller/hal/rtc.c            |    2 +-
 drivers/bluetooth/controller/hci/hci.c            | 2380 +++++++-----------
 .../controller/{main.c => hci/hci_driver.c}       |   23 +-
 .../controller/hci/{hci.h => hci_internal.h}      |   14 +-
 drivers/bluetooth/controller/ll/ctrl.c            |  332 +--
 drivers/bluetooth/controller/ll/ticker.c          |    3 +-
 include/bluetooth/hci.h                           |   56 +-
 include/bluetooth/hfp_hf.h                        |   61 +
 include/bluetooth/log.h                           |   17 +-
 include/bluetooth/rfcomm.h                        |    8 +
 net/bluetooth/Kconfig                             |   23 +
 net/bluetooth/Makefile                            |    2 +
 net/bluetooth/att.c                               |    4 +-
 net/bluetooth/conn.c                              |   45 +-
 net/bluetooth/gatt.c                              |    7 +-
 net/bluetooth/hci_core.c                          |   18 +-
 net/bluetooth/hci_core.h                          |    4 +-
 net/bluetooth/hfp_hf.c                            |  123 +
 net/bluetooth/hfp_internal.h                      |   43 +
 net/bluetooth/l2cap_br.c                          |   15 +
 net/bluetooth/l2cap_internal.h                    |    1 +
 net/bluetooth/rfcomm.c                            |   49 +-
 net/bluetooth/smp.c                               |  953 ++++++-
 samples/bluetooth/eddystone/src/main.c            |    4 +-
 tests/bluetooth/init/testcase.ini                 |    7 +-
 tests/bluetooth/tester/src/bttester.h             |   71 +
 tests/bluetooth/tester/src/l2cap.c                |  306 +++
 33 files changed, 2785 insertions(+), 1829 deletions(-)
 rename drivers/bluetooth/controller/{main.c => hci/hci_driver.c} (94%)
 rename drivers/bluetooth/controller/hci/{hci.h => hci_internal.h} (68%)
 create mode 100644 include/bluetooth/hfp_hf.h
 create mode 100644 net/bluetooth/hfp_hf.c
 create mode 100644 net/bluetooth/hfp_internal.h

Change-Id: I7bc41fb1c53c0f5128a1e4ab38815d19018b603f
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-09-16 13:28:24 +03:00
Luiz Augusto von Dentz
88d5175ac4 Bluetooth: eddystone: Fix byteorder of advertisement
This fixes the UUID 128 bits to use the right byte order so it can be
decoded properly:

< HCI Command: LE Set Advertising Data (0x08|0x0008) plen 32
        Length: 21
        Flags: 0x06
          LE General Discoverable Mode
          BR/EDR Not Supported
        128-bit Service UUIDs (complete): 1 entry
          Eddystone Configuration Service (a3c87500-8ed3-4bdf-8a39-a01bebede295)

Change-Id: Ia4aacaf3557d74a248f63cbffb2adb73b076d38c
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-09-16 10:53:51 +03:00
Inaky Perez-Gonzalez
00d0e4631b build: use 'vercomp' without relying on it being in PATH
Not every environment has $ZEPHYR_BASE/scripts/ in the PATH, which can
cause conflicts (eg: the test environment doesn't define it to
simplify the build instructions).

Using vercomp as $ZEPHYR_BASE/scripts/vercomp, we remove this
requirement.

Change-Id: I8c390f905907f42d1ba2b4d1378e188705164e13
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-09-15 23:59:15 -07:00
Carles Cufi
496b02b54a Bluetooth: Controller: Refactor HCI files
As part of the effort to consolidate the BLE Controller's
HCI layer, the following files have been renamed:

* hci.h -> hci_internal.h: contains the HCI API to be used
by the driver
* main.c -> hci_driver.c: Implement bt_driver and includes
initialization and glue code

Jira: ZEP-726

Change-Id: Ica8b3e114da42a766a1b14ce59558cacd899a1a7
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-09-16 04:40:34 +00:00
Anas Nashif
3f3dc59ea1 parse board defconfig at the very end
The board defconfig is useless if it does not override what the SoC
sets. Boards can have different values than those set by the SoC.

Change-Id: Iab287c62986b20585b4df3e77bd973dbab50eea4
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-16 03:10:34 +00:00
Anas Nashif
8d187d6f0e MAINTAINERS: add maintainer for some of the boards
Change-Id: I86985ccff8ea8b039ee865e9211a3f63d500245f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-16 03:10:33 +00:00
Anas Nashif
99abf49fce quark_x1000: move the X1000 into the intel_quark family
Change-Id: I9d7f1bc56293458d1410b40b7e103974718cb681
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-16 03:10:33 +00:00
Anas Nashif
211e0e14d7 soc: intel_quark: move quark d2000 to intel_quark family
Change-Id: I4eeb25ee3ee94d59e6425163aad3c393593b7e02
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-16 03:10:32 +00:00
Anas Nashif
0be112fbcb intel_quark: Group Quark SoCs under intel_quark/
Change-Id: If0120aff88310871438562234abf51b26675ff28
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-16 03:10:32 +00:00
Anas Nashif
5363d14a9e boards: rename Quark SE Devboard to Quark SE C1000
This board now has an official name and will be available soon:

http://www.intel.com/content/www/us/en/embedded/products/quark/mcu/se-soc/overview.html

Jira: ZEP-758
Change-Id: Ia16d33722308cf81471321c3063bdc75055a4d50
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-16 03:10:31 +00:00
Anas Nashif
5e4b62c35c boards: rename Quark SE Devboard to Quark SE C1000 (Sensor Subsystem)
Jira: ZEP-758
Change-Id: I8ee5a2f9e4a6ecbd15214e59321bf27a502ef6ee
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-16 03:10:30 +00:00
Ramesh Thomas
9237040302 fs: Fixes a bug that limits volume size to 1MB
The FS needs to be allowed to choose the correct allocation unit
size based on volume size. Current code passes a fixed value to
the function that creates the FS. Passing 0 allows the FS to configure
the required au size.

Jira: ZEP-898
Change-Id: Ic43bfba8b8f8498f4db49db744743afad4b118cd
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2016-09-16 02:21:00 +00:00
Anas Nashif
806ac751d4 sdk: zephyr: check for minimum required version of SDK
Error out when old SDK versions are being used.

Jira: ZEP-584
Change-Id: If3515f38cc75d8a378614ef77d8946ba2d9ab28d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-15 21:17:02 +00:00
Anas Nashif
2aa754497d tests: fp_sharing: removing dependency on ARCH
Change-Id: I389f93aad4b785f286bd83be6c5ed688115592f8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-15 21:16:40 +00:00
Anas Nashif
50492618e6 tests: remove dependency on architecture and use one prj.conf
No need for architecture based configuration, they are the same
for ARM and X86.

Change-Id: Iea7a62221a09bcc035bb8c81e4f49cd4c9b02229
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-15 21:16:39 +00:00
Luiz Augusto von Dentz
eeccdaca05 Bluetooth: HCI: Fix updating RPA too early
Checking work pending flag does not account the delay before the work is
submitted so this make use a flag to track when the RPA is valid.

Change-Id: I2d858e5163455ce90eb6273c6a8824c5c6d44ae1
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-09-15 14:36:09 +00:00
Benjamin Walsh
b32d0ff71e unified/x86: fix IAMCU build
Unified kernel does not provide the _thread_arg_t type, but instead uses
void * directly for its thread entry parameters. _thread_entry_t is
typedefed from void * anyway, and only obfuscates the type. So, define
_thread_entry_t to be a function pointer to a function with three void *
parameters, and when the unified kernel becomes the only kernel, all the
_thread_arg_t types will go away.

With this change, IAMCU runs all the tests sysV x86 is able to run as a
unified kernel.

Change-Id: I53c8754629a5a0a114a16a775ff1efc1884496ff
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-15 09:42:24 -04:00
Benjamin Walsh
27365bb5d1 linker: fix typos
Change-Id: Icba6cc66382a09b0c15329bbead1bd8a430f6bee
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-15 09:42:24 -04:00
Benjamin Walsh
0e6aebf2c9 tests/mem_safe: place test buffers at the edges of RAM
This test checks if it can write at the edges of RAM within the kernel
image. The problem is that this memory is not meant to be trampled on.

With the help of custom linker scripts, place 32-byte buffers at those
edges.

Only linker scripts for QEMU on x86 and Cortex-M3 are provided, to avoid
having to maintain too many of them, in case the reference linker
scripts in the kernel change.

JIRA: ZEP-707

Change-Id: Icd5d680ce2cf064cce083c3d244a196e292bd453
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-15 09:42:24 -04:00
Benjamin Walsh
ec89a10c7e build: allow specifying a custom linker script relative to project
Build system will first check if the linker script is found relative to
the project directory, and if not, it will consider it to be an absolute
path, as before.

Change-Id: Idfc7e55febbc8c197643ca514dc01c3e2262712a
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-15 09:42:24 -04:00
Flavio Santes
5306a00190 tinycrypt: Rename current tests to avoid confusions with new algorithms
Rename test_ctr to test_ctr_mode to avoid confusions with any CTR-based
algorithm. For example, currently TinyCrypt v0.2.0 supports the
CTR PRNG algorithm.

Rename test_prng to test_hmac_prng to avoid confusions with the test
case for the CTR PRNG algorithm or any test-case related to PRNGs.

Rename test_cbc to test_cbc_mode. TinyCrypt test case for CBC mode is
"test_cbc_mode.c", so it makes sense to keep the same name for the
directory.

Furthermore, README files are also updated to reflect the previous
described changes.

Change-Id: If0af4dcffe8917a7c29608231d3954b73dff5e10
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-09-15 10:34:05 +00:00
Flavio Santes
0baadc030a tinycrypt: Solve style issues
This commit solves some indentation issues detected in the following
test-cases/files:

- test_cbc/src/test_cbc_mode.c
- test_ctr/src/test_ctr_mode.c
- test_prng/src/test_hmac_prng.c

Change-Id: I0f184ae4b510e4552a061523ea3e1216ae1f6f2a
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-09-15 10:34:05 +00:00
Itankar, Piyush T
d17a803dc9 Bluetooth: Init: Updated filiter options for test_20
Added filter options to avoid building for the Arduino_101
and Quark_se ARC core as there is not enough RAM to run this
test.

Change-Id: I0c1172714c9827e632648fcedc67555251f25769
Signed-off-by: Itankar, Piyush T <piyush.t.itankar@intel.com>
2016-09-15 14:48:22 +05:30
Flavio Santes
73b086caa7 tinycrypt: Add test case for the CTR PRNG algorithm
This commit adds the test case for the CTR PRNG algorithm.

Origin: https://github.com/01org/tinycrypt/tree/v0.2.0

The code was refactored to eliminate malloc and free function
calls and checkpatch errors. However, many warnings are still
present. Refactoring history is available at:

Repo:	https://gitlab.com/santes/tinycrypt/commits/refactoring
Commit:	5d0482c26c4ad69e7854dde58d15bb57a3e5f18f

Jira: ZEP-614
Jira: ZEP-860

Change-Id: I0620868d092941931762718c81fe13fc01f251b2
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-09-15 03:36:14 +00:00
Javier B Perez
5879f1702c samples: zoap server: exclude quark d2000 not enough ram
Excluded Quark D2000 because there is not enough RAM to
build the sample.

Change-Id: Icc772e0aaca2be8731eae8f986eed17782beb445
Signed-off-by: Javier B Perez <javier.b.perez.hernandez@intel.com>
2016-09-14 21:23:25 +00:00
Javier B Perez
fd519dcbd7 known issues: update SKIP regex
Updated SKIP line to use whitespace and non-whitespace.

Change-Id: Ia1b2823836cf96f4065b39dca49c660601e1ea88
Signed-off-by: Javier B Perez <javier.b.perez.hernandez@intel.com>
2016-09-14 21:23:24 +00:00
Andrew Boie
a4a332346c ipm.h: fix erroneous edit of documentation
Patch 3010de9850 changed the
documentation for the ipm_send() 'wait' parameter to something
that is not what the parameter does, and removed some helpful
ancillary information.

Change-Id: Id79950207e9b3d8cfe8f664cbf45fbfa24069dea
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-09-14 18:10:48 +00:00
Anas Nashif
4589f2c468 samples: use printf/printk directly instead of macros
In many cases there is no need to define a macro for printing to
the console, just use the correct variant directly.

Jira: ZEP-240
Change-Id: I9952deda4bfc60424f01fca2443d037562d13d0d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-14 16:56:02 +00:00
Anas Nashif
01a3e442e8 tests: move test code from samples to tests
Jira: ZEP-760
Change-Id: I3afa847864f9a593696ee832f291f438fd291f8e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-14 15:34:17 +00:00
Carles Cufi
4c9f1017c8 Bluetooth: Controller: Make HCI endianness-independent
Use the sys_ macros from byteorder.h to access all HCI
structure members that are endianness-dependent.

Jira: ZEP-726

Change-Id: I950f8eaca7048bf7972c2c4c347cfd5bbba17eb6
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-09-14 17:28:43 +02:00
Tomasz Bursztyka
86d02e01b1 gpio: stm32: Fix bug introduced by removing API 1.0 support
Bug was introduced by a6cf6038e3

Change-Id: I91ceab2ca20c4d2f70a953b56d895152a471125a
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-09-14 16:16:07 +02:00
Marcus Shawcroft
1bea527da6 ksdk: Add KSDK RNGA driver.
Provide a random driver wrapped around the KSDK RNGA driver.

Origin: Original

Change-Id: I43feeb37d8d5173c7b95af8e80434fb7dc77a83e
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2016-09-14 12:35:30 +00:00
Inaky Perez-Gonzalez
ca35c177fd known-issues: fix regex to catch summary messages to ignore
The regular expression we use to catch the summary messages was not
generic enough to catch it. This causes it to not be classified as a
known issue to ignore and shows up in the output of
filter-known-issues, when it should not.

Fix the regex to be more generic.

Change-Id: I3e53d061325c90c861799dabc1f548177c650bc3
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-09-14 12:20:52 +00:00
Inaky Perez-Gonzalez
1b9d13c408 samples/task_profile: fix testcase.ini's long lines
.ini format supports long lines by prefixing the continuation with an
empty line. Adding a backslash makes the backslash part of the value.

Change-Id: I0a1ade3a6bdf12281e61d06e21d7233d4b624b48
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-09-14 12:20:13 +00:00
Tomasz Bursztyka
a6cf6038e3 gpio: Remove obsolete API 1.0 callback mechanism
In 1.0 you could set only one callback on the whole gpio controller. It
was impossible for another sub-system to add another callback, without
overwritting an existing one.

Such API has been obsolete for a long time and no one is using it
anymore. Thus removing it entirely.

Change-Id: I6a17fd99373dc6cef1fa2ebb421e992412d5015e
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-09-14 10:51:09 +00:00
Szymon Janc
c320abc72c Bluetooth: SMP: Factor out BR/EDR encryption check to helper
This make it easier to follow code flow in #ifdefs blocks.

Change-Id: I06941b9db2a76ea587bae02a3bfbc40abf7f2779
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-09-14 11:26:05 +02:00
Szymon Janc
e45d08ef2d Bluetooth: SMP: Add helper for reporting BR/EDR pairing complete
Put code for completing pairing (success or failure) into common
helper.

Jira: ZEP-605

Change-Id: If24328cf421f970f87a0dc6729a6fea83fb83489
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-09-14 06:02:39 +00:00
Szymon Janc
fd8d725283 Bluetooth: SMP: Add support for Signing Information over BR/EDR
This allows to handle CSRK distributed by remote device.

> ACL Data RX: Handle 11 flags 0x02 dlen 21
      BR/EDR SMP: Signing Information (0x0a) len 16
        Signature key: 32b6247f80dc172be6198649a6322532

Jira: ZEP-605

Change-Id: I01ca67e134d7d8068d0336567a3fa9b9fdafc001
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-09-14 06:02:34 +00:00
Szymon Janc
f711962344 Bluetooth: SMP: Add support for Identity Information over BR/EDR
Allow to handle IRK distributed by remote device.

> ACL Data RX: Handle 11 flags 0x02 dlen 21
      BR/EDR SMP: Identity Information (0x08) len 16
        Identity resolving key: 286f917356baf6aa27f169fe30030c88
> ACL Data RX: Handle 11 flags 0x02 dlen 12
      BR/EDR SMP: Identity Address Information (0x09) len 7
        Address type: Public (0x00)
        Address: 20:68:9D:60:A1:E4

Jira: ZEP-605

Change-Id: I3c7d32cc6e4cf4d8690edb92089bd433e06f1b4d
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-09-14 06:02:29 +00:00
Szymon Janc
777d2f5f30 Bluetooth: SMP: Add support for sending Pairing Request over BR/EDR
This allows to send Pairing Request.

Jira: ZEP-605

Change-Id: I0ec2989e4dedb25a51e73b27689f0fd1893ceab8
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-09-14 06:02:22 +00:00
Szymon Janc
68592f06f6 Bluetooth: SMP: Add support for LTK derivation from LinkKey
This allows to derive LTK from Link Key using H6 function.

Jira: ZEP-625

Change-Id: Ife1e0d770f196174b6d7fc5e8074d76af49934cb
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-09-14 06:02:15 +00:00
Szymon Janc
790a28ccf4 Bluetooth: SMP: Allow to force BR/EDR without SC support
This option allows to register BR/EDR SMP channel without required
Secure Connections support in controller. This is solely for testing
and should never be enabled in production.

Jira: ZEP-605

Change-Id: I1909c900e323f61acef9fa2b46f22e853beeda75
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-09-14 06:02:10 +00:00
Szymon Janc
756ac5f63c Bluetooth: SMP: Support Pairing Response over BR/EDR
Handle Pairing Response and distribute keys if required.

Jira: ZEP-605

Change-Id: I2014d38896f9f67095228cb09dab017040570448
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-09-14 06:02:05 +00:00
Szymon Janc
1d06d941da Bluetooth: SMP: Fix encryption key size check in BR/EDR pairing req
Encryption key size for derived LTK should match one used for BR/EDR
encryption.

Change-Id: Ibcb1c3320cd191ce0d2fda8f5cacaf1ee295fcc4
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-09-14 06:02:00 +00:00