Commit graph

41120 commits

Author SHA1 Message Date
Anas Nashif
bf5fdfbe43 tests: fix testcases for cortex-m0+ platforms
Change-Id: Idf6f5e38354aa5f1801ec0c0db63a4e19243918c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-22 16:54:19 -04:00
Anas Nashif
b37dc99033 tests: sha256: filter by RAM size
Change-Id: Ie4e995006afc1281bee22e5b2d7f2a6a3b3bac28
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-22 16:54:19 -04:00
Paul Sokolovsky
fb9185cdb8 kernel: Allow SYS_KERNEL_VER_MAJOR(), etc. return full range of values.
Macros SYS_KERNEL_VER_MAJOR(), SYS_KERNEL_VER_MINOR(),
SYS_KERNEL_VER_PATCHLEVEL() capped their return values to 0-15 range,
even though documentation says "Each of these elements must therefore be
in the range 0 to 255, inclusive". Fix to corresponds to the docs. This
issue especially affected SYS_KERNEL_VER_PATCHLEVEL(), which could be
set to a high value to represent WIP code in-between releases.

Change-Id: I0b72fb68f3f0f8d3d3b321a5ba2c48671879dfbc
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2016-10-22 10:04:00 +00:00
Dmitriy Korovkin
3ef74d4fea unified/arc: Add tickless idle test for Arduino 101 ARC core
Change-Id: I19375d70e875ea94570956598409a28b1f237b13
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-10-22 01:27:02 +00:00
Dmitriy Korovkin
792140a502 drivers: Fix type problems when building QMSI rtc driver
In order to avoid type conflicts make sure that ISR_HANDLED
is defined. This makes the ISR the correct type.
Make sure that the pointer for the unused argument for ISR
is of the proper type (NULL).

Change-Id: Ia1873f32d2e2174085f929e318a780a1b2574785
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-10-22 01:27:02 +00:00
Dmitriy Korovkin
dc76dbf2ef unified: Add tickless idle support for ARC
Change-Id: I89684e7bee379be0a18f64e4f2c39ae132fe7e6d
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-10-22 01:27:01 +00:00
Dmitriy Korovkin
3c90651fd8 unified/arc: add memory pools support for ARC architecture
ARC does not align data structures by 4 bytes by default.
Add necessary linker sections.

Change-Id: I3bf7aa38b9bc8cba56f824469040c027968fa564
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-10-22 01:27:01 +00:00
Dmitriy Korovkin
909bfffda9 unified/arc: add unified kernel support for ARC arch
- the interrupt (both regular and fast) now does not do rescheduling
  if the current thread is a coop thread or if the scheduler is not locked

- the _nanokernel.flags cache of _current.flags is not used anymore
  (could be a source of bugs) and is not needed in the scheduling algo

- there is no 'task' field in the _nanokernel anymore: scheduling routines
  call _get_next_ready_thread instead

- the _nanokernel.fiber field is replaced by a more sophisticated
  ready_q, based on the microkernel's priority-bitmap-based one

- thread initialization initializes new fields in the tcs, and does not
  initialize obsolete ones

- nano_private includes nano_internal.h from the unified directory

- The FIBER, TASK and PREEMPTIBLE flags do not exist anymore: the thread
  priority drives the behaviour

- the tcs uses a dlist for queuing in both ready and wait queues instead
  of a custom singly-linked list

- other new fields in the tcs include a schedule-lock count, a
  back-pointer to init data (when the task is static) and a pointer to
  swap data, needed when a thread pending on _Swap() must be passed more
  then just one value (e.g. k_stack_pop() needs an error code and data)

- the 'fiber' and 'task' fields of _nanokernel are replaced with an O(1)
  ready queue (taken from the microkernel)

- fiberRtnValueSet() is aliased to _set_thread_return_value since it
  also operates on preempt threads now

- _set_thread_return_value_with_data() sets the swap_data field in
  addition to a return value from _Swap()

- convenience aliases are created for shorter names:

  - _current is defined as _nanokernel.current
  - _ready_q is defined as _nanokernel.ready_q

- _Swap() sets the threads's return code to -EAGAIN before swapping out
  to prevent timeouts to have to set it (solves hard issues in some
  kernel objects).

