Commit graph

41120 commits

Author SHA1 Message Date
Kumar Gala
4eef8a3f32 qemu_cortex_m3: Remove nonexistent UART_CONSOLE_BAUDRATE from defconfig
CONFIG_UART_CONSOLE_BAUDRATE doesn't exist and we will get the buad rate
setup from the UART_STELLARIS config defaulting to 115200

Change-Id: I268051055689134c54c92f696a9a560ca5336844
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-07-27 17:14:50 +00:00
Kumar Gala
d42b239c31 qemu_nios2: Fix defconfig Kconfig symbol
Use Kconfig symbol CONFIG_SOC_NIOS2_QEMU instead of CONFIG_SOC_NIOS2F_QEMU

Change-Id: Ia04666830dc9d6f64467fae103418920c202af27
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-07-27 17:14:46 +00:00
Johan Hedberg
ecd421590c misc/byteorder.h: Mark bswap_16 & bswap_32 as internal helpers
These shouldn't be exported in the official doxygen documentation
since they should only be used through the other conversion APIs.

Change-Id: I75880b42892cbfce769192ec2e8c296c954979bd
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-07-27 17:09:52 +00:00
David B. Kinder
36585d7811 doc: remove unused figures from board directory
Board documentation was moved to wiki.zephyrproject.org and documents with
links to the corresponding wiki article left in their place.  This fix
cleans up the figures (.png files) that were left behind and are no longer
needed here.

Change-Id: I9056046fd7c9307de750360e20d8f970ee7ae3b9
Jira: ZEP-564
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2016-07-27 16:27:06 +00:00
Ricardo Salveti
180a0ee948 drivers: reverting Kconfig/Makefile changes for slip
The slip driver revert (3e63a74) was incomplete, missing the Kconfig and
Makefile changes, causing 'make clean' to fail.

Change-Id: I9d944148e6be3756b62d2371a5ab5528365e1ec1
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
2016-07-27 16:26:51 +00:00
Kumar Gala
62ca7ef1fc samples/net: Fix typo in comment
Fix comment that had CONFIG_MICROKERNE should be CONFIG_MICROKERNEL

Change-Id: Ic7ad63350abe92e9f1b84f4de0d6d3bb1b43dc77
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-07-27 16:20:55 +00:00
Andrew Boie
d9a84c5c77 Makefile: link arch/ last
The IRQ implementations of ARC, ARM, and Nios II use .gnu.linkonce
sections for declaring entires in the sw_isr_table array. It's
imperative that arch/built-in.o be linked after everything else
as we want custom interrupt handlers to take precedence over the
default spurious interrupt handlers.

Currently, any interrupt handlers defined in ext/ or usb/ will not
be installed properly on the above mentioned arches.

Change-Id: Ib3fb21ff1ef114678906f130c268c266535954f1
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-27 15:48:23 +00:00
Juro Bystricky
19d84d8e00 nano_init.c: STACK_CANARY_INIT fix for ARC
An updated version of ARC GCC reports this error:
nano_init.c:340: Error: inappropriate arguments for opcode 'mov'

The offending in-line assembly code tried to move register value into a
memory location.

Use store "st" instruction instead of "mov" istruction to store
a value in memory.

Change-Id: I91ebd20495612da4d5639a3ef848379705f6dedd
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
2016-07-27 15:23:15 +00:00
Flavio Santes
a3c0b2c00f samples/net: Add netz_client sample code
This sample code demostrates how to use the netz API. A basic
IPv4/TCP/UDP client application is provided.

The README file describes the basic setup.

Origin: Original

Jira: ZEP-567
Change-Id: I1c7d2454336dc00747044c5fc330f9ab6457ecf1
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-07-27 14:45:32 +00:00
Baohong Liu
db17939c8a drivers: i2c: remove i2c master idle check
The idle status check before a i2c transfer is not a reliable
way to check whether i2c master is ready to transfer data. If
the data transfer for the previous API call is done, but, a
stop condition is not sent by the previous API, the i2c master
is not idle, but, it can start new data transfer.

