Commit graph

41120 commits

Author SHA1 Message Date
Arkadiusz Lichwa
dd8bf892f3 Bluetooth: BR/EDR: Handle IO Capability Response event
Enables IO Capability Response event in controller and adds remote IO Capability
and authentication fields to connection object.
Initializes them using IO exchange values delivered in SSP IO Capability
Response event data set representing remote as a part of incoming pairing
process.

Change-Id: Ia73a912f6fb633d1d1bb086ef3af9a280ac5a864
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-26 06:22:54 +00:00
Arkadiusz Lichwa
73e201cbce Bluetooth: BR/EDR: Enable SSP mode in controller
Turns on Secure Simple Pairing mode in controller. Since there's a prerequisite
the controller is 4.0+, turning the mode is unconditional.

Change-Id: Id4a10ccf8892a430b0daaa6750835516b17b7e8a
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-26 06:05:31 +00:00
L.S. Cook
13d064c58c doc: Edited synchronous_call.rst for typos, ReST syntax
API notes needed a bit of clarification, fixed typo of file name.

Change-Id: I57438165fb2fc3da796fcde19d58a46862ffbbd9
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-02-25 21:32:06 +00:00
Anas Nashif
f3f8eeed66 docs: arduino 101: remove zflash references
Change-Id: I0bb83de625328b1f3d8f27e0608a2e597f221989
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-25 21:28:58 +00:00
Anas Nashif
6cc08622e3 docs: gerrit: descrease indentation and remove TOC
Change-Id: I27c9e5075b5cd5e57fb4e4ed2d1078cefb62dcd0
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-25 21:28:58 +00:00
Anas Nashif
ee55374d3c docs: fixed errors when building docs
Change-Id: If92be02af08ac8924a95fe1b1a2450ec1efab7da
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-25 21:28:58 +00:00
Anas Nashif
c582d78cb2 docs: fix note indentation for arduino101 board
Change-Id: I1f7b448ed2fa272c4af2397ba926935ee43bb96f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-25 21:28:58 +00:00
Anas Nashif
8bd1cfa5a0 docs: fixed crypto headline and bullet indentation
Change-Id: I65449b80e95430e303bbcc32baf161f95f5db512
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-25 21:28:58 +00:00
Anas Nashif
35c73ee943 docs: fix typo and table in collaboration guidelines
- fixed typo
- table was not aligned correctly, fixed.

Change-Id: I3a3522ceb1095c634fbd6cfaa594e6463080caeb
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-25 21:28:57 +00:00
Anas Nashif
15c4f0c69e docs: gerrit: fix indentation and structure
Fixed indentation and align text. Also remove to many levels of bullets
and streamline text.

Change-Id: I734f96666277e39b5aafc99ace754d129ecdd0be
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-25 21:28:57 +00:00
Benjamin Walsh
fd1aa8575b x86: move reboot via RST_CNT from galileo to generic x86
That implementation is not galileo-specific, but rather a generic way of
rebooting an x86 target. Needs SoC support.

Change-Id: I9c3374a8ab57a624d9d9b7090260c5b11fe4e773
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-25 16:52:27 +00:00
Benjamin Walsh
fcfb4b6bda kernel: add fiber_wakeup()
Like for the other context-specific APIs, also provide a
context-agnostic wrapper.

Change-Id: Icf0a62f4c06aec42f0febc298edbd8bdeec63749
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-25 11:06:09 -05:00
Benjamin Walsh
7a613adc14 kernel: fix xxx_fiber_wakeup() if the timeout has expired
A call to xxx_fiber_wakeup() if the timeout had expired would put the
fiber on the fiber ready queue _again_, corrupting it, or could remove
the fiber from a nanokernel object wait queue, prematurely un-pending
it.

We now verify the fiber is indeed still on the timeout queue and also
not on a wait queue, meaning the fiber is indeed sleeping.

Change-Id: Iba454d79ab50db01632b0591fb7b589221b5110b
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-25 11:06:09 -05:00
Benjamin Walsh
2aee77f8cf kernel: record when a fiber is removed from a wait queue
Until now, this was not needed since the checks for being on a wait
queue were only performed if a fiber was known to be on a timeout queue
as well. However, an upcoming fix for _fiber_wakeup() needs to verify if
a fiber is on a wait queue even if it is not timing out, because said
fix needs to check if the fiber is timing out as well.

Change-Id: If1694ceb551f2029d6a145963e81d3826956fd1d
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-25 11:06:09 -05:00
Benjamin Walsh
b1903d7e48 kernel: have _nano_timeout_abort() return an error code
An upcoming fix for _fiber_wakeup() will need to know if the fiber was
dequeued from a timeout queue.