Change-Id: Ib9690173cbc36c36a9ec67e65590b40d758673de
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-10-22 01:27:00 +00:00
Dmitriy Korovkin
05d4b23f22 arc: Fix RGF_NUM_BANKS==1 and NUM_IRQ_PRIO_LEVELS>1 problem
Define _firq_scratch_restore, needed when CONFIG_RGF_NUM_BANKS==1
outside of CONFIG_NUM_IRQ_PRIO_LEVELS > 1 clause.

Change-Id: I82eef11a005a35f38a064ce3ce1d6521d6428958
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-10-22 01:27:00 +00:00
Ricardo Salveti
497a3411d0 boards: Add support for the nRF51 DK board (PCA10028)
Add board support for the Nordic Semiconductor's nRF51822 (nRF51 series)
Development Kit.

Change-Id: Idc082c6930bdebf3726fd453fb1309df7fab3f46
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
2016-10-22 01:25:57 +00:00
Ricardo Salveti
26730bec6b Bluetooth: Controller: Make radio compatible with the nRF51 series
Isolate nRF52 specific configurations.

Change-Id: Icde32dc5e2c1753684e4c6bf39a5649652cdb8d0
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
2016-10-22 01:25:56 +00:00
Ricardo Salveti
1dd18c3f92 arm: Add initial support for Nordic Semiconductor nRF51 series
Still missing a working timer driver, as SysTick is not really available
in this SoC series (enabled to avoid build issues, but not used).

Jira: ZEP-784

Change-Id: Ie1c8e6c5e8955ee7f260ce013f4451f9215f3457
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
2016-10-22 01:25:55 +00:00
Ricardo Salveti
f2fb64b075 drivers/gpio/nrf5: change default IRQ_PRI
Make default value compatible with both nRF51 and nRF52.

Change-Id: I65dafbdf8518103becdd7388e9c0195ef1c4460d
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
2016-10-22 01:25:55 +00:00
Ricardo Salveti
7124d95795 serial: make nrf5 driver compatible with nrf51
Default IRQ priority changed to 1 to so it can also be compatible with
nRF51 (Cortex-M0 allows up to 4 priority levels but Zephyr needs the
first two for the OS).

Change-Id: Ie57a729f5d932f020a7d1d7e55cf3741f1ecfbab
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
2016-10-22 01:25:54 +00:00
Ricardo Salveti
69b9451af1 arm/nordic: use a common header for the nrf51/nrf52 SoC families
Integrating the IRQ definitions for both nRF51 and nRF52, and defining
the set of IRQ values that are common to both.

Also switch the controller, uart and clock drivers to use the common
header definitions.

Change-Id: Id6816d7a97720896cfe4df83656fb8b1f8fb01fa
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
2016-10-22 01:25:54 +00:00
Ricardo Salveti
ffacae20d0 arch/arm: add initial support for Cortex-M0/M0+
Not disabling SysTick as it is optional by the spec.

SVC not used as there is no priority-based interrupt masking (only
PendSV is used).

Largely based on a previous work done by Euan Mutch <euan@abelon.com>.

Jira: ZEP-783

Change-Id: I38e29bfcf0624c1aea5f9fd7a74230faa1b59e8b
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
2016-10-22 01:25:53 +00:00
Ramesh Thomas
6249c567f5 device_pm: Update control function name and doc to indicate PM specific
PM control function is used only by the PM subsystem. Update
documentations to make it clear and name the relevant structures and
functions with _pm_ in the name.

Jira: ZEP-1044
Change-Id: I29e5b7690db34a228ed30a24a2e912e1360a0090
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2016-10-21 23:32:52 +00:00
Andrew Boie
1c25f49ac5 x86: arm: add support for custom data at start/end of RAM
This is used by a test case, and it's better to just put this
here instead of forking the linker scripts.

Change-Id: Ifbb90b73bb26118ae2422cc6feccb3db58a26f2c
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-10-21 23:30:06 +00:00
Andrew Boie
662df128cd x86: remove references to .intStubSect in linker script
This has been unused for a long time.