Change-Id: I93dbf46cef6272f3da69a0d67fb737c9b480791f
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-07-27 14:44:54 +00:00
Johan Hedberg
a95b6eeafb nano_work: Fix never yielding from fiber
If the delayed work FIFO never goes empty (e.g. because the work
callback keeps resubmitting or there's a very active ISR feeding items
there) then the fiber would never yield, causing all sorts of problems
for the system. Adding an explicit fiber_yield() call at the end of
the while-loop solves the issue.

Change-Id: I233b9fc18fc9db9172daf8689bd22d09952089cb
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-07-27 14:44:13 +00:00
Andrew Boie
213a2dcac9 atomic.h: change to ATOMIC_DEFINE
Based on review comments for previous patch at
https://gerrit.zephyrproject.org/r/3392.

The macro changed to ATOMIC_DEFINE since it reserves storage
and doesn't just announce its existence.

Change-Id: Ib6c2b76a219040694926823b94daf6fe779a05d0
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-27 14:42:44 +00:00
Andrew Boie
0d03e32036 gen_idt: add -d switch for extra debug info
Previously, gen_idt's code had to be modified to get this information.
We now print it by default when building with V=1

Change-Id: I31bd6c5b851d6280ebcedaab97bd02b8331a2f24
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-27 14:42:27 +00:00
Luiz Augusto von Dentz
5194d2fb06 Bluetooth: GATT: Remove unused struct
prepare_write_data is no longer need since the ATT layer is now
responsible to queue the prepare writes using regular writes to commit
the data instead.

Change-Id: I8e35307a0489505b1475cdf31773c65a51165539
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-07-27 15:28:38 +03:00
Kuo-Lang Tseng
7e71e5eecc MAINTAINERS: add mbedTLS section
Change-Id: If6ec848d7771e25927ea9a01161e375289bdf49e
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
2016-07-27 00:22:18 +00:00
Sergio Rodriguez
312def2c78 ext/lib : Integrating mbedTLS to build process
Integrating the mbedTLS to the the build proccess with the minimal
Thread configuration.

Change-Id: I0ae191434d26890537a29a247c409228180410f3
Jira: ZEP-327
Jira: ZEP-340
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-07-26 16:00:04 -07:00
Sergio Rodriguez
96c69cc29f ext/lib : mbedTLS Configuration modifications
Adding the mbedTLS configuration neede for Thread Network Protocol
support, this shows the modifications needed to be able to compile
on Zephyr

Jira: ZEP-327
Jira: ZEP-340

Change-Id: I80a8f44bc302905b7aa4568a40a6ca66dcaf42f8
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-07-26 22:48:18 +00:00
Sergio Rodriguez
aca6e99106 ext/lib : mbedTLS library modifications
Porting the mbedTLS library with the minimal Thread supported
configuration, this is a TLS/SSL library highly customizable.
This show the modifications needed to be able to compile on
Zephyr build enviroment which does not have a time.h header file,
so we avoid compilation errors.

Jira: ZEP-327
Jira: ZEP-340

Change-Id: I197ea96d33748c986c71fe5a0608225aee69c8b3
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-07-26 22:47:59 +00:00
Sergio Rodriguez
8485f601cb ext/lib : Adding mbedTLS library
Adding the pristine version of mbed TLS to the zephyr source tree
as the initial step of porting the mbed TLS library to Zephyr

Jira: ZEP-327
Jira: ZEP-340

Origin: https://tls.mbed.org/download/start/mbedtls-2.3.0-apache.tgz

Change-Id: Iae814560310ebd00af52c7b1fb9d03195388fa0c
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
2016-07-26 11:17:58 -07:00
Kuo-Lang Tseng
416f0759aa samples: aon counter: Remove outdated information in readme file
QMSI builtin source is already in zephyr build so update the
readme file.

Jira: ZEP-554