Change-Id: I09ca039098c09a997db73f4719261352f0af07c1
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-25 11:06:09 -05:00
Tomasz Bursztyka
bf77d902ac cc2520: Rework reception logic
Setting the highest possible threshold is bogus. It will certainly work
well when packet are small, but it will be very easy to overflow RX FIFO
when these are big (which happens when a big packet is fragmented).

Instead:
- setting the threshold to the bare minimum (len + header)
- reading is made into a loop based on RX FIFO counter

Taking the opportunity to:
- Reset exceptions once printed out
- Print out "Transmitted!" instead of unbearable status

Change-Id: I8d77b88756d5c3fb42d4d0d38dd0296569db07ad
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-25 14:02:50 +01:00
Tomasz Bursztyka
bfa2ebb156 cc2520: Let's use the maximum SPI clock supported
CC2520 can handle up to 8Mhz SPI SCLK frequency, thus let's use it. It
will help to avoid timing issuse while transmitting and receiving (i.e.:
getting registers or buffers from CC2520 through SPI will be fast and
won't impede RX/TX events too much).

Change-Id: I3391993e25ffbe166028923b9afb777a8451a35e
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-25 14:02:47 +01:00
Tomasz Bursztyka
988c6e9e08 cc2520: Remove useless gpio logic
cc2520 does not need to clear any gpio interruption as it does not deal
with the low level gpio hardware directly.

Change-Id: Ic568e817b23b879cdf7da791417a4a6e1f95d34a
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-25 14:02:43 +01:00
Tomasz Bursztyka
6f95960c2c cc2520: Flushing RX FIFO is done through one SFLUSHRX instruction
Removing unnecessary legacy logic.

Change-Id: I658e126d90e7f6151b77089a10b98c9071b6abd2
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-25 14:02:40 +01:00
Tomasz Bursztyka
fd3adeaabe cc2520: 7th bit of the packet length should not be interpreted
There is no such thing as being out of sync.
1 - RX FIFO is always flushed before receiving anything.
2 - So whatever comes in, if it was rejected the hardware would not set
FIFOP high (we are on high threshold, see page 83).
3 - According to 802.15.4 specs, length cannot be bigger than 127, so
7th bit of the length should never be set. However, and for some reason,
it happens to be set (noise, memory glitch?). According to datasheet
page 75, masking this bit is useful then. The hardware does it for
itself when filtering, and that does not affect the buffer content, so
it's also up to the driver to mask it as well.

Change-Id: I30b878852076c0c9d3a92b490aaf37f826ab4541
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-25 14:02:35 +01:00
Tomasz Bursztyka
ee587244f4 net: ip: Enable Kconfig based debug options for the IP stack
It will be possible to enable/disable debug messages from IP stack from
make menuconfig, instead of modifying the relevant files to do so.

Change-Id: I065f10bcc2bc3579081b2fcdb1c47e12d148e2f1
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-25 11:03:55 +00:00
Arkadiusz Lichwa
0abd5dd7d5 Bluetooth: BR/EDR: Rename local variable
Changes the local netbuff name to be more generic and to be used later in code
initializing BR/EDR stack.

Change-Id: Iae177237c813a46cbd10720a7af3474632154678
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-25 10:37:55 +00:00
Luiz Augusto von Dentz
2f8a5967a8 net: Kconfig: Auto select mandatory features for Bluetooth
This makes sure NETWORKING_WITH_6LOWPAN and 6LOWPAN_COMPRESSION_IPHC are
selected properly and update IPSP sample to only include the minimal
config options so it can test if this is working properly.

Change-Id: I2565cbd4f79d91eaba348d43933aa893c6dc6ace
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-25 10:36:33 +00:00
Andre Guedes
536d6ec396 i2c: Remove default value from platform-specific options
This patch removes the default value from some platform/SoC specific
options which are declared in drivers/i2c/Kconfig because 1) most of
the time they are not valid values and 2) the correct values are
already set in the SoC Kconfig.

It also moves the interrupt priority definition from the driver's
Kconfig to the platform's Kconfig since it is a platform-specific
configuration.

Change-Id: If3c260b9a2fa095de47a99eb7fa5b947efefe9b1
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-02-24 14:34:24 -03:00
Andre Guedes
1eaaa6434b spi: Remove default value from platform-specific options
This patch removes the default value from some platform/SoC specific
options which are declared in drivers/spi/Kconfig because 1) most of
the time they are not valid values and 2) the correct values are
already set in the SoC Kconfig.

It also moves the interrupt priority definition from the driver's
Kconfig to the platform's Kconfig since it is a platform-specific
configuration.

Change-Id: Ic992749b3210ed8a2e454edece41ceca5edbaf2e
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-02-24 14:26:23 -03:00
Andrew Boie
08ce5a5da7 sanitycheck: use Python 3
Python 2 isn't supported anymore and doesn't get fixes/updates.
For the long-term maintenance health of sanitycheck, convert to
use Python 3 interpreter, which mostly involved changes to how
strings are handled.

