Commit Graph

5510 Commits

Author SHA1 Message Date
Arkadiusz Lichwa aaa2650f0f Bluetooth: Cleanup dependency build for LE/BREDR
Reorganizes mostly by using preprocessor (indirectly Kconfig options)
strictly LE-SMP related interfaces and security interfaces shared
between LE and BREDR connections.

Change-Id: I90daa36d72403cd5b73e6791714fcaf7f1fbe8e5
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-03-09 10:55:31 +00:00
Grzegorz Kolodziejczyk 2c121675f5 Bluetooth: tester: Add support for get supported l2cap commands
This adds support for get supported commands of l2cap service.

Change-Id: Ic3e2b6502c05a5784d1fd01af0e47cce11e6d2c9
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
2016-03-09 10:21:46 +00:00
Grzegorz Kolodziejczyk 5d74aecf52 Bluetooth: tester: Add initial support for l2cap service
This patch adds initial declaration of l2cap service in tester
application.

Change-Id: I9bd729bc351b2fe135e7b5b80262b45eaf70b10b
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
2016-03-09 10:21:17 +00:00
Andrei Emeltchenko ed14803c27 drivers/nble: Implement GATT read request
Implement GATT read reusing gatt_private to store GATT parameters.

Change-Id: Ie3c58a6272cc7cf380e4d3a04e45b191680d1ebe
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-03-09 10:19:58 +00:00
Andrei Emeltchenko 3d08d16780 Bluetooth: Fix compare logic in ATT read rsp
The Read Response only contains a Characteristic Value that is less
than or equal to (ATT_MTU – 1) octets in length. Include also equal.

Change-Id: I139d1460159aafa2187e04cddd8df57d42807c67
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-03-09 10:16:38 +00:00
Ravi kumar Veeramally 325eb61a6d net: apps: Add qemu support without monitor tool
Echo-server and client will exchange data without monitor
tool support.

Change-Id: I3cf73a4baf025bf7e5fc634bef696d5f0e6b4c57
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-03-09 08:36:46 +00:00
Jukka Rissanen d51288a4e1 net: contiki: Fix ICMPv6 error message debug print
There were no spaces around printed IPv6 address which
makes it hard to read.

Change-Id: Ia5f8dad7d21fe8a9a4feb9976b1a90fe624102ab
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-03-09 08:35:42 +00:00
Jeff Blais 59359595fe pinmux: Expand the pin function/mode parameter size
The pinmux API was modified to expand the meaning of the 'func' argument
to allow it to represent more than a pre-configured function.  This was done
to reasonably accommodate a larger range of pin configuration options
offered by other MCUs, such as the Freescale K64 (up to 8 pin functions,
plus interrupt, pullup/down, drive strength, open-drain, slew rate, etc.).

This allows bit fields to be used to define various settings.

Change-Id: I2b216b822c6bae7133eed01c8c3339bb47b6c5db
Signed-off-by: Jeff Blais <jeff.blais@windriver.com>
2016-03-09 06:39:16 +00:00
Jeff Blais 0fd7af2a52 arm: Freescale K64 GPIO driver
Basic driver support for the Freescale K64 GPIO module.

Note that only pin direction, read and write are supported.

Change-Id: I6587bb260197a00497be9ac991002e3dde54718d
Signed-off-by: Jeff Blais <jeff.blais@windriver.com>
2016-03-09 06:39:16 +00:00
Jeff Blais 6896a7c2b4 arm: add generic memory-mapped I/O routines for Cortex-M
Add sys_read32(), sys_write32 and sys_set_bit() routines.

Change-Id: I4c624f30cda743d575afdef7f7790d6cc260e01d
Signed-off-by: Jeff Blais <jeff.blais@windriver.com>
2016-03-09 06:39:15 +00:00
Genaro Saucedo Tejada 40ac1fe8cd Fix typo on windows set up documentation.
Adds missing '$' to export command, env variable PYTHON_PATH was not being
expanded when using such command.

typo:

Change-Id: Iad7ee60fbe2699cceb6a6ff6cd64e3bc4ebd2f58
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-03-09 06:31:20 +00:00
Andrew Boie 53e6275b3a ipm: correct prototype for ipm_send
ipm_send_t properly had 'const void *' for the data payload, but
not the ipm_send() API.

Change-Id: I62a424d37bc17f5bc3646c71d3ff3b029f52cbcc
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-09 06:31:02 +00:00
Andrew Boie 8554331b94 ipm: add demo code for inter-processor mailboxes
Migrated from internal repository.
Run "make flash" for each on the same Arduino 101 device.