Change-Id: Ief525d94ad71fb94e01eec1eb43c10ca91825c35
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
2016-07-26 17:50:35 +00:00
Johan Hedberg
a6d42751a3 atomic: Add helper to declare atomic_t arrays for bit fields
The atomic_t API supports arbitrary sized bit fields which are not
limited to a single atomic_t variable. This patch introduces a macro
to help declare right-sized atomic_t arrays given the number of bits
needed.

Change-Id: I226f6312b642551fc492df29d24764222f45ac83
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-07-26 15:31:09 +00:00
Andrew Boie
96cadd1a9a arc: move special-purpose irq priorities to flags
We have already done this on x86 and ARM. The policy is as follows:

* IRQ priority levels starting at 0 all have the same semantics and
do not have special properties. The priority level is either ignored
on arches which do not support programmable priority levels, or lower
priority levels take precedence over higher ones.
* Special-case priorty levels are specified via flags, in which case
the supplied priority level is ignored.

Issue: ZEP-60
Change-Id: Ic603f49299ee1426fb9350ca29d0b8ef96a1d53a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-26 15:06:28 +00:00
Luiz Augusto von Dentz
78881ebd3b Bluetooth: GATT: Fix not passing params in the write callback
Write callback shall receive the params given in the request so the
struct itself needs to be passed.

Change-Id: Ia039c25c99efb57e4c441561067d0398d9e6277c
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-07-26 15:26:15 +03:00
Allan Stephens
2275cae089 kernel: Remove unneeded ASSERT from memory pool subsystem
Eliminates assert check that complains about an attempt to allocate
a memory pool block larger than the largest possible block size.
In such cases the allocation code now just returns a NULL pointer
indicating that it was unable to allocate the requested block, just
as it does when a block smaller than the maximum size cannot be
allocated because none is currently available.

Note: One scenario in which it isn't unreasonable for an application
writer to request a block that is too big is the case where a receiving
task using a mailbox first receives an excessively large message without
its data and then tries to retrieve the data into a memory pool block
allocated by the mailbox. Rather than forcing the application writer
to check to see if the size of the received message is too big for the
memory pool, or adding code to the mailbox subsystem to do such a check,
it's easier to pass on the request to the memory pool and simply have it
return NULL, which causes the mailbox to report that data retrieval
failed. The application can then perform a single check that catches
both the case where the memory pool simply ran out of blocks and the case
where it didn't have any block big enough to handle the message.

Change-Id: Ifd2cdd8a5927b93d3e9c5df301544e522131d2c6
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-26 04:53:07 +00:00
Inaky Perez-Gonzalez
eb2d8b418c testcases: add automation markup to samples/
Code in samples does not follow an standarized format for reporting
success or operation failure -- thus we use markup (in file sample.tc)
to specify what shall be found in the console to consider execution a
success.

There is a few functional code modifications that add/extend console
messages so verification is possible or easier:

 - hello_world, synchronization: extend the success message to also
   print which core is running the testcase

- pci_enum: print message on success.

Change-Id: Idb6cea03adebe97d97854603f963f4e3d4cb856a
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-07-26 08:32:24 +08:00
Andrew Boie
11693c1bf9 build: use -Og instead of -O0 for CONFIG_DEBUG
From the GCC manual for -Og option, introduced in GCC
4.8:

Optimize debugging experience. -Og enables optimizations
that do not interfere with debugging. It should be the
optimization level of choice for the standard
edit-compile-debug cycle, offering a reasonable level of
optimization while maintaining fast compilation and a
good debugging experience

Change-Id: I65751cf3117bc2e6f70a7008b170126160cfa48c
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-25 18:09:14 +00:00
Jaakko Hannikainen
e6a34f8175 net: buf: Fix compiling with debug options
The small typo in the debug printed variable prevents compiling when
using debug printing in the netbuf code.

Change-Id: I6cafa82e7f5629e9021d7ad1a2130f2945b4f661
Signed-off-by: Jaakko Hannikainen <jaakko.hannikainen@intel.com>
2016-07-25 14:24:39 +00:00
Arkadiusz Lichwa
ea5449dbcc Bluetooth: L2CAP: Add BR/EDR CoC channel disconnect
Implements CoC channel disconnect API initiated from local and handles
response to the disconnect request from remote.

