Commit graph

42559 commits

Author SHA1 Message Date
Peter Mitsis
e611fbd811 Fix typo: specifc -> specific
Change-Id: I7677253567a5fb0ee087112647a49368e037c1a9
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:41 -05:00
Peter Mitsis
83b83b5317 Fix typo: accomodate -> accommodate
Change-Id: I64d45055baf3f2b742585984f05f94f1af0ed9c9
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:41 -05:00
Allan Stephens
0a66ab3f2c doc: Add example of giving a microkernel sempahore from an ISR
Change-Id: I13ad61239659a17768831290535f02787776282c
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:41 -05:00
Peter Mitsis
f297068949 Fix line length warning flagged by checkpatch
Change-Id: Ia3eab1b2cf359985e1f9db1514c5dbf7e74f6012
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:41 -05:00
Allan Stephens
5d4a3178a0 doc: Enhancements for microkernel FIFO objects
Enhances description of FIFO definition. Adds examples of FIFO use.
Enhances descriptions in FIFO API table.

Change-Id: I29eed159651eed8d078ddc23818812246e58514e
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:41 -05:00
Peter Mitsis
d8a5c03404 Kconfig: Update timer driver dependencies
Updates the timer driver dependencies to simplify the selection of a timer
driver.  The timer driver menu only lists those drivers that are compatible
with the previously selected interrupt controller.

Change-Id: I5deea315f7c373c6660bacc411c6374e7b0ae84d
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:41 -05:00
Peter Mitsis
dff49566e0 Kconfig: Update CONFIG_IOAPIC dependencies
Selection of the IOAPIC requires that the LOAPIC be previously selected.

Change-Id: I13d95d4bb4ff02c1aebb0b5e573cb2b89dbe530b
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:41 -05:00
Peter Mitsis
61f0ce44c7 Kconfig: Remove option LOAPIC_TIMER_FREQ
The LOAPIC_TIMER_FREQ Kconfig option is not used.

Change-Id: I919fd2128f667e0b91467cb542041449738dd992
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:41 -05:00
Peter Mitsis
dc0fb7ed38 Cosmetic: Fix whitespace in timer driver Kconfig
Change-Id: I2d44567756faee030a26004973ad8c306a47bbcd
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:41 -05:00
Peter Mitsis
53b721a706 Cosmetic: Fix whitespace in interrupt controller Kconfig
Change-Id: I2eb4184189925bcfe433617286a364dc1e35100c
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:41 -05:00
Anas Nashif
03bec088ef Zypher 0.3.0-rc1
Change-Id: I0e31a1cf8a06e04bb0fc02fd5e76c8d79b5301f3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:41 -05:00
Anas Nashif
6b9577d2f5 fix white space issues
Change-Id: I8def24a7928121def14d6ff3f8e1f05c6fb1bad6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:41 -05:00
Anas Nashif
abeaeacab0 Kconfig: TICKLESS_IDLE_UNSUPPORTED is not used
Change-Id: Id6767a0d6b04eea6b76065d4792245b57fb0a657
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:41 -05:00
Anas Nashif
274cc72aee replace negative CMOV_UNSUPPORTED with CMOV
Change-Id: Id2aba9402495d99176eb499b1c74f86349e1164b
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:41 -05:00
Anas Nashif
09821973ca Add missing includes for ARC
include nanokernel.h and misc/util.h

Those are needed after the restructuring and changes done
to public APIs.

Change-Id: Icbb1d182419e793afe7a74b14af1f31180967f39
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:41 -05:00
Anas Nashif
f45e4aa9a1 Support ARC architecture with kbuild
Change-Id: Ic0b884e3760d5957986208ea7b19653c06eda072
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:41 -05:00
Allan Stephens
5118d2fa6a doc: Enhancements for microkernel event objects
Enhances description for event definition. Adds examples of event
use. Enhances descriptions in event API table.

Note: Enhancement of the initial part of this document is left
for future commits.

Change-Id: Ic754daacecbcb2b0ddc6b3a59d0a3b88d622662f
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:41 -05:00
Allan Stephens
359fc6cdfa doc: Enhancements for microkernel semaphore objects
Enhances description for semaphore definition. Adds examples of
semaphore use. Fills in gaps in the semaphore API table.

Note: Enhancement of the initial part of this document is left
for future commits.