Change-Id: Ic42f5b2328001f04d876fd650986c4433968a76b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-24 17:10:39 +00:00
Andrew Boie
411a97c5d0 sanitycheck: correctly treat linker warnings as errors
Change-Id: I2fc82fe83d91121d2228251d9fba8a61ba33b63e
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-24 17:08:56 +00:00
L.S. Cook
bebd38c8d1 doc: Edit common_kernel_clocks.rst
Corrected typos and added headings to API section to
enhance readability.

Change-Id: I5a43edfdd6a8ac7735d8f00823058f6a2661439f
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-02-24 17:08:26 +00:00
Andre Guedes
55e93f203c gpio: Remove default value from platform-specific options
This patch removes the default value from some platform/SoC specific
options which are declared in drivers/gpio/Kconfig because 1) most of
the time they are not valid values and 2) the correct values are
already set in the SoC Kconfig.

It also moves the interrupt priority definition from the driver's
Kconfig to the platform's Kconfig since it is a platform-specific
configuration.

Change-Id: Id00f7907fa55025011dabce6e282a9623be23831
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-02-24 17:05:52 +00:00
L.S. Cook
cd26742b17 doc: Edit microkernel_tasks.rst for grammar and clarity
Corrected a few typos and misspellings. Corrected grammar to add clarity to the
section on task groups.  Added cleaner headings to APIs to enhance readability.

Change-Id: I6ff4d447775db67dc7008aa30bd2bbb4ab6c32de
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-02-24 17:02:19 +00:00
Jukka Rissanen
791e6f2708 net: contiki: Original copyright notice was missing
Original copyright notice was lost when the file was copied
from Contiki.

Change-Id: I5e008b92cb3898255a7940dc2c61320014222610
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-24 09:50:50 +02:00
Jukka Rissanen
5562a9a811 net: contiki: Fix the description of 6lowpan files
The file names and types were incorrectly described in comments
in net/ip/contiki/sicslowpan/ directory.

Change-Id: Id6aba238a08ec603a57f9a438dbf6fab202220f8
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-24 09:48:44 +02:00
Dan Kalowsky
8d0129656c doc : getting_started : correct path
The path to the sample applications is a mis-match of previous and the
current values.  Correcting it to represent the new value.

Change-Id: I54ffe823335b95f1076b1346d149b359b4f2e7bd
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-23 23:10:57 +00:00
Dan Kalowsky
cfed6d8286 doc : arduino_101 : add in udev rules
Currently we have several sections that require the use of sudo for
functionality, but that is a workaround to the need for libusb to
control the FlySwatter hardware.  This can be solved by adding in
proper udev rules.

Change-Id: I03f6464cb96a9924c902b897c36df925eb07d058
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-23 23:10:42 +00:00
Luiz Augusto von Dentz
ccb00e01b0 net: echo_client: Add support for Bluetooth
This enables using echo_client with Bluetooth by passing
CONF_FILE=prj_bt.conf, it is also enabled for testing so changes to
echo_client are actually tested with NETWORKING_WITH_BT.

Change-Id: I1ff83a9d0049e121dc7e406656e3282b16ee8c91
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-23 18:08:21 +00:00
Luiz Augusto von Dentz
fb568ac6a9 net: echo_client: Avoid using #ifdef and #ifndef
It is prefered to use #if (!)defined form for checking defines since it
can actually check more complex conditions.

Change-Id: Ib8779a344a1a7ec02f10b0e23a533c78e68343b5
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-23 18:07:53 +00:00
Peter Mitsis
e0f8162a8b test: Add nanokernel test_sleep project
The 'test_sleep' nanokernel project tests the following functionality:
   1. Normal expiration of fiber_sleep()
   2. Waking a sleeping fiber via fiber_fiber_wakeup()
   3. Waking a sleeping fiber via isr_fiber_wakeup()
   4. Waking a sleeping fiber via task_fiber_wakeup()
   5. Normal expiration of task_sleep()

Change-Id: Ie51997ace9a4413f62d77daacd6dff97b6b3a4dd
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-23 10:48:54 -05:00
Peter Mitsis
b4313cef6f nanokernel: Add routines for waking a fiber
Adds the following routines for waking a fiber that was previously
put to sleep using fiber_sleep().
    isr_fiber_wakeup()
    fiber_fiber_wakeup()
    task_fiber_wakeup()

Change-Id: I7d78ee6997163d71b92f388a7b4c484f2e97862b
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-23 10:48:54 -05:00
Peter Mitsis
cee79a7ca9 nanokernel: Change fiber_start() return type
The fiber_start() family of routines now return a nanokernel
thread id (nano_thread_id_t).  This is a pre-requisite step for
allowing fiber_sleep() operations to be cancelled.