Change-Id: I25f2495404cd405dc83ad56269e4897e53d602e6
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-07-25 14:24:04 +00:00
Arkadiusz Lichwa
a49b9fcf57 Bluetooth: L2CAP: Handle BR/EDR configuration deferred by GAP
Marks successfuly allocated channel during incoming connection
request to dedicated channel context flag. Introduced here ACCEPTOR
role on L2CAP layer helps then resolve channel CoC state context when
incoming connection setup is deferred by changed security on GAP caused
by local L2CAP channel requirement.

> ACL Data RX: Handle 12 flags 0x02 dlen 12                   [hci1] 108.666944
      L2CAP: Connection Request (0x02) ident 3 len 4
        PSM: 3 (0x0003)
        Source CID: 64
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci1] 108.668572
        Num handles: 1
        Handle: 12
        Count: 2
< ACL Data TX: Handle 12 flags 0x00 dlen 16                   [hci1] 108.673002
      L2CAP: Connection Response (0x03) ident 3 len 8
        Destination CID: 64
        Source CID: 64
        Result: Connection successful (0x0000)
        Status: No further information available (0x0000)
< HCI Command: Host Number of Complet.. (0x03|0x0035) plen 5  [hci1] 108.673548
        Num handles: 1
        Handle: 12
        Count: 1
< ACL Data TX: Handle 12 flags 0x00 dlen 16                   [hci1] 108.674725
      L2CAP: Configure Request (0x04) ident 5 len 8
        Destination CID: 64
        Flags: 0x0000
        Option: Maximum Transmission Unit (0x01) [mandatory]
          MTU: 48
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci1] 108.707579
        Num handles: 1
        Handle: 12
        Count: 2
> ACL Data RX: Handle 12 flags 0x02 dlen 16                   [hci1] 108.714206
      L2CAP: Configure Request (0x04) ident 4 len 8
        Destination CID: 64
        Flags: 0x0000
        Option: Maximum Transmission Unit (0x01) [mandatory]
          MTU: 560
> ACL Data RX: Handle 12 flags 0x02 dlen 18                   [hci1] 108.715442
      L2CAP: Configure Response (0x05) ident 5 len 10
        Source CID: 64
        Flags: 0x0000
        Result: Success (0x0000)
        Option: Maximum Transmission Unit (0x01) [mandatory]
          MTU: 48
< HCI Command: Host Number of Complet.. (0x03|0x0035) plen 5  [hci1] 108.720451
        Num handles: 1
        Handle: 12
        Count: 1
< ACL Data TX: Handle 12 flags 0x00 dlen 14                   [hci1] 108.720472
      L2CAP: Configure Response (0x05) ident 4 len 6
        Source CID: 64
        Flags: 0x0000
        Result: Success (0x0000)
< HCI Command: Host Number of Complet.. (0x03|0x0035) plen 5  [hci1] 108.722324
        Num handles: 1
        Handle: 12
        Count: 1
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci1] 108.976574
        Num handles: 1
        Handle: 12
        Count: 1
> ACL Data RX: Handle 12 flags 0x02 dlen 12                   [hci1] 116.297981
      L2CAP: Connection Request (0x02) ident 5 len 4
        PSM: 5 (0x0005)
        Source CID: 65
< HCI Command: Authentication Requested (0x01|0x0011) plen 2  [hci1] 116.302176
        Handle: 12
> HCI Event: Command Status (0x0f) plen 4                     [hci1] 116.303129
      Authentication Requested (0x01|0x0011) ncmd 1
        Status: Success (0x00)
> HCI Event: Link Key Request (0x17) plen 6                   [hci1] 116.304127
        Address: 00:1A:7D:DA:71:13 (cyber-blue(HK)Ltd)
< HCI Command: Host Number of Complet.. (0x03|0x0035) plen 5  [hci1] 116.304327
        Num handles: 1
        Handle: 12
        Count: 1