Change-Id: I45a1326e564f20db2beed0c761584804ad61b053
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:41 -05:00
Rodrigo Caballero
fbf9fb3963 Doxygen: Moves the nanokernel LIFO comments from the .c to the .h file.
Moves the nanokernel LIFO in-code comments to the .h file. The comments
were changed to the Javadoc Doxygen format. A comment per alias was
created based on the original comment.

Change-Id: Iacd6bf1136ceac439d05669ef51cf28b858b306b
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
2016-02-05 20:14:41 -05:00
Ravi kumar Veeramally
b5f988ea37 net: Fix packetbuf related calls
Packetbuf is not global now. Pass net_mbuf parameter to
packebuf apis.

Change-Id: Ie272e78c3294e26ad14ba0d350668ad5ac99f797
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-02-05 20:14:41 -05:00
Johan Hedberg
097046e85b Bluetooth: SMP: Minor coding style fix
Change-Id: Iaef6feb60a84dbbb636366f01d03de61a3542739
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:41 -05:00
Andrei Emeltchenko
13ef99257f Bluetooth: Eliminate tmp buffer using swap_in_place
Using swap_in_place algorithm allows to eliminate more buffers.

Change-Id: Ifefd291e45b84213114d665adff9839fb131a185
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:14:41 -05:00
Andrei Emeltchenko
ef703e1317 Bluetooth: Add local and remote CSRK keys
Add local and remote Connection Signature Resolving Keys and helper
functions.

Change-Id: I63af2e566dccc6ffb5397d28bde6f04bc78b93b1
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:14:41 -05:00
Andrei Emeltchenko
a7de88f972 Bluetooth: Propagate SMP & L2CAP init failures
Checking error returned by L2CAP & SMP allows to fail Bluetooth
initialization in case something goes wrong.

Change-Id: Ie1c796eb64bcdee0f9dc99638c79fd4d7c05e456
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:14:41 -05:00
Andrei Emeltchenko
82fddc9cbc Bluetooth: Add AES-CMAC calculation based on AES 128 bit cipher
In a case there no crypto library, AES-CMAC Message Authentication Code
might be calculated with the help of Host Controller LE Encrypt command.

Change-Id: If7073bf4baa3f86c04728712f6789cc269673da7
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:14:41 -05:00
Luiz Augusto von Dentz
9c47d065a7 Bluetooth: GATT: Add missing return documentation to bt_gatt_read
All public APIs shall contain the complete documentation including
@return in case the function return something.

Change-Id: I1f16eaf988ace1a3ac760c59eacd71a6a5912df9
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:41 -05:00
Luiz Augusto von Dentz
4c2a459305 Bluetooth: Add gatt-write command to btshell
This adds gatt-read which works as follow:

gatt-write <bdaddr> <bdaddr_type> <handle> <data>
bt: bt_gatt_write (0x0010e0f0): handle 0x0011 length 1
Write pending
btshell> bt: bt_att_recv (0x001102ec): Received ATT code 0x13 len 1
bt: att_handle_write_rsp (0x001102ec):
bt: att_write_rsp (0x001102ec): err 0x00
Write complete: err 0

Change-Id: Ibe9f510184ad98635b18cc7d92dc3573afd9cb03
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:41 -05:00
Luiz Augusto von Dentz
dc55a3741e Bluetooth: GATT: Add bt_gatt_write
This adds bt_gatt_write which can used to write attribute value.

Change-Id: I45a02e6dbf642ed1bcab8234180f2c48a28e2874
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:41 -05:00
Luiz Augusto von Dentz
0b28dbfc19 Bluetooth: ATT: Handle Write response
This adds function handler for Write Response PDU which call the request
callback:

< ACL Data TX: Handle 3585 flags 0x00 dlen 8
      ATT: Write Request (0x12) len 3
        Handle: 0x0011
          Data: 01
> ACL Data RX: Handle 3585 flags 0x02 dlen 5
      ATT: Write Response (0x13) len 0

Change-Id: Iea323bc37044822de034f92c8f9ef1d43276ec86
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:41 -05:00
Arkadiusz Lichwa
08230f691c Bluetooth: GATT: Update btshell app
Adds to btshell app a command to enable mimic GATT client to
perform multiple read attributes request using set of input handles.
The syntax is: gatt-read-multiple <address> <addres-type> <h1> <h2> ...
Handles should be entered as hex values and are 2-octets wide each.

