Commit graph

19237 commits

Author SHA1 Message Date
Jukka Rissanen
2734af4742 net: rpl: Free received net_buf in case of error
The code did not mark net_buf to be freed in a case of error
when receiving data. This caused the system run out of network
buffers very fast. It is necessary to set uip_len variable to 0 so
that the upper stack can free the buffer in this case.

Change-Id: Id5e009affcb2ce916f21fcf60060efb1c6d1ec0c
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:24 -05:00
Jukka Rissanen
5ca530c5cb net: rpl: Fix the net_buf handling
Allocate a net_buf when a network packet is about to be sent.
Earlier one statistically allocated buffer was used for sending
RPL packets but this did not work well enough and it cluttered
the RPL APIs with redundant net_buf parameter.

Change-Id: Ib4160167f8deac83c30852af2346acdf6c6f711b
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:24 -05:00
Jukka Rissanen
62b67666d8 net: contiki: etimer should call proper handler
When the timer is set, the caller needs to specify the function
that is called when timer expires.

Change-Id: Iae69986c6f32b789d708247b187d143e45d73828
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:24 -05:00
Jukka Rissanen
9b18a6d0bb net: Increse the size of timer stack to 1K
The RPL support needs bigger stack than 600 bytes.

Change-Id: If61fb2b4874d32d6e02c8e510cccd45246332da5
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:24 -05:00
Jukka Rissanen
a9c39988ed net: rpl: Print RPL statistics if enabled
Print RPL statistics in the general IP statistics printing
function if CONFIG_RPL_STATS is defined.

Change-Id: Iefc3a1e5186b052e91b17309a6e9fdeb2fa70886
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:24 -05:00
Jukka Rissanen
aa73046f24 net: rpl: Fix compilation error if debugging is enabled
Need to use pointer when printing link address.

Change-Id: Ied7fcbefc02034e0ddbe714716b883de33d1e724
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:24 -05:00
Jukka Rissanen
ae97505279 net: contiki: If we do not have 802.15.4 then use nullrdc driver
For RDC (Radio Duty Cycling) we activate nullrdc driver
if 802.15.4 is not used.

Change-Id: I793b84ee8e81cdbc8315758f1b83f7ad3bd7555a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:24 -05:00
Mariusz Skamra
fa48de9e9a Bluetooth: Add connect/disconnect commands to BTP spec
These commands are necessary to pass some of the GAP tests.

Change-Id: Ia599e7dc3dd06aa5ac4130e0d878fcddad7b37dd
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-05 20:24:24 -05:00
Mariusz Skamra
85c6194670 Bluetooth: shell: Replace xtoi with strtoul from libc
Change-Id: Ibb6356f5d2dc041b5637abfdfcf5e3dc1a00ea77
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-05 20:24:24 -05:00
Szymon Janc
68382388ce Bluetooth: Disable parts of public API if not configured
Depending on selected Kconfig options some parts of public API
are disabled with #ifdefs. This should make it easy for user to
figure out which options should be enabled to specific API.

Change-Id: I4ae1bfd7bf535ea45869772c429ccd3d3d4c214e
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:24:24 -05:00
Szymon Janc
c0650518d6 Bluetooth: Make BT buffers connection support optional
This allows to reduce BT buffers used if connection
support is disabled.

Sample beacon application size reduced from 15212 to 14956 bytes.

Change-Id: I431ea5087706a06eaea76d572839c3afebfb963e
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:24:24 -05:00
Szymon Janc
a766fd1851 Bluetooth: Refactor bt_buf_put function
Make connection related code splitable. This is in preparation for
not compiling connection related code.

Change-Id: I24e21eb553da4a3522916e5cfe17e4b51526ad4d
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:24:24 -05:00
Szymon Janc
9ecbd34f89 Bluetooth: Add support for disabling GATT client support
Binary size reduction of sample peripheral app:
45940 -> 45772

Change-Id: Ia8c463c9642a2928c2cb2ec48d9e9c4eeef20fe7
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:24:24 -05:00
Szymon Janc
9c2ad108b8 Bluetooth: Add option for disabling SMP support
This allows to not compile SMP support for devices that don't
require pairing. It is required to support SMP channel and reply
with error for any command received even if pairing is not supported.
To handle this cleanly a null smp implementation is used that case.

Change-Id: I656a52dac882839db904eee65f25a4e29ea2d8c2
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:24:24 -05:00
Szymon Janc
4c901ac75d Bluetooth: Add option for disabling data signing support
This allows to not compile data signing support if it is not
required. Reduces image size of peripheral sample app from
45772 to 44436 bytes.

Change-Id: I2cd3515973d1a70f478cbd68426ec84fd1645d19
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:24:24 -05:00
Szymon Janc
8ff443b1c9 Bluetooth: Add initial Kconfig split options
This allows to specify which roles are supported. Broadcaster and
Observer roles are always supported.

Image size reduction for samples apps:
beacon     43148 -> 15196
central    46892 -> 46356
peripheral 47532 -> 45940