Origin: Original code, Zephyr "hello world" used as a starting point
Change-Id: I3fdeed6b7e85ad703983c2674e265c85a365ce5b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-09 06:31:02 +00:00
Benjamin Walsh 572e052379 doc: enforce 8-char tabs and 80-column width in coding standards
This will ensure uniformity in the future, but will require what code is
currently aligned on 4-char tabs to be reformated (basically the kernel
and arch code, and some other) to fit in 80 columns with 8-char tabs.
However, it will be more natural to developers used to 8-char tabs,
i.e. people used to work on Linux and other open source projects, which
is our audience, and will lower the barrier of entry.

Change-Id: I626b20e62ba1a5dddd030a27185f51237e5e98b5
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-03-08 21:34:15 +00:00
Vinicius Costa Gomes 0efdb22ae5 pinmux: Fix using wrong variable name
In the pinmux_dev driver for the Quark SE development board in
pinmux_dev_set() the variable 'mode' was used, but it should have been
'func'. This was causing a compilation error:

/home/vinicius/work/zephyr/boards/quark_se_devboard/pinmux.c:
In function 'pinmux_dev_set':
/home/vinicius/work/zephyr/boards/quark_se_devboard/pinmux.c:245:23:
error: 'mode' undeclared (first use in this function)
  uint32_t mode_mask = mode << (pin_no << 1);

Change-Id: I5b9df7c6b488dc5b8819fcf59bb3b994d9d4820b
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2016-03-08 21:28:28 +00:00
Andrew Boie 4a4e82b0c5 arc: remove CONFIG_SW_ISR_TABLE_BSP
It is semantically identical to CONFIG_SW_ISR_TABLE.

Change-Id: Iff0c47166ee6fb1fd8a0991a67bc863d45c32559
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-08 09:58:20 -08:00
Andrew Boie d9df4758e4 arc: remove SW_ISR_TABLE_STATIC_CUSTOM
This scenario is no longer supported in code; the Kconfig
didn't actually do anything.

Change-Id: Ic48bffb5180c4f72bc9c5d85cf18b1072432b951
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-08 09:58:20 -08:00
Andrew Boie e2283a2c58 arc: move vector and sw isr table to core code
Change-Id: Iea7ce4248ff3aaba2a5736c5e50f17c7b8b344af
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-08 09:58:20 -08:00
Andrew Boie 6d972a33cf arm: don't build sw_isr_table if disabled
This table was still being added to ROM even if
CONFIG_SW_ISR_TABLE=n.

Change-Id: Ia0de1349960af1c62e88344b3d5b6655b638219b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-08 09:58:20 -08:00
Andrew Boie bd7d71efdc arm: remove SW_ISR_TABLE_STATIC_CUSTOM
This config option is no longer implemented and doesn't actually
do anything.

Change-Id: I57ab7ba688f57da21f8a58f62ea37dc6b8daaf18
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-08 09:58:20 -08:00
Andrew Boie 5415d945f8 arm: move irq_vector_table to common location
We don't support hard-coding vectors in this table anymore.
If someone really wants to do this, they can set
IRQ_VECTOR_TABLE_CUSTOM and define their own.

Change-Id: I45f49782ba5fefb0a02eab02ec96efd0019bc6d5
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-08 09:58:20 -08:00
Maciek Borzecki 9d61f61453 clock_control/Kconfig: fix quark_se dependencies
Fix dependencies for external and sensor clock device names in
clock_control Kconfig.

Change-Id: I708f025cf3ce97bcd003754fb5b395712d203107
Signed-off-by: Maciej Borzecki <maciek.borzecki@gmail.com>
2016-03-08 16:47:48 +00:00
Szymon Janc 6116d58b02 Bluetooth: Use bt_auth_cancel for pairing cancel
bt_auth_cancel can be used to cancel any type of pairing.

Change-Id: Ia1a6ba834186ab6d5082d3eb473319c2d70cf4a7
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-03-08 15:38:59 +00:00
Andre Guedes eeec6088aa samples: uart: Test irq-based APIs
This patch extends the uart sample so the same functionality (write
buffer, read char then write buffer again) is implemented using
irq-based APIs.

Change-Id: Iefb14dae2b253f90da64ccef8c123619ed494aca
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-03-08 14:21:40 +00:00
Yannis Damigos 31100d1a61 samples:philosophers:Reformated 80-column width, 80-chars tabs
This patch reformats philosophers sample to fit in 80 columns
with 8-char tabs. It also fixes other coding style issues
reported by chechpatch.pl script with -f option.