< ACL Data TX: Handle 12 flags 0x00 dlen 16                   [hci1] 116.305841
      L2CAP: Connection Response (0x03) ident 5 len 8
        Destination CID: 65
        Source CID: 65
        Result: Connection pending (0x0001)
        Status: Authentication pending (0x0001)
< HCI Command: Link Key Request Negat.. (0x01|0x000c) plen 6  [hci1] 116.306913
        Address: 00:1A:7D:DA:71:13 (cyber-blue(HK)Ltd)
> HCI Event: Command Complete (0x0e) plen 10                  [hci1] 116.308125
      Link Key Request Negative Reply (0x01|0x000c) ncmd 1
        Status: Success (0x00)
        Address: 00:1A:7D:DA:71:13 (cyber-blue(HK)Ltd)
> HCI Event: IO Capability Request (0x31) plen 6              [hci1] 116.309126
        Address: 00:1A:7D:DA:71:13 (cyber-blue(HK)Ltd)
< HCI Command: IO Capability Request... (0x01|0x002b) plen 9  [hci1] 116.310177
        Address: 00:1A:7D:DA:71:13 (cyber-blue(HK)Ltd)
        IO capability: DisplayYesNo (0x01)
        OOB data: Authentication data not present (0x00)
        Authentication: Dedicated Bonding - MITM required (0x03)
> HCI Event: Command Complete (0x0e) plen 10                  [hci1] 116.311125
      IO Capability Request Reply (0x01|0x002b) ncmd 1
        Status: Success (0x00)
        Address: 00:1A:7D:DA:71:13 (cyber-blue(HK)Ltd)
> HCI Event: IO Capability Response (0x32) plen 9             [hci1] 116.331128
        Address: 00:1A:7D:DA:71:13 (cyber-blue(HK)Ltd)
        IO capability: DisplayYesNo (0x01)
        OOB data: Authentication data not present (0x00)
        Authentication: Dedicated Bonding - MITM required (0x03)
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci1] 116.483125
        Num handles: 1
        Handle: 12
        Count: 1
> HCI Event: User Confirmation Request (0x33) plen 10         [hci1] 116.516225
        Address: 00:1A:7D:DA:71:13 (cyber-blue(HK)Ltd)
        Passkey: 798417
< HCI Command: User Confirmation Requ.. (0x01|0x002c) plen 6  [hci1] 123.541708
        Address: 00:1A:7D:DA:71:13 (cyber-blue(HK)Ltd)
> HCI Event: Command Complete (0x0e) plen 10                  [hci1] 123.555708
      User Confirmation Request Reply (0x01|0x002c) ncmd 1
        Status: Success (0x00)
        Address: 00:1A:7D:DA:71:13 (cyber-blue(HK)Ltd)
> HCI Event: Simple Pairing Complete (0x36) plen 7            [hci1] 131.484303
        Status: Success (0x00)
        Address: 00:1A:7D:DA:71:13 (cyber-blue(HK)Ltd)
> HCI Event: Link Key Notification (0x18) plen 23             [hci1] 131.524232
        Address: 00:1A:7D:DA:71:13 (cyber-blue(HK)Ltd)
        Link key: 9355f679935c4e602ac1cc8a56ba121a
        Key type: Authenticated Combination key from P-192 (0x05)
> HCI Event: Auth Complete (0x06) plen 3                      [hci1] 131.525244
        Status: Success (0x00)
        Handle: 12
< HCI Command: Set Connection Encrypt.. (0x01|0x0013) plen 3  [hci1] 131.527348
        Handle: 12
        Encryption: Enabled (0x01)
> HCI Event: Command Status (0x0f) plen 4                     [hci1] 131.528234
      Set Connection Encryption (0x01|0x0013) ncmd 1
        Status: Success (0x00)
> HCI Event: Encryption Key Refresh Complete (0x30) plen 3    [hci1] 131.552238
        Status: Success (0x00)
        Handle: 12