Change-Id: If260c13d63651b9b54df5bafc2c412b01dcb1eb0
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:24:24 -05:00
Szymon Janc
46ad2cf69a Bluetooth: SMP: Fix pairing method in gen_table
If remote IO capabilities is KeyboardOnly and local is KeboardDisplay
passkey should be displayed on local side.

This was affecting TC_PKE_BV_01_C Security Manager qualification test.

Change-Id: I4d21925f3f0903250b190ae83eee7f4529114579
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:24:24 -05:00
Luiz Augusto von Dentz
7d16329af6 Bluetooth: Fix not setting subscription value
bt_gatt_subscribe requires setting proper value in the parameters ever
since indication support was introduced.

Change-Id: Ib78dac717874e51e21bc9f8ad10279ba9fe68097
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:24:24 -05:00
Luiz Augusto von Dentz
f4700f6ceb Bluetooth: Add gatt-discover-secondary command to btshell
This adds gatt-discover-secondary which works as follow:

btshell> gatt-discover-secondary <uuid> [start_handle] [end_handle]
bt: att_find_type (0x00110d18): uuid 0x180f start_handle 0x0001 end_handle 0xffff
Discover pending
btshell> bt: bt_att_recv (0x001134a8): Received ATT code 0x01 len 5
bt: att_error_rsp (0x001134a8): request 0x06 handle 0x0001 error 0x0a
bt: att_find_type_rsp (0x001134a8): err 0x0a
Discover destroy

In addition to this gatt-discover is now renamed to gatt-discover-privary
to avoid any confusion with other discover types.

Change-Id: Iee1fdf3e72269b134e222b4a2c6b4329858e71b0
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:24:24 -05:00
Luiz Augusto von Dentz
ab573232f2 Bluetooth: GATT: Add support to discover Secondary services
This adds support to BT_GATT_DISCOVER_SECONDARY to bt_gatt_discover using
Read by Group Type request as following:

Change-Id: I2c3907dcc18ad077c3161fda9ad94fe3b5e4fd45
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:24:24 -05:00
Luiz Augusto von Dentz
331a3d8016 Bluetooth: Add gatt-discover-include command to btshell
This adds gatt-discover-include which works as follow:

btshell> gatt-discover-include [uuid] [start_handle] [end_handle]
bt: att_read_type (0x00110d18): start_handle 0x0001 end_handle 0xffff
Discover pending
btshell> bt: bt_att_recv (0x001134a8): Received ATT code 0x01 len 5
bt: att_error_rsp (0x001134a8): request 0x08 handle 0x0001 error 0x0a
bt: att_read_type_rsp (0x001134a8): err 0x0a
Discover destroy

Change-Id: Id96ffbde7828c8266ab96022861983a9c68c976a
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:24:24 -05:00
Luiz Augusto von Dentz
3dc5d9e04f Bluetooth: GATT: Add support to discover Included services
This adds support to BT_GATT_DISCOVER_INCLUDE to bt_gatt_discover using
Read by Type request as following:

< ACL Data TX: Handle 3585 flags 0x00 dlen 11
      ATT: Read By Type Request (0x08) len 6
        Handle range: 0x0001-0xffff
        Attribute type: Include (0x2802)

Change-Id: I4452e99f08d0b61cc52fe943eb40527561f3ed60
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:24:24 -05:00
Luiz Augusto von Dentz
7a441e7424 Bluetooth: GATT: Refactor discover API
Add discover type to bt_gatt_discover_params to the API is reduced to
just bt_gatt_discover, this should simplify adding support for
discovering secondary and included services.

Change-Id: Iadeed86fed115afee1340b2c09821d7fafdda0f4
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:24:24 -05:00
Mariusz Skamra
a07ae2531b Bluetooth: shell: Use atoi from internal libc
Since atoi is available in libc this implementation can be removed.

Change-Id: I3cbb230916f382e27d59b503618b6291c8f0b691
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-05 20:24:23 -05:00
Mariusz Skamra
b1c31ced58 Bluetooth: tester: Fix supported_settings to be sent in le order
All the data shall be sent in little-endian byte order.

Change-Id: I6d4ab0760f92e202ddcb348d30f0d1f208f84f1d
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-05 20:24:23 -05:00
Szymon Janc
46137ba7f5 Bluetooth: SMP: Use tinycrypt if available
If tinycrypt is compiled in use it for encryption instead of HCI LE
Encrypt command.

Change-Id: I9cf70540f14ed449bfda52c4a0901462b9a60fe9
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:24:23 -05:00
Mariusz Skamra
34bd454fae Bluetooth: tester: Keep track current settings
Some tester commands require to response with current settings.
This patch is needed to properly track the changes in these settings.

Change-Id: Ib9c919e804decbe26ba6ab2a23f1c30d812f98ab
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-05 20:24:23 -05:00
Andrew Boie
d82e9dd9e1 x86: HACK force alignment for _k_task_list section
We are seeing on some platforms that the VMA alignment
does not match the LMA alignment for this section, resulting
in problems when copying into RAM by __csSet(); any copied
sections afterwards end up misaligned in RAM.

While the true fix for this is under investigation, force
4-byte alignment for VMA and LMA.