Change-Id: Ie7ed59db4e67e279a26000247a1838221ac37cd3
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2016-03-08 13:54:53 +00:00
Szymon Janc 1b0e961ef2 Fix uart_pipe_send documentation
This function doesn't return number of bytes sent but error code.

Change-Id: Ife5e4d3957226ce2b4283b5d229095db2ac375dc
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-03-08 13:53:26 +00:00
Andrei Emeltchenko 2ff3e1b580 drivers/nble: Rename gatt_discover to gatt_private
Change-Id: I643ae9c5468fac86ce5cb259609dd42365d67bb3
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-03-08 11:48:05 +00:00
Andrei Emeltchenko 76ce7d67e9 drivers/nble: Rearrange header includes
Rearrange headers so that internal header files gap_internal.h and
gatt_internal.h do not source headers, they are included in *.c files.

Change-Id: I6450ab90eec1b450ee8a138da2ed72b8aaeaf616
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-03-08 11:47:35 +00:00
Luiz Augusto von Dentz 018709de1c Bluetooth: Add indication support for peripheral sample
This adds indication support for one characterist of the vendor service
so it can be used to test bt_gatt_indicate API.

Change-Id: Ief058c93caf3e30972eca920c050451f6120543b
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-03-08 11:46:45 +00:00
Luiz Augusto von Dentz 7ea6a2e64a Bluetooth: L2CAP: Add more descriptive documentation
This documents more in detail the behavior of the API, what callbacks are
involved and when they are called, etc.

Change-Id: I62994ed09a9e8b3f14dc3f8c792469a93aeefabc
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-03-08 11:44:43 +00:00
Andrei Emeltchenko a49f3058d9 drivers/nble: Remove unneeded forward declaration
Change-Id: I79bf15eee2206faf6a1c4d067f79d09c2f8ec66f
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-03-08 11:17:38 +00:00
Andrei Emeltchenko bef9fb8189 drivers/nble: Update RPC to Nordic BLE chip
Update RPC functions and data types, works with NBLE firmware
niko-0301

Change-Id: I3538fab1d20c6e140d995a797d68486be6cd0f23
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-03-08 10:57:03 +00:00
Roger Lendenmann 6b08b37905 Bluetooth: Fix latency versus timeout check
As per 7.8.12 the check on timeout (time unit ajdusted) must be:
timeout * 10 > (1+latency) (max * 1.25 *2).

Change-Id: I0181b3ab2e1ad38bce9312b6bd83e49082d49024
Signed-off-by: Roger Lendenmann <roger.lendenmann@intel.com>
2016-03-08 10:56:34 +00:00
L.S. Cook 9b1bd225ec doc: Edit microkernel_fifos for consistent .rst style and formatting.
Making all the files in this section consistent with :dfn: in the intro
paragraph, API headings, present-tense verbs in APIs, parallel wording.

Change-Id: I5259c443076b1ac6602352dab42d35d5aca6e5b5
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-03-08 00:44:26 +00:00
L.S. Cook fd2c760593 doc: Edit microkernel_mutexes.rst; add ReST syntax, clarifications.
Making all the files in this section consistent with :dfn: in
the intro paragraph, API headings, present-tense verbs in APIs.
Clarified paragraphs on priorty-bazed waiting and priority
inheritance.

Change-Id: I26cc49926bc49c9c68300b6249aeb52c1be33625
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-03-08 00:42:12 +00:00
Daniel Leung b3dcd612da doc: arduino_due: explain how to build the bossac tool ...
... plus some other minor changes.

Change-Id: I41d304bd8f758641e7fa52f082508d43ff40511a
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-08 00:41:32 +00:00
Andre Guedes 2efffac34f rtc: Fix Kconfig
This patch fixes the RTC_DW configuration option. DesignWare and QMSI
drivers shouldn't have any dependency from each other. All driveris
are following this policy, but the RTC.

Change-Id: Ic6bdef492d26978aa875c54d41ef39d407ddf4e1
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-03-07 20:04:33 -03:00
Dmitriy Korovkin 41e55f13ad Kconfig: CPU_MIGHT_SUPPORT_CLFLUSH removal.
Remove CPU_MIGHT_SUPPORT_CLFLUSH as excessive.

Removal the flag requires adding per-SoC cnfiguration,
as some Quark models support clflush instruction, but
some do not, even on compiler level.