Change-Id: Ic37a4486a11c645685cbfc782d36457af0fe9453
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-05 20:14:40 -05:00
Arkadiusz Lichwa
e4208e065d Bluetooth: Increase max ARGC in btshell
Allows shell commands read more number of input parameters.
It is updated to 10 input parameters.

Change-Id: Ia943e8c6f0caaaf74cebcdb9dbe3542d90b2e4b9
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-05 20:14:40 -05:00
Arkadiusz Lichwa
70c7e8825c Bluetooth: GATT: Add bt_gatt_read_multiple
Introduction of GATT client API to enable read attributes
determined by set of handles.

< ACL Data TX: Handle 64 flags 0x00 dlen 21
      ATT: Read Multiple Request (0x0e) len 16
        Handle: 0x0001
        Handle: 0x0002
        Handle: 0x0003
        Handle: 0x0004
        Handle: 0x0005
        Handle: 0x0006
        Handle: 0x000a
        Handle: 0x000b
> ACL Data RX: Handle 64 flags 0x02 dlen 27
      ATT: Read Multiple Response (0x0f) len 22
        00 18 02 03 00 00 2a 54 65 73 74 20 70 65 72 69  ......
        70 68 65 72 61 6c

Change-Id: Ic8e6edcf79a63bc52cb4c657e5b09529fa87879e
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-05 20:14:40 -05:00
Johan Hedberg
fe41cec885 Bluetooth: Move bt_security to conn.h and rename it appropriately
Change-Id: Ibea6e4ef08c68e9debf0c53036dd2e4f75ea9a72
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:40 -05:00
Johan Hedberg
e060c621d1 Bluetooth: Move le_conn_update() to conn.c
Change-Id: Iaaf1cce09aef2e09c0cb2cca3500368a5faec2ae
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:40 -05:00
Johan Hedberg
5f33744a4c Bluetooth: Move le_start_encryption to conn.c
Change-Id: Id9c042663e6f58aba6ec34165b7b244650317969
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:40 -05:00
Johan Hedberg
a33047f7a5 Bluetooth: Move bt_connect_le to conn.c and rename it appropriately
This function operates on bt_conn so it should be in conn.c and
exported through conn.h. Rename it with the appropriate bt_conn_*
prefix.

Change-Id: Id17c67f0e95cc1afb10aa7742b2d2ce0110ea616
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:40 -05:00
Johan Hedberg
e0e6416065 Bluetooth: Export bt_dev through hci_core.h
Rename the hci_core.c (previously internal) variable 'dev' to 'bt_dev'
and export it through hci_core.h. This way e.g. bt_conn doesn't need
to store an internal reference to it.

Change-Id: Ic1368c8f20d307c6a13a412f80d8183b56d7a76b
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:40 -05:00
Johan Hedberg
7ed81c7a22 Bluetooth: Enhance bt_le_scan_update() for active scanning
Let bt_le_scan_update() perform all necessary changes to active
scanning so that it's even more helpful to the start/stop scanning
APIs as well as the bt_connect_le() API.

Change-Id: I8ee2daf96297749f782d364dfb66c7d0bbc48f5e
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:40 -05:00
Johan Hedberg
824135122f Bluetooth: Move bt_disconnect to conn.[ch] and rename it appropriately
The bt_disconnect deals with the bt_conn object and should therefore
reside in conn.c and be exported through conn.h. It should also have
the appropriate bt_conn_* prefix.

Change-Id: I75eb648fd9aa8ced9a991d472c319d25f4b772af
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:40 -05:00
Luiz Augusto von Dentz
79eb002a06 Bluetooth: GATT: Fix not dropping buffer reference
In case bt_att_send fails the buffer reference need to be dropped
otherwise it will never return to the buffer poll.

Change-Id: I644a0af52d9f64fcb43a982cf121a0c51b676b90
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:40 -05:00
Luiz Augusto von Dentz
7ea33a436b Bluetooth: Add gatt-read command to btshell
This adds gatt-read which works as follow:

