If the attribute value is going to be changed by the upper tester,
(eg. to issue notification) for simplicity it can be stored in the
place of old one.
Change-Id: I03a6ebbda5d75e6ffa9c2fd6b3c0eab495623a11
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
There's no point in having a return value for uart_out() if it always
returns the same length that was passed to it. Just make it return
void and remove the error handling code from the caller (which would
never have been run).
Change-Id: I88dab7499a5f526ca65058640021f84e1b3486ca
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The reason why fifo_fill works in qemu but not on real hardware is
that qemu serializes all byte transmission 1 by 1. There is no
real hardware fifo emulated, and "fifo" depth is 1. On real
hardware, the controller owns an internal fifo, with a depth like
8 bytes on Quark x1000. And because of execution flow, how fast is
the controller etc etc... a fifo_fill call might fill in the
internal fifo of 8 bytes and then controller says "I am full"
(which means: "wait for the fifo to have space again"). That's
why poll_out() works: it does the same as fifo_fill and wait
that the internal fifo gets some space again before continuing.
And only when all bytes have been pushed in, it returns.
Change-Id: I452a6ebb2913c5e52ed01d999185e250aa3ed474
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This patch fixes a potential issue in which the signed return value
from the network driver send routine is returned from a caller that
has an unsigned return type. The meaning of a negative return value
from the network driver send routine is that an error occurred. A
return value of 1 means that the packet was sent successfully. A
return value of 0 means that the packet could not be sent. Thus, this
patch converts negative return values from the network driver send
routine to a return value of 0 from the caller.
Change-Id: If5cbecb18e514fd976200ecc45782d2a9e1f300f
Signed-off-by: Michael LeMay <michael.lemay@intel.com>
This make use of bt_uuid_to_str to when printing UUID values, to make it
simpler when it is just going to print so the patch introduces a new
function that does the conversion in place using a static variable.
Change-Id: Idfedf05a5ad201653fff2e01387f046cd5647c83
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This allow sending direct notification to a specific peer without
using CCC which is allowed by the spec:
BLUETOOTH SPECIFICATION Version 4.2 [Vol 3, Part F page 507
3.4.7.1 Handle Value Notification
A server can send a notification of an attribute’s value at any time.
Change-Id: Ieff29216cb9ba197c0da92d7b22b26e63101cfa8
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This patch cleans up the code a bit. BT_ATT_MAX_LE_MTU defines
MTU that can be used over LE ATT.
Change-Id: Ie433f33f3bcba3275f51e1bea826bb0fd061c45f
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
If attribute requires authentication to be read or written,
we check if current security level (should be BT_SECURITY_HIGH
or higher) allows to perform such operations on this attribute.
Change-Id: Ibba542ac96af00722370eba77d6c929cda520fd8
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
Always set MITM in AuthReq if local IO capabilities allow it.
This match Security Request behaviour with Pairing Request.
Change-Id: I1734df6661bada296b088cc762a871c443b9e5d1
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
Set discoverable command is used to set the discoverable flags
in advertisement data.
Change-Id: If46a5e05379c5f589afb1658a7b275a82c52e4e1
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
For limited discoverable mode, we need to have a define
for this advertisement flag.
Change-Id: I774b68546983697844eca2644b0ca0a85b8026e8
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
This adds an option to enable L2CAP dynamic channel support, fixed
channels are not affected by it.
Change-Id: If36bece46b7b94142ea1ac976b878d1b5ae6a578
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
l2cap-register can be used to register a server:
btshell> l2cap-register 0x0080
bt: bt_l2cap_server_register (0x0011110c): PSM 0x0080
Change-Id: I2c2d9a4cba70b0cddaf352830659d206b609ee63
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This refactorer fixed channel data so that the channel itself carries
any extra context necessary.
Change-Id: Iea0f29fb7913a29dccdcbef72d92ec4cf4711bf3
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
From Core Spec Vol 3 Part H 2.3.5.1:
"If both devices have not set the MITM option in the Authentication
Requirements Flags, then the IO capabilities shall be ignored and the Just
Works association model shall be used."
Change-Id: I450f8ab5661382b787fe9742937d47df62fb6cfa
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This split L2CAP API so that server API is available to applications
while the rest of the API is keep internal to the stack.
Change-Id: I031926ff906ce100684fba0947b2e9eb2c8fcaeb
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The ret variable in net_tx_fiber was declared as unsigned but assigned
larger signed values and treated as signed. This patch fixes that
issue.
Change-Id: I2e33f6115a3defe45f86b5f6c7dc13175ec26827
Signed-off-by: Michael LeMay <michael.lemay@intel.com>
Sanitycheck fails due to compile time warning.
Change-Id: I0b9e95d33e8298a15e09ea2532e335bdc0979d09
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Run sanitycheck with --release option to generate the numbers for
this release.
This will reset the footprint numbers so that warnings are based on
the latest release numbers.
Change-Id: Ibad9ed4120cd47109eec7a234e70af5b12a2a630
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Only allow valid values to be set for this option.
Change-Id: I11dd7381ddbf6d4d9985255b9b784544074aba63
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Catch cases where index is set to negative or wrong values.
Change-Id: Ieab73e0fb12cecfc6c3c3d74c7d41f640bc88f01
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
To cover all files that do not have a license header.
Change-Id: Ie486ddccd81d84becec8c9e0ffc15ef1f1c74471
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Includes device.h to prevent potential compiler warnings due to use of
'struct device *' in _ioapic_init() declaration.
Change-Id: Iabd97c09385044a3742658f66a79be969b62852a
Work-by: Johan Kruger <johan.kruger@windriver.com>
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Adding the 'static' keyword to the inline routine spi_save_select() fixes
the build error when CONFIG_COMPILER_OPT="-O0 -g"
Change-Id: I5234d3d6690ccda3dbd419e13f06c2651d125167
Work-by: Mike Hirst <michael.hirst@windriver.com>
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Change-Id: I099773701448b09bc3fa0607552fadec39e24407
Work-by: Jeff Blais <jeffrey.blais@windriver.com>
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Signed-off-by: Jeff Blais <jblais@windriver.com>
If PWM had been configured by some other application after the last
power cycle, it would appear to work fine. However, an application using
PWM loaded right after a power cycle would not work, since the configure
call was missing during boot.
Change-Id: I389ca2122e1a4a7ea6d298efb327438761336d75
Work-by: Mike Hirst <michael.hirst@windriver.com>
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Add tags.sh from the Linux tree. This file is used by the tags, TAGS,
cscope and gtags targets in the toplevel makefile.
Change-Id: I9b0845dab26dc9b15731888b3d713dd3950eb1d8
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
This reflects the changes made in commit df6be15aa5...
Change-Id: Ibe1bc167390268c0e335a0b4060a600ef55d1add
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Added flag to ignore NETWORKING_BLOCK_COMMENT_STYLE warnings
Change-Id: I022319366a9d956159d05bd5875215594a6f1aa6
Signed-off-by: Javier B Perez Hernandez <javier.b.perez.hernandez@linux.intel.com>
Allows users to better understand the capabilities of printk(),
particularly what it *doesn't* support.
Change-Id: I946ef10fca78464f887c28848d143479f7b7211f
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Force the zephyr-env.sh script to invoke the builtin 'cd' command so
that the script correctly assigns ZEPHYR_BASE, even for users who
alias the 'cd' command.
Aliasing 'cd' to emit a string before changing the directory is one
way of putting the current working directory in the title of a
terminal window. If the user's alias is executed in zephyr-env.sh, the
output of 'cd' pollutes ZEPHYR_BASE, resulting in value which won't
build.
Signed-off-by: Matt Braun <matthew.braun@intel.com>
Change-Id: I8d7810d1a44ec14102d07bf35610b47d06ac1015
Streamlines the prompts and help text for the floating point
configuration options to make them easier to understand. Also
fixes a help text error that said fibers using the floating point
registers needed to provide additional stack space, which is
incorrect.
Change-Id: Ib6fc13460999ec7f737118728a363b4e10d23fcf
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
The galileo board no longer needs an extern of the initalize
routine once we've moved the process to the actual file.
Change-Id: I21a0748729b2435a368e28b3a2744b2089ed1e13
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
galileo.c currently calls itself system.c in a comment. It lies.
ia32.c currently calls itself system.c in a comment. Don't believe it.
ia32_pci.c currently calls itself system.c in a comment. It lies.
Change-Id: Icdba074ff2e2e478529bc5757c90b5adbc9dcb8a
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
lists.h and lists_c.h are not being used anywhere.
Change-Id: I1434c2b5bf4ddda9166069515a7390a179f418a5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Adding in dependency of GROVE_DEBUG to the GROVE configuration
option being set
Change-Id: I4108e619254ca3cde2b96de595e1b8300fe6a752
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>