Change-Id: Ie251d60d1cf9f3806292e3c150dbedf5f99d6410
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-10-21 23:30:06 +00:00
Andrew Boie
238fe1f60f gen_idt: remove int_vec_alloc bitfield from output
This is no longer used.

Change-Id: I6536076ae3510d66eb26c49d89b865dc82e91e33
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-10-21 23:30:05 +00:00
Andrew Boie
327017fb92 x86: remove unused linker-defs-arch.h
Change-Id: Ib57cced30569adf2ae72f32d27baf30a5ca4fe71
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-10-21 23:30:05 +00:00
Andrew Boie
caf19b2503 x86: remove final-linker.cmd
This mechanism was intended to reserve space during the first pass for
certain data structures created by gen_idt, but this is unnecessary.
The only memory addresses that must be fixed between the two passes are the
locations of the interrupt stubs, which are in the .text section much
earlier than the generated data structures; they do not shift.

Change-Id: I3aab00e171e6a9ff439a7af8d69769e4c29337a7
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-10-21 23:30:04 +00:00
Anas Nashif
bce6b337a5 Merge "Merge bluetooth branch into master" 2016-10-21 22:12:23 +00:00
Chuck Jordan
4c6feac28e samples: modify w25q80b1 sample to output "done" when done.
This sample justs outputs the SPI FLASH IDs.
I think we should improve this to also output done, otherwise
it looks like its stuck or something.

Change-Id: I18d5919c1e25bb5aaa9ceba53793cc14b15f3c77
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-10-21 19:55:20 +00:00
Chuck Jordan
13900b7046 arc: remove some NSIM conditionals
EM7D was recently merged, and one change suggested there was
to remove conditional checks for NSIM. It is OK to have the simulator
use the exact same memory addresses and sizes as would be found on the
board. This submission fixes EM9D and EM11D to be the same -- i.e.
to not have NSIM conditionals.
See ZEP-966.

Change-Id: Ia990ff7bb4b7ff5071af83723ed3d1420fdff012
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-10-21 11:53:37 -07:00
Chuck Jordan
a9442ab761 arc: em_starterkit board can now support SOC=EM7D
The EM7D SOC is similar to EM11D, except it has different sized
iccm and dccm memories, and also has FIRQ with RGF_NUM_BANK==1.
To select this SOC on the board, all dip switches are in the up position.
See ZEP-966.

Change-Id: I864ffe0efdf367de0a8cd58e9c46efd7e401c671
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-10-21 18:10:04 +00:00
Tomasz Bursztyka
cc54803d9e drivers: ieee802154: Fix register name
It's not FMSTAT<0/1> but FSMSTAT<0/1>

Change-Id: I836cf001b7baefe86df67f13a8759ea4e697a28e
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-10-21 17:03:57 +00:00
Iván Briano
5a76185655 i2c qmsi: Fix enabling of the clock at driver init
Put the clk_perih_enable() call outside of the switch statement so it
actually runs.

Jira: ZEP-1048

Change-Id: Iee8efb4430d37dc74ce48f249bbf58d53125b520
Signed-off-by: Iván Briano <ivan.briano@intel.com>
2016-10-21 16:53:42 +00:00
Peter Mitsis
429f69a8f6 unified: idle.c to include power.h
Needed to resolve various undeclared symbols when SYS_POWER_MANAGEMENT
is enabled.

Jira: ZEP-1073
Change-Id: I21db2580efb15c80d84d9163fe9e8245d6dc0391
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-10-21 15:59:44 +00:00
Peter Mitsis
5f39924e58 unified: memory pool APIs to use size_t
Change-Id: Id1dd37ad3bb35052fd53a6a26711c9e0c2070a25
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-10-21 15:33:58 +00:00
Peter Mitsis
fb02d576c0 unified: Memory map APIs to use size_t
Change-Id: I035019c0cb7193400d02f493546fd3964baf073a
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-10-21 15:33:45 +00:00
Peter Mitsis
4a5d62fe15 unified: Update mem_map doxygen style function headers
Change-Id: Ic683a3ea6f723cf3d615ad28ebf603ed50af9155
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-10-21 15:33:44 +00:00
Allan Stephens
11a1bb4125 unified/doc: Update ring buffers section of Kernel Primer
Ring buffer section now resides under "other" topic, since the
ring buffer type is a general purpose type (like the singly and
doubly linked list types), rather than a kernel-specific type.