gatt-read <bdaddr> <bdaddr_type> <handle> [offset]
bt: bt_gatt_read (0x0010dca0): handle 0x0010
Read pending
btshell> bt: bt_att_recv (0x0010fe9c): Received ATT code 0x0b len 6
bt: att_handle_read_rsp (0x0010fe9c):
bt: att_read_rsp (0x0010fe9c): err 0x00
Read complete: err 0 length 5

Change-Id: I38686f0e592b38bf22a7bf76fab93676b375104d
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:40 -05:00
Luiz Augusto von Dentz
d982120a7e Bluetooth: GATT: Add bt_gatt_read
This adds bt_gatt_read which can used to read attribute values.
Note: Attributes which values are bigger than the MTU need to be read
multiple time until the end since the stack cannot cache any data.

Change-Id: I09c502eeb674a577673182c35a0e1a84519fd3b7
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:40 -05:00
Luiz Augusto von Dentz
569d5e6fe3 Bluetooth: ATT: Handle Read Blob response
This adds function handler for Read Blob Response PDU which call the
request callback:

< ACL Data TX: Handle 3585 flags 0x00 dlen 9
      ATT: Read Blob Request (0x0c) len 4
        Handle: 0x0010
        Offset: 0x0001
> ACL Data RX: Handle 3585 flags 0x02 dlen 9
      ATT: Read Blob Response (0x0d) len 4
        11 00 39 2a

Change-Id: I7e098649d35e46bfe24259bf6a2a3d5b35873977
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:40 -05:00
Luiz Augusto von Dentz
a02df0f64a Bluetooth: ATT: Handle Read response
This adds function handler for Read Response PDU which call the request
callback:

< ACL Data TX: Handle 3585 flags 0x00 dlen 7
      ATT: Read Request (0x0a) len 2
        Handle: 0x0010
> ACL Data RX: Handle 3585 flags 0x02 dlen 10
      ATT: Read Response (0x0b) len 5
        Value: 081100392a

Change-Id: I68de7c7bcd62e5697669b9ddb9403e8ccd1b470c
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:40 -05:00
Johan Hedberg
776196d879 Bluetooth: Add "stop scan" functionality to bt_le_scan_update()
This makes it possible to take advantage of the function also from
bt_disconnect() in the CONNECT_SCAN state.

Change-Id: I8c740f2b49b7690b6020ffd5bff6f04f8f850a5d
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:40 -05:00
Johan Hedberg
b8d8673dd2 Bluetooth: Rename trigger_scan() to bt_le_scan_update()
Prepare the function for more generic usage where it can also disable
scanning if necessary. Once all bt_conn related function are moved to
conn.c this needs to be exported, so use the proper bt_ prefix.

Change-Id: I07c1bc7981b25a516682a8d7e6566af36d3c1fd8
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:40 -05:00
Johan Hedberg
d0c31141cd Bluetooth: Clear AUTO_CONNECT for any state in bt_disconnect()
There's no state where we'd want the AUTO_CONNECT flag to stay enabled
when requesting explicit disconnection.

Change-Id: I76dc112071d30199bb5201e5d5633125e1035ad5
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:40 -05:00
Mariusz Skamra
b210d53172 Bluetooth: Add initial auto connect support
Calling bt_conn_set_auto_conn one can decide if auto connect shall
be used. If so, everytime the connection is lost, passive scanning
will be enabled to listen for connectable advertisements from
remote device and re-establish the connection.

Auto connect can be disabled if one decide to disconnect from
this device using bt_disconnect or call bt_conn_set_auto_conn
with auto_conn flag set to false.

Change-Id: Ic9952e313cb8612ea6c72838be0755805daeffcf
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-05 20:14:40 -05:00
Mariusz Skamra
eb67b0f110 Bluetooth: Move hci_disconn_complete function
To avoid a forward declaration in a subsequent patch.

Change-Id: Ib3fc482af8f1fadda8e27af99811f73e64cd175a
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-05 20:14:40 -05:00
Arkadiusz Lichwa
c8b27ab8a5 Bluetooth: ATT: Update multiple read req object
Modifies ATT transport bt_att_read_mult_req type used in read multiple
request.
Internally now it's been declared as array of handles.
For ensuring validness of minimum PDU length being 4 octets wide for
multiple read request, new define is introduced and used instead of
type sizeof evaluation.

Change-Id: I8b0096497d456c0e6fa6b5b1eb88bb1b8079ae04
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-05 20:14:40 -05:00