> HCI Event: Encryption Change (0x08) plen 4                  [hci1] 131.553240
        Status: Success (0x00)
        Handle: 12
        Encryption: Enabled with E0 (0x01)
< ACL Data TX: Handle 12 flags 0x00 dlen 16                   [hci1] 131.556727
      L2CAP: Connection Response (0x03) ident 5 len 8
        Destination CID: 65
        Source CID: 65
        Result: Connection successful (0x0000)
        Status: No further information available (0x0000)
< ACL Data TX: Handle 12 flags 0x00 dlen 16                   [hci1] 131.562063
      L2CAP: Configure Request (0x04) ident 6 len 8
        Destination CID: 65
        Flags: 0x0000
        Option: Maximum Transmission Unit (0x01) [mandatory]
          MTU: 64
> ACL Data RX: Handle 12 flags 0x02 dlen 16                   [hci1] 131.562733
      L2CAP: Configure Request (0x04) ident 6 len 8
        Destination CID: 65
        Flags: 0x0000
        Option: Maximum Transmission Unit (0x01) [mandatory]
          MTU: 245
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci1] 131.567286
        Num handles: 1
        Handle: 12
        Count: 2
> ACL Data RX: Handle 12 flags 0x02 dlen 18                   [hci1] 131.568858
      L2CAP: Configure Response (0x05) ident 6 len 10
        Source CID: 65
        Flags: 0x0000
        Result: Success (0x0000)
        Option: Maximum Transmission Unit (0x01) [mandatory]
          MTU: 64

Change-Id: I04aab5a0511ba09693f96faeeb66eef53e66ce0e
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-07-25 14:23:12 +00:00
Arkadiusz Lichwa
f8f9de079a Bluetooth: L2CAP: Reset CoC channel state during cleanup
When user channel is disattached from connection object during channel
cleanup, resets its state to DISCONNECTED to be able reuse it from
well known init state.

Change-Id: I5733ade4be195821a1643383916c3a6fea5a88d3
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-07-25 14:22:57 +00:00
Arkadiusz Lichwa
37bb3e8049 Bluetooth: L2CAP: Split security changed handler for BR/EDR
Delegates own handler for changed security information happened on BR/EDR
link. Now L2CAP layer based on transport type can independently handle
updated security information.

Change-Id: I4838f1cc9d53cf6dfab19bb9f70ec6e307741e66
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-07-25 14:22:18 +00:00
Arkadiusz Lichwa
96e68fe654 Bluetooth: L2CAP: Introduce security requirements on CoC
Applies on L2CAP channel object security requirement member and
implements on BR/EDR transport basic security cases during incoming
CoC connection request. Since channel security requirements can involve
sending 2 separate connection responses with proper results depending on
context path, there's a need to store L2CAP signaling identifier set in
original connection request to be restored later to help match proper
response context.

Change-Id: Ibac9a5d2443f2975637e1bd15f61afcad53f843b
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-07-25 13:56:08 +00:00
Luiz Augusto von Dentz
c6071e46da Bluetooth: GATT: Fix bt_gatt_exchange_mtu documentation
bt_gatt_exchange_mtu does actually return an int, also change the align
the description properly so it is consistent with other functions.

Change-Id: I6a0780830e13ded15e6262a46094441a2ef662c8
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-07-25 16:08:52 +03:00
Inaky Perez-Gonzalez
68e0c50211 testcases: introduce defaults to build/deploy/evaluate
This introduces the default language to use for building, deploying
and evaluating testcases on real hardware in the automation framework.

To be able to filter testcases out based on .config values, we split
the build process into generating the configuration file, filtering
and then the actual building.

The configuration step is done first, to be able to skip as soon
as possible.

This file is in the top level as the test runner will look for
defaults in parent directories.

Note that the default's entry in tests/.tcdefaults takes advantage of
the fact that all:

- the test cases under tests/ print standarized strings for success
  or failure.

- the tc_util.h kernel header will print the passed runid if specified
  when finalizing the testcase. We will make sure it is found to deem
  the TC succesful, ensuring that the right image is flashed and
  verified.