Enhances ring buffer section to improve content and improve
consistency with the form used elsewhere in the Kernel Primer.

Also corrects a minor error in the ring buffer API documentation.

Change-Id: Icaa8661524f80e31f173adee859844cadb38967f
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-10-21 15:33:31 +00:00
Allan Stephens
b9a4bd906c kernel: Relocate ring buffer suppport to 'misc' directory
Moves the source code for ring buffers to the 'misc' area, since
it isn't really a central component of the kernel. (This also
aligns the ring buffer source code with its include file, which
is already under 'include/misc'.)

Change-Id: I765a383a05f51fa67d154446f412496e689f9702
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-10-21 15:33:31 +00:00
Allan Stephens
729fdf8ec8 unified: Rename file containing legacy task offload support
Add 'legacy_' prefix, as per the revised naming convention.

Change-Id: I0eaff33a561523ad11621b3104862c574930556e
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-10-21 15:33:30 +00:00
Allan Stephens
7f6f948b30 unified: Eliminate kernel's 'legacy' directory
Since the unified kernel's build system doesn't properly handle
a file in the 'legacy' directory if it contains an initialization
function, some legacy code can't be located there. To avoid confusion,
the revised convention for legacy code is to keep any file that
contains only legacy code in the main kernel directory, and to give
it a "legacy_" prefix.

Change-Id: I019adc8f36611d4481bdcf31dde66597d4cf54ae
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-10-21 15:33:30 +00:00
Allan Stephens
6c98c4d378 unified: Ensure delays do not time out prematurely
Ensures that all APIs which accept a timeout value wait for at least
the specified amount of time, and do not time out prematurely.

* The kernel now waits for the next system clock tick to occur before
  the timeout interval is considered to have started. (That is, the only
  way to ensure a delay of N tick intervals is to wait for N+1 ticks
  to occur.)

* Gets rid of ticks -> milliseconds -> ticks conversion in task_sleep()
  and fiber_sleep() legacy APIs, since this introduces rounding that
  -- coupled with the previous change -- can alter the number of ticks
  being requested during the sleep operation.

* Corrects work queue API that was incorrectly shown to use a delay
  measured in ticks, rather than milliseconds.

Change-Id: I8b04467237b24fb0364c8f344d872457418c18da
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-10-21 15:33:29 +00:00
Dmitriy Korovkin
811d97c320 unified/arm: Fix data start address for XIP images
For XIP images, in order to avoid the situation when
__data_rom_start is 32-bit aligned, but the actual data is placed
after rodata section, which may not end exactly at 32-bit border,
pad rodata section, so __data_rom_start points at data and it is
32-bit aligned.

On non-XIP images this may enlarge image size up to 3 bytes.
This is generally not an issue, since modern ROM and FLASH
memory is usually 4k aligned.

Change-Id: I3d37fccbc610615585d776144ab9e281368258d6
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-10-21 15:20:22 +00:00
Szymon Janc
fc2f7efb04 nanokernel: Add nano_sem_count_get for getting nano_sem count
This adds convenient helper so that users don't need to touch nano_sem
internals. Wrapper for unified kernel is added too.

Change-Id: Ic0af8b1ea302939d5239648327cb3cc125c48148
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-10-21 13:30:39 +00:00
Rohit Grover
d3a743e96f doc: fix name of DEFINE_MEM_MAP in documentation
Documentation is using an incorrect name for the macro available to
allocate memory maps.

Change-Id: Ic2a93d3851219cb91f3c9c01e2aa19e38913abdd
Signed-off-by: Rohit Grover <rohit.grover@arm.com>
2016-10-21 11:32:33 +00:00
Marcus Shawcroft
93c937fb8c drivers/aio_comparator: Fix code formatting.
Change-Id: I8dc5e5d42e6d7f0b8866ef6c99756ade1eb1a1ef
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-21 09:13:55 +01:00
Marcus Shawcroft
a3ed215b49 doc: Update driver documentation to reflect const config_info.
Change-Id: I85edb0b853a38f2093ea2dc0f7fc53a39010c2d2
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-21 09:13:55 +01:00
Johan Hedberg
77d34b7792 Merge bluetooth branch into master
Main changes:

 - New hci-uart sample app to expose a HCI-over-UART controller
 - Fixes to L2CAP error and malformed packet handling
 - Update GATT CCC callback to receive the changed attribute pointer
 - Fix connection encryption support on nRF51 controllers
 - Fix build with the unified kernel