Change-Id: I655cba00c629db55d1813c199a2fe08b2d60ef4f
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-03-07 20:25:22 +00:00
Dmitriy Korovkin 287d16d83f x86: Fix cache flush code dependencies
Rearrange the source code in order to place functions
depending on clflush support detection into the proper
section.

Removed dependency between CACHE_LINE_SIZE_DETECT and
CLFLUSH_INSTRUCTION_SUPPORTED or CONFIG_CLFLUSH_DETECT.

Change-Id: I62ba5199763ed16c71f1d2fa372f6cc99b303e6a
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-03-07 20:25:22 +00:00
Baohong Liu fd2a57eb36 boards: arduino_101 : Enable SPI Flash
Enable support for WinBond W25QXXDV SPI flash on
arduino 101 platform.

Change-Id: Ia4dc73f956f79c6a56a31bc3dfca4e5298447742
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-03-07 19:08:03 +00:00
Baohong Liu f3da05f4cb drivers: WinBond SPI flash support
SPI flash sub-driver to support WinBond SPI flash.
It is based on the generic flash driver framework.

Change-Id: I58202e38445a052fa0556b03f854e75ef836e2dd
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-03-07 19:07:50 +00:00
Mariusz Skamra 9e5854c16c Bluetooth: tester: Refactor adding attributes to the GATT database
This patch makes adding attributes more clean.
Attribute UUID and user data are now added along with the attribute
in gatt_db_add function. Thanks to that, some static variables have
been deleted, and the code is more readable.

Change-Id: I510bd7a1a9ae0210dd90520212a340ee1a3b2b53
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-03-07 18:21:52 +00:00
Szymon Janc 7148aa5422 Bluetooth: SMP: Add support for debug ECDH keys
This add following handling of LE SC debug keys:
- if debug keys are disabled locally generated public/private keys
  is  checked to not match debug keys by accident
- if debug keys are enabled those are used as local public/private
  keys pair allowing sniffing of encrypted air traffic
- tracking of remote device using debug keys
- debug keys are discarded after disconnection regardless of bonding
  flag being set or not
- due to HCI interface limitation debug keys are not supported for
  HCI based ECDH and compilation error will be rised for such
  configuration

Change-Id: Ie147b1893c4a6b9542b4d2c261973a7acbd8de96
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-03-07 18:21:10 +00:00
Luiz Augusto von Dentz 68ee16d85c Bluetooth: GATT: Add bt_gatt_indicate
This uses ATT Indicate Value command to indicate changes and wait for
confirmation response.

Change-Id: I123a00e374929d779f96a02440215c32c0e79423
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-03-07 16:44:15 +00:00
Baohong Liu 29c8f95ec4 drivers: framework for a generic flash driver
The framework for a generic flash driver.

Change-Id: I030eb6d88338f4d6611fc6e5cae42ac586cfdb12
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-03-07 16:13:15 +00:00
Anas Nashif e81053ee03 samples/tests: remove old message about standard security
Change-Id: I52bb6731a8c7b2c3ba38b867ac57ff82332ae7f2
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-07 16:07:35 +00:00
Luiz Augusto von Dentz 468ed2e989 Bluetooth: ATT: Handle Confirmations
This adds the callback necessary to parse Confirm PDU:

< ACL Data TX: Handle 3585 flags 0x00 dlen 8
      ATT: Handle Value Indication (0x1d) len 3
        Handle: 0x001d
          Data: 00
> ACL Data RX: Handle 3585 flags 0x02 dlen 5
      ATT: Handle Value Confirmation (0x1e) len 0

Change-Id: I870058150f27718541eae959dcd5d9d7c6414ad3
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-03-07 15:50:18 +00:00
Shaul Triebitz 74e8445003 pci: Fix PCI header initialization
The arguments to memset in pci_header_get were passed in the wrong
order, causing the memset to be a no-op. Fix this.

Change-Id: I1ea6d7d87d74cff6fec9bbc88c99a4b0e460cc95
Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com>
Signed-off-by: Ido Yariv <ido@wizery.com>
2016-03-07 15:29:00 +00:00
Jukka Rissanen 371542780d net: contiki: Print prefix information properly when debugging
Change-Id: Ifbe2aa30477a192f8dd48f51154b0b035ac0b36c
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-03-07 11:06:42 +00:00
Jukka Rissanen b1f2593a58 net: contiki: Fix debug prints for ICMPv6 echo request and reply
Change-Id: Ibf0c153f07af19868d89937dd1674da9d6348f95
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-03-07 11:06:42 +00:00