Change-Id: I74a3885eda3252c158f4a48e90244569633469c3
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-23 10:48:54 -05:00
Peter Mitsis
06e2b4e129 nanokernel: Change fiber_delayed_start() return type
Instead of returning a 'void *', the nanokernel fiber_delayed_start()
family of routines now return a handle of type nano_thread_id_t.

Consequently, the nanokernel fiber_delayed_start_cancel() family of
routines now accept a parameter of type nano_thread_id_t instead of
'void *'.

The complete list of affected nanokernel routines is:
    fiber_delayed_start()        fiber_delayed_start_cancel()
    fiber_fiber_delayed_start()  fiber_fiber_delayed_start_cancel()
    task_fiber_delayed_start()   task_fiber_delayed_start_cancel()

Change-Id: Ibd4658df3ef07e79a81b7643a8be9ea5ffe08ba0
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-23 10:48:54 -05:00
Anas Nashif
e7ee08338b checkpatch: fix SPACE false positive
Fix issue where a space is required after a comma:

-:245: ERROR:SPACING: space required after that ',' (ctx:VxB)
+	SECTION_PROLOGUE(_NOINIT_DMA_SECTION_NAME, (NOLOAD OPTIONAL),)

Now we will ignore such errors if the comma is followed by a ).

Change-Id: Ib38161cd11e650764c319ba373a1f7c1a6d80df6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-22 19:11:41 +00:00
Anas Nashif
76b0913a33 checkpatch: update checkpatch to latest from upstream
Update to commit 6b10df4257367dd0ead49f88df473972c00a8b5c from the Linux
kernel, relevant changes since last update:

 - checkpatch: fix a number of COMPLEX_MACRO false positives
 - checkpatch: improve macros with flow control test
 - checkpatch: warn when casting constants to c90 int or longer types
 - checkpatch: improve the unnecessary initialisers tests
 - checkpatch: improve tests for fixes:, long lines and stack dumps in commit log

Change-Id: Ic4f8d925cd7c076e18eb2f2841913be61239aac2
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-22 19:11:23 +00:00
L.S. Cook
0e4538da10 doc: Deleted from installation_linux.rst network/proxy config
The info already exists elsewhere in the documentation / GSG.

Change-Id: I1176b496dfd28179ce7771af4d3ac659690c7a7e
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-02-22 18:11:43 +00:00
Mariusz Skamra
084405c2c4 Bluetooth: tester: Remove set_ccc_value helper
CCC user data is already available on the initialization
(struct bt_gatt_ccc_cfg and ccc_cfg_changed callback).

Change-Id: Id06c69b6da33f651bc049983179cd6fe3bc197d6
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-22 10:09:50 +00:00
Mariusz Skamra
e561f7c021 Bluetooth: tester: Refactor gatt_buf_add and gatt_buf_reserve functions
This removes a bit of redundant code.
gatt_buf_reserve can call gatt_buf_add with data set to NULL, to
reserve space on gatt_buf.

Change-Id: I533a515bbd022a07ba8e2bfb3cd07e1a9ff8878b
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-22 10:09:34 +00:00
Mariusz Skamra
9d862b2a61 Bluetooth: tester: Fix initialization of static variables
Static variables are already initialized to zero.

Change-Id: I8da4b6d93192f5534fbe55622c4ee890c0297de1
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-22 10:09:16 +00:00
Mariusz Skamra
cd272cadfb Bluetooth: tester: Use BT_UUID defines for UUID comparisons
Defined BT_UUID for the header can be used instead of struct member.

Change-Id: I55ca069d04622450e4fbb1e3f7abf6fdef2f8f30
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-22 10:09:05 +00:00
Jukka Rissanen
884061bbd9 net: Selecting Bluetooth IP networking selects BT support
It is more intuitive for the end user to enable IPSP by
selecting the BT network driver which then automatically
enables relevant Bluetooth options. The earlier way
required user to select L2CAP dynamic channel support
first before he could activate IPSP and this is not very
logical and user friendly.

Change-Id: Idde0da80a2a19670e217ae9a9a4717e8399559e7
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-22 09:59:50 +00:00
Michael LeMay
255fca99ae doc: Note that Ethernet is supported for Galileo
Change-Id: Id8b0b2fe1a3dce6a5dd341637af09e8f99abc362
Signed-off-by: Michael LeMay <michael.lemay@intel.com>
2016-02-22 09:50:00 +00:00
Juan Manuel Cruz
308b5aad1b doc: installation instructions for windows
Change-Id: I0e8b091c3650757d26df8e5226829f463b4f8e3a
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-02-21 12:13:12 +00:00