----------------------------------------------------------------
Arkadiusz Lichwa (9):
      Bluetooth: L2CAP: Refactor CoC CID ranges
      Bluetooth: L2CAP: Protect fixed channels
      Bluetooth: L2CAP: Refactor handling connection response
      Bluetooth: L2CAP: Handle security procedure non successful path
      Bluetooth: L2CAP: Add valid BR/EDR connection response errors
      Bluetooth: L2CAP: Fix 'result' values in BR/EDR connection response
      Bluetooth: L2CAP: Refactor BR/EDR connection request handler
      Bluetooth: L2CAP: Cleanup l2cap_br_conn_req()
      Bluetooth: L2CAP: Factor out repeatable cleanup calls

Carles Cufi (1):
      Bluetooth: HCI UART app to run Zephyr as a BLE Controller

Jaganath Kanakkassery (1):
      Bluetooth: RFCOMM: Handle security for incoming connections

Kaustav Dey Biswas (5):
      Bluetooth: UUID: Fix alignment of UUID declarations
      Bluetooth: UUID: Add protocol UUIDs
      Bluetooth: SDP: Server: Support service record registration
      Bluetooth: shell: Add sample SDP service registration
      Bluetooth: SDP: Shorten Service Class macro name

Luiz Augusto von Dentz (7):
      Bluetooth: GATT: Pass CCC attribute to changed callback
      Bluetooth: GATT: Fix code style
      Bluetooth: L2CAP: Simplify allocation of buffer fragments
      Bluetooth: L2CAP: Fix reusing buffer with fragments
      Bluetooth: L2CAP: Drop extra reference to fragments
      Bluetooth: L2CAP: Use MPS for outgoing segments
      Bluetooth: ATT: Fix handling of insufficient authentication

Szymon Janc (1):
      Bluetooth: Fix build with unified kernel

Vinayak Chettimada (2):
      Bluetooth: Controller: Alternate Enc procedure for nRF51x SoC
      Bluetooth: Controller: Remove custom clock control impl.

 drivers/bluetooth/controller/Makefile      |   1 -
 drivers/bluetooth/controller/hal/clock.c   | 230 ---------
 drivers/bluetooth/controller/hal/clock.h   |  26 -
 drivers/bluetooth/controller/hal/radio.c   |   8 +-
 .../bluetooth/controller/hci/hci_driver.c  |  38 +-
 drivers/bluetooth/controller/ll/ctrl.c     | 180 +++++--
 drivers/bluetooth/controller/ll/ctrl.h     |   8 +-
 drivers/bluetooth/nble/gatt.c              |   7 +-
 include/bluetooth/gatt.h                   |   3 +-
 include/bluetooth/rfcomm.h                 |   3 +
 include/bluetooth/sdp.h                    | 403 ++++++++++++++++
 include/bluetooth/uuid.h                   | 333 +++++++------
 net/bluetooth/Kconfig                      |   9 +
 net/bluetooth/att.c                        |  42 +-
 net/bluetooth/gatt.c                       |  19 +-
 net/bluetooth/hci_ecc.c                    |   1 -
 net/bluetooth/l2cap.c                      |  62 +--
 net/bluetooth/l2cap_br.c                   | 161 +++---
 net/bluetooth/l2cap_internal.h             |   9 +
 net/bluetooth/rfcomm.c                     |  85 ++++
 net/bluetooth/rfcomm_internal.h            |   1 +
 net/bluetooth/sdp.c                        |  38 +-
 samples/bluetooth/gatt/bas.c               |   3 +-
 samples/bluetooth/gatt/cts.c               |   2 +-
 samples/bluetooth/gatt/hog.c               |   2 +-
 samples/bluetooth/gatt/hrs.c               |   3 +-
 samples/bluetooth/hci-uart/Makefile        |   5 +
 samples/bluetooth/hci-uart/prj.conf        |  12 +
 samples/bluetooth/hci-uart/src/Makefile    |   1 +
 samples/bluetooth/hci-uart/src/main.c      | 306 ++++++++++++
 samples/bluetooth/hci-uart/testcase.ini    |   5 +
 samples/bluetooth/peripheral/src/main.c    |   2 +-
 .../bluetooth/peripheral_csc/src/main.c    |   6 +-
 .../bluetooth/peripheral_esp/src/main.c    |   3 +-
 tests/bluetooth/shell/src/main.c           |  78 ++-
 tests/bluetooth/tester/src/gatt.c          |   2 +-
 36 files changed, 1499 insertions(+), 598 deletions(-)
 delete mode 100644 drivers/bluetooth/controller/hal/clock.c
 delete mode 100644 drivers/bluetooth/controller/hal/clock.h
 create mode 100644 samples/bluetooth/hci-uart/Makefile
 create mode 100644 samples/bluetooth/hci-uart/prj.conf
 create mode 100644 samples/bluetooth/hci-uart/src/Makefile
 create mode 100644 samples/bluetooth/hci-uart/src/main.c
 create mode 100644 samples/bluetooth/hci-uart/testcase.ini