Change-Id: I627d9e7a3446cbc09dc310a156d8b3268e61c91d
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:24:23 -05:00
Dmitriy Korovkin
45a0e81871 Add PCI legacy bridge to Galileo configuration
Galileo uses PCI legacy bridge to set up the following
PCI interrupt pins to IRQ mapping:
INTA -> IRQ16
INTB -> IRQ17
INTC -> IRQ18
INTD -> IRQ19

Change-Id: I8113ee16c6712f3166340d5eb0f2e0f440a37636
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-02-05 20:24:23 -05:00
Dmitriy Korovkin
13b3e2a127 Add PCI legacy bridge device driver
PCI legacy bridge is a device connected to PCI bus and
allowing to program the routes from interrupt pins to IRQ
numbers.

Change-Id: I129719d71f958bbf5ad8c5c9949dcea93d94b89d
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-02-05 20:24:23 -05:00
Anas Nashif
30e10c6ee6 mdef: do not try to use MDEF file if it was not defined
In some cases an MDEF file is not needed, especially when using
private objects. Check if the MDEF file actually exists and define
before trying to use it.

Change-Id: I69c78e6d30bc0df0397e5ae354f91b774fcb737c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:23 -05:00
Anas Nashif
b7881fecfa checkpatch: remove comment about MAINTAINERS file
Zephyr does not have a MAINTAINERS files, so remove the comment
about checking the file when reporting false positives to avoid
confusion.

Change-Id: I915dba009902a68d5e621603d22b7df57d84a1b1
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:23 -05:00
Juan Manuel Cruz
69d1939037 arc: add IRQ configuration macro
Change-Id: Ib33142889afc9bef8600147b541770322f094611
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:24:23 -05:00
Javier B Perez Hernandez
9020c57934 checkpatch: added config file
Created config file for checkpatch ".checkpatch.conf"

Change-Id: Ic2d72eed38b333d4b05d2d0c8953cbe2795d2429
Signed-off-by: Javier B Perez Hernandez <javier.b.perez.hernandez@linux.intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:23 -05:00
Dan Kalowsky
464a534834 shared_irq: adding copyright to Kconfig
Change-Id: Ic6f318f9ed4eabcde74aca3c60fa27f114089300
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:24:23 -05:00
Dan Kalowsky
32036f0718 pci: adding copyright to Kconfig
Change-Id: Ie02c3c3e6db685372330627c48f240fbd7061d0d
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:24:23 -05:00
Dan Kalowsky
a6f526ed1f gpio: Adding copyright to Kconfig
Change-Id: I2abcdf3138de3ae39c6c5d428627d9b2fd6f8a01
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:24:23 -05:00
Anas Nashif
6acf354d7f doc: use zephyr for SDK, not yocto
Change-Id: I51ebdaeb3408ea270a0b3d15f86ebe1f14b8f2f2
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:23 -05:00
Anas Nashif
38c0d1884a sdk: create a new variant for zephyr based on yocto
Introduce a new variant for the Zephyr SDK, do not call it
Yocto SDK anymore.

Keeping the yocto variant for now to avoid breaking developer
setup.

Change-Id: I545693eb4be4cec910096ca2ba7e3f38803b4c8d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:23 -05:00
Anas Nashif
5d563192c7 doc: set copyright on every page
Move license to bottom of first page.

Change-Id: Ib7ee2fc0485d4f386fcf3f2d6d209f4da4ffaf77
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:23 -05:00
Anas Nashif
eb53f38f87 doc: move kbuild files into a sub-directory
Change-Id: Iaa18369a32c20cef7bab2327689ab744f28cadcc

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:23 -05:00
Anas Nashif
a14163551e trivial: fixed typo functon -> function
Change-Id: I05d1e0f0f1db54cdfcff1c6870326c62e0543d21

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:23 -05:00
Anas Nashif
43667180da doc: update compiler version
Change-Id: I8944a107910079f6a1479b7498b8969a5330f1a4

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:23 -05:00
Anas Nashif
cc3c284b4b doc: qsg: update with latest changes
Change-Id: Icce7f0249faf871b758257d86ef220b3d0ce8d52
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:23 -05:00
Anas Nashif
0fb169ee17 doc: realign kbuild documentation
Change-Id: I0599d45e662196e62c068da321f8fcd1f0512615
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:23 -05:00
Anas Nashif
f1c948d064 doxygen: remove obsolete config options
Change-Id: I415be92785e2c56914e57be4d3225159a3f0ea8c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:23 -05:00
Anas Nashif
629e69b493 doxygen: fixed typos and parameter references
Change-Id: Ica65e2cd0e49c08b1b8b086614267caef632c891
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:23 -05:00
Anas Nashif
45644140b0 doxygen: Fixed formatting and parameter references
Also fixed a few typos

Change-Id: I777d582ac6f8b188d0734570a59888e166468837
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:23 -05:00
Anas Nashif
6661fbc407 doxygen: fixed typos and parameter references
Change-Id: I8ff21156959a8960f6cea9441f25f1d17df2aa4f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:23 -05:00
Anas Nashif
218e148ade trivial: fixed typo addressible -> addressable
Change-Id: I1fde074c3747862fd34319ad7ae0bb8a9a8bb7e5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:23 -05:00