Change-Id: If40b226aef9583f7ce4064405d9334de379f2b00
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-07-23 18:31:18 +00:00
Mariusz Skamra
602724a91a Bluetooth: tester: Expose device address
This adds device address to the controller_info data. This address
may be used then by PTS for establishing connection etc.

Change-Id: Ic2319c452d94ac79376659ba37b4c9d812ccf9ae
Signed-off-by: Mariusz Skamra <mariusz.skamra@gmail.com>
2016-07-23 06:16:14 +00:00
Mariusz Skamra
c06a13a93d Bluetooth: tester: Set privacy flag in current_settings
If CONFIG_BLUETOOTH_PRIVACY is set in Kconfig, current settings
shall indicate it's usage.

Change-Id: I0645aedf1b774617c9d97cec0070908aef919ca7
Signed-off-by: Mariusz Skamra <mariusz.skamra@gmail.com>
2016-07-23 06:16:09 +00:00
Mariusz Skamra
7fe81b92a6 Bluetooth: tester: Add missing GAP_SETTINGS_* defines
Based on BTP specification following GAP_SETTINGS_* flags were added:
GAP_SETTINGS_CONTROLLER_CONFIG,
GAP_SETTINGS_STATIC_ADDRESS

Change-Id: Ic87d13772c0ef9c9bc8bba331c8bc9f3ffc93f87
Signed-off-by: Mariusz Skamra <mariusz.skamra@gmail.com>
2016-07-23 06:15:48 +00:00
Andrew Boie
3a73378741 MAINTAINERS: add INTERRUPTS section
Interrupt handling considerations are pervasive in core
arch code so just add the entire arch/*/core/ dirs for
each arch.

Change-Id: Id2b166541faf620f1c45d9d330fa03e5a387a88a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-22 23:40:38 +00:00
Sonia Leon Bautista
616e96242b scripts: Check all CONFIG_* in the code are defined into a Kconfig file
checkConfig script scans all '*.c', '*.h' and '*.S' looking for all
kconfig items used into the Zephyr Code and validates if they are
defined into any '*.kconfig' file.

to execute script use:
*to run with default values:
	$ checkconfig.py
*to run and get complete log of all symbols used:
	$ checkconfig.py -c
*to run from a diferent subdirectory, not zephyr base, like
 drivers/grove
	$ checkconfig.py -s drivers/grove
*to run and exclude some directories for verification:
	$checkconfig.py -e drivers

*to get more help about how to run script:
	$checkconfig.py --help

Change-Id: Ia8ddda8b560305eb73224c55645729a40fcb5863
Signed-off-by: Sonia Leon Bautista <sonia.leon.bautista@intel.com>
2016-07-22 23:27:08 +00:00
Sergio Rodriguez
b4d87a575a qmsi: gpio: Use locking mechanism to guard critical regions.
This will guard the driver API to be safe for concurrent
invocation from fibers or tasks.

The machanism is by default disabled. To enable it, the
following flag needs to be defined:

CONFIG_GPIO_QMSI_API_REENTRANCY

Jira: ZEP-441

Change-Id: Ia3ee738aff2f8e70e4f9a7ec76346138ff6f5031
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
2016-07-22 23:26:34 +00:00
Sergio Rodriguez
3c5af9ab5b qmsi: gpio: quark_se_ss: Use locking mechanism to guard critical regions.
This will allow the driver API to be safe for concurrent invocation
from fibers and task.

The machanism is by default disabled. To enable it, the following
flag needs to be defined:

CONFIG_GPIO_QMSI_SS_API_REENTRANCY

Jira: ZEP-411

Change-Id: I5b738532f2eefec6d5d78ab6a668790dfe9faaff
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-07-22 23:25:31 +00:00
Inaky Perez-Gonzalez
8518d9cf81 testcases: stub for x86 core on Quark SE
When running independent testcases that can run on any core, in
certain platforms using the Quark SE SOC, a stub is needed in the x86
to bring up the ARC core and pass along serial port messages. This
allows the indepent testcase to be ran in the ARC core without
modifications (the same way it runs on any other core).

There is a solution planned for the future that will allow this
workaround to be removed (without need to support backwards
compatibility).

Change-Id: I2a9b7e8797d03a5a2469d7b18a3025b79226f389
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-07-22 23:05:52 +00:00
Inaky Perez-Gonzalez
c6a8462c6e doc: fix backslash paths in windows and python default location
Backslashes need to be doubled up, otherwise they are interpreted like
a escape sequence and basically, dissapear. As part of this, suggest
the location of the default python installation *before* using it, for
simplicity.

Change-Id: I26ed80a7dd8c08277614dc49a3986848892ff844
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-07-22 22:37:49 +00:00
Mariusz Skamra
a028e43a97 Bluetooth: tester: Send IUT ready event on tester_init
When tester application has been initialized, send this event
to indicate that Upper Tester can send first BTP command.

Change-Id: Id3f4dd246c4e67982057f9518b4b0036e79a6a01
Signed-off-by: Mariusz Skamra <mariusz.skamra@gmail.com>
2016-07-22 20:03:28 +00:00
Mariusz Skamra
3c15027799 Bluetooth: btp: Add IUT ready event
Before sending any command, the tester shall wait for this event
indicating that IUT is ready to accept first BTP command.
This is needed, because some devices need more time to initialize
their stacks, so that the first BTP command can be lost.

Change-Id: I92d1c6ea8be905734037eb29f7f270a70ab1583e
Signed-off-by: Mariusz Skamra <mariusz.skamra@gmail.com>
2016-07-22 19:19:28 +00:00
Andrei Emeltchenko
712689c9a3 drivers/nble: Use semaphore to control notification rate
At the moment firmware reads everything we send to it over UART and
when an application tries to send too much notifications we are stuck.
The proper approach would be forcing firmware to read from UART only
when there is available memory. In this case we would block on UART
FIFO and everything handles gracefully.
This workaround mimics solution used by firmware project by allowing
to send next notification only after previous was sent correctly.

Change-Id: I56dd5abc4d13735d285415da04db75e7bb8bc459
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-07-22 19:03:43 +00:00
Maureen Helm
bfb451e5eb ksdk: Fix ARRAY_SIZE conflict
Wrap the ksdk's ARRAY_SIZE macro definition with an ifndef to avoid
conflicting with the same macro in include/misc/util.h.

Change-Id: I102170519857ba6c593c3d3ee96e3394711c625d
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2016-07-22 15:47:58 +00:00
Szymon Janc
d2549115ca Bluetooth: Rename connectable_addr member in struct bt_le_oob
Depending on advertising options this can be non-connectable address.
NFC pairing application document also allows broadcaster/observer
roles.

Change-Id: I9b104ac8fb9752a083a7a31fc20598c66f23f608
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-07-22 13:09:30 +02:00
Arkadiusz Lichwa
d5a07edde0 Bluetooth: L2CAP: Refactor channel context by ident
Moves 'ident' member so far included in bt_l2cap_le_chan context only
to common bt_l2cap_chan context. The change is driven by sharing ability
to store/restore 'ident' on both transports and makes use of it only if
CoC is configured. For default configuration there's channel addition
helper to be used internally by dedicated macros managing channel
objects enlisted in connection tracker list.
The common member is used in matching outstanding connection responses
on LE and to prepare a ground for BR/EDR transport context when
there'll be a need to match response to original incoming connection
request after in-between security changes that can happen.

Change-Id: I1a4cad7cd53c74774604a0e9794607081a8b6e80
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-07-22 09:20:20 +00:00
Luiz Augusto von Dentz
c9a3809ab5 Bluetooth: Remove nano_work include from internal header
This include is no longer necessary since all .c files that include it
already have nano_work included as well.

Change-Id: I523d6c756e2e49d53fcb00459d8ed547113d9078
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-07-22 09:18:13 +00:00