Change-Id: I564abe2fa996a05b4b0f22493bcf37d94253c0e3
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-10-21 07:50:23 +03:00
Kaustav Dey Biswas
0ecbbc8a7b Bluetooth: SDP: Shorten Service Class macro name
This change shortens the Service Class macro name from
BT_SDP_*_SVCLASS_ID to BT_SDP_*_SVCLASS

Change-Id: I1150baae24428c6b76f005d11003291016e0a03e
Signed-off-by: Kaustav Dey Biswas <kaustav.d.biswas@intel.com>
2016-10-21 07:47:31 +03:00
Szymon Janc
8b8b9f2131 Bluetooth: Fix build with unified kernel
zephyr.h includes required headers and has guards for unified kernel
config.

Change-Id: I40b5d95218cee5594c06e5ba3de496a0aca16f2c
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-10-21 07:47:31 +03:00
Luiz Augusto von Dentz
7beb70906e Bluetooth: ATT: Fix handling of insufficient authentication
Insufficient authentication can be used with almost any security level to
indicate the security need to be escalated not only to high but to medium
and fips depending on the current security level.

Jira: ZEP-1074

Change-Id: Iea261f2814caf5b290997beedcbb0aa7f5a9e890
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-10-21 07:47:31 +03:00
Kaustav Dey Biswas
148b0a2d35 Bluetooth: shell: Add sample SDP service registration
This change adds SPP as a sample SDP service during RFCOMM
server registration. The SPP channel is now used as the
fixed channel for RFCOMM register command.

Change-Id: I3b5ad3995725adca55db1497d4a35099f6311f3b
Signed-off-by: Kaustav Dey Biswas <kaustav.d.biswas@intel.com>
2016-10-21 07:47:31 +03:00
Arkadiusz Lichwa
100890f71c Bluetooth: L2CAP: Factor out repeatable cleanup calls
Adds helper cleanup procedure containing common code resetting channel
context internals.

Change-Id: I679fb7ca68158327493cd362ae8c5c6c44973776
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-10-21 07:47:31 +03:00
Arkadiusz Lichwa
b7b65ef4d0 Bluetooth: L2CAP: Cleanup l2cap_br_conn_req()
Removes the code responsible for reset channel object internals. These
internals will be reset automatically on chan 'destroy' ops as a result
of disconnection that taking place in this case.

Change-Id: I7bb3aaf225797a7c4b17ed2b578f6825114307c9
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-10-21 07:47:31 +03:00
Arkadiusz Lichwa
941104a66f Bluetooth: L2CAP: Refactor BR/EDR connection request handler
Reduces code in main handler servicing connection request by use of helper
routine l2cap_br_conn_req_reply() to send connection response. It
involves moving the helper up in code to skip forward declaration and also
makes slight refactor of it to adjust 'pending result' condition in response.

Change-Id: I0a51d908b14ed3b5d6c497d57a99422fc9c44573
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-10-21 07:47:31 +03:00