Commit graph

19237 commits

Author SHA1 Message Date
Anas Nashif
8976762df8 arc: rename generic platform to generic_arc
The generic name is too generic and when it appears on its
own, for example nano_generic_defconfig, it is not
visible what the file is about, so call it generic_arc the same
way the Kconfig platform is called.

Change-Id: Icf737f305d84142dad4f52fd26a5c7481f9fc5be
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:58 -05:00
Andrei Emeltchenko
a81c6afa4c ia32: Refactor UART configuration for ia32
This make platform configuration more readable and cover cases when
Bluetooth is enabled and Console disabled.

Change-Id: I17da603915e7e32f8e76f497d91d786ca727ca92
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:15:58 -05:00
Andrew Boie
fb036433a1 doc: fix GRUB build instructions
Change-Id: Ia67ceb8438a1675dd8dae503e84367e5ee294d2f
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:15:58 -05:00
Dirk Brandewie
e5844a41d5 sanitycheck: add arc architecture
Add ARC to the list of architectures sanitycheck will build against.

Change-Id: Ibf1aa3a167a7a53a59b40bde4442d16f7d7b9611
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:15:58 -05:00
Andrew Boie
37075773f2 sanitychecks: HACK: skip some failing tests on ARC
Enabling more sanity checks for the ARC architecture is an ongoing
process, disable failing tests for now.

Change-Id: I2fdabf98a5648120649649e3e32b849b79b48a7b
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:15:43 -05:00
Dirk Brandewie
8570e3cac2 arc: add support for generic
Add support for a "generic" ARC implementation. This is a misnomer
since ARC platforms are synthesized by the SOC vendor and are specifc
to a given vendors implementation/configuration.  This platform
support if for an SOC where we are allowed to let the code to support
the SOC into the wild but not allowed to name it in public.

This change allows to work on support for the SOC in the open and let
the rest of the community see the evolution of of the platform.

Change-Id: Idbb52fc80464ec04e91665871951f6ea79e5299d
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:15:41 -05:00
Tomasz Bursztyka
608fc5071b gpio: ia32_pci: Add options to allow GPIO IRQ trigger
Add Kconfig option to specify how interrupt is triggered for GPIO.

Change-Id: I8db988efb0c081a18e585ccc6dd121bff61d6ccc
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:41 -05:00
Dirk Brandewie
dbd25aeb3b x86: Change SHUTOFF_PIC to PIC_DISABLE
Make config variable name match the function.  The PIC is never turned
on in the zephyr code so there is nothing to shut off.

Change-Id: I1627e5a35cc37ef7959f36758c1e1aec03e22782
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:15:41 -05:00
Dirk Brandewie
728baf1336 x86: arm: Remove deprecated PLB_* macros
Change-Id: I24a9ea61ff8ffb0602e30cf929aeb47f5b9a53b7
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:15:41 -05:00
Dirk Brandewie
7b3e7544d1 x86: move drivers to sys_{in,out} functions from PLB_* macros
These x86 drivers are the last users of the PLB_* macros change to use
the sys_{in,out} functions.

Change-Id: Iebd0ad1bf5e74379498f86b24d835a0430db1311
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:15:41 -05:00
Tomasz Bursztyka
ad35e5dacf spi: Mask tx interrupt once over with any transmission
Or then the controller will spin around requesting to get its fifo
filled-in though it's unnecessary.

Change-Id: I81e7c483345236dee7691c3e780b1b06d6b2d0f8
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-05 20:15:41 -05:00
Daniel Leung
e495f95a43 x86: ia32_pci: add options to allow I2C IRQ trigger
Add Kconfig option to specify how interrupt is triggered for I2C.

Change-Id: I5f5afdf6bfc2adbfc2f66bdc1f58bd3a8fc60ecf
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:41 -05:00
Daniel Leung
80c880c8cb x86: ia32_pci: allow disabling 8259 interrupt controller
This simply copies the PIC disabling code from ia32 into ia32_pci.

Change-Id: Ib48cb96d3f0ba7356431ce1b2221f3f346e61c8d
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:41 -05:00
Gerardo A. Aceves
19ea0268ff Doc: Add gerrit recommended practices to the appropriate
toc tree.

In order to gerrit include the recommended practices
guidelines it need to appear in the toc tree.

Change-Id: Ib985fa2238bfd03e780dce2fda4242997f43eb06
Signed-off-by: Gerardo A. Aceves <gerardo.aceves@intel.com>
2016-02-05 20:15:41 -05:00
Jukka Rissanen
01c2edf3b2 net: apps: Simplify 802.15.4 test application setup
Instead of multiple make options etc. the test are now run
directly from make. User does not need to know various command
line options for setting up pipes.

Change-Id: I62a56aec75c55b970b246051dccdbf458389ab8d
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:15:41 -05:00
Jukka Rissanen
d56ed452cb net: tools: Use default pipe names for 802.15.4 monitor tool
No need to give the pipe names as the default values can be
used instead.

Change-Id: I610d07b860a32b55e6c68e7b2869218b29c8f304
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:15:41 -05:00
Szymon Janc
d33a82d5fc Bluetooth: Make bt_att_init declaration parameters explicit void
Change-Id: I75d1791b918433e3d7059ea2c499d9f40b947799
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:15:41 -05:00
Jukka Rissanen
82c9c3b978 net: apps: Fix the number of TX and RX bufs in examples prj files
Separate RX and TX buffer count was not set in example
applications prj files.

Change-Id: If48824e894bced3134391dae651f5997820de2c1
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:15:41 -05:00
Jukka Rissanen
f146abe04f net: apps: Fix dtls-client to use correct network send routine
Change-Id: I326a0924eb74fde47ab5157a3d0e57fefe8df5f2
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:15:41 -05:00
Jukka Rissanen
062c467fac net: contiki: Run DAD in periodic timer
The duplicate address detection check was not run properly
in periodic timer. After this patch the IPv6 address is
marked properly as preferred if DAD succeeds.

Change-Id: I2b4ad91b2c851dca51a52635ef2dea92fb5b58b5
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:15:40 -05:00
Jukka Rissanen
80252f5cd2 net: Enable network statistics support
This is only meant for testing the network. This must not be
enabled in live system as it takes memory and processing power
for each sent or received network packet.

Change-Id: I223a087175b19c8561743a1fcceb659be2356c4d
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:15:40 -05:00
Jukka Rissanen
a67415ebb8 net: contiki: slip: Fix compile error when getting the MAC address
Change-Id: I75823ac9b71cefcfd1258471a93aa7e3e4511fac
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:15:40 -05:00
Jukka Rissanen
7d3e5f847f net: contiki: Add utility function to get the MAC address
Add function that returns the link address that the system
is using at the moment.

Change-Id: Id09aed3f6cbc4cd3ee694e18441f7443f0b7c3bf
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:15:40 -05:00
Jukka Rissanen
53a18f6c33 net: contiki: Call etimers correctly when they expire
Make sure the etimers are triggered in main event processing
function in tcpip.c

Change-Id: Ib521b9291c768245a9f35f3502b3b173abe08ee9
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:15:40 -05:00
Jukka Rissanen
88fcbd52d0 net: Create a separate fiber that handles Contiki timers
The Contiki etimers need polling which is handled by this fiber.
This fiber sleeps until next etimer is to be triggered. If the wakeup
time is long, we wait max 60 sec so that new timers can be triggered
also. This 60 sec timeout might be too long and require tweaking when
we know how the system behaves.
If there are no etimer event in the system, then the timer fiber
will only sleep 2 seconds before checking the timers again. This
interval might need tweaking also.

Change-Id: If34b97073882d8b273941cfb0be36df6aac97cf8
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:15:40 -05:00
Jukka Rissanen
68dce30b3f net: tools: Add radvd instructions to README file
Add sample radvd.conf and instructions how to use it in README
file. This is needed if user wants to use IPv6 SLAAC (stateless
address auto configuration) when using qemu setup.

Change-Id: I3c9c34cfcc1bc88117a1c70a5d3ef6b5e56739f1
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:15:40 -05:00
Jukka Rissanen
95ee00e099 net: contiki: Use new TX net_buf when sending NS packet
Allocate a new TX net_buf when sending neighbor solicitation
message instead trying to use the existing RX net_buf. This
simplifies and unifies the RX and TX buffer management.

Change-Id: Ia1c42f7fef720ad85fe1c599c3c2ec9ea2c024b5
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:15:40 -05:00
Jukka Rissanen
25e5ccdccb net: contiki: Add checks to not send NULL or empty net_buf
When sending IPv6 packet, make sure that the net_buf is valid.

Change-Id: I0027f42f307c09b3add42f430abf759bd88d63c5
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:15:40 -05:00
Jukka Rissanen
5604782d6c net: contiki: Send RS, RA and NS ICMPv6 messages properly
Allocate a separate buffer when sending RS, RA and NS ICMPv6
messages to the network.

The ICMPv6 messages are:
RS = router solicitation
RA = router advertisement
NS = neighbor solicitation

Change-Id: Ibe5a1701f78f72dce6460f77e9f659b16c355640
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:15:40 -05:00
Jukka Rissanen
1b1cb8e8fa net: contiki: Debug print enhancements in IPv6 ND code
Debug prints were missing line feeds + spaces in neighbor
discovery code.

Change-Id: I1373af38cc7eae103d1a1da527430f2eb63e6b7a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:15:40 -05:00
Jukka Rissanen
f9a7e27220 net: contiki: Add Kconfig option to disable ND
User is able to disable IPv6 neighbor discovery.
Normally ND should be enabled but for testing purposes
the ND can be turned off as it simplifies the network
setup.

The default value atm is not to run ND because
we do not have a proper network setup. If user is
running qemu image, then ND should be disabled because
ND does not work properly with tun device.

Change-Id: I0ab7d6ee2ea3bc70918d9adf6f44473f71b3bd29
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:15:40 -05:00
Jukka Rissanen
df30c05771 net: contiki: Fix compile error when sending IPv6 NS
Neighbor solicitation message sending had a typo.

Change-Id: Ia2a8b5c0eef60acc093463eb24f33bbe8fb93421
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:15:40 -05:00
Jukka Rissanen
e37ed46b17 net: contiki: Timer handling fixes
Now we can wakeup properly if there are multiple Contiki etimers
in the system.

Change-Id: I356818f4b79427c9bf26afca31b1a0766760ca3d
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:15:40 -05:00
Jukka Rissanen
b342e41bb4 net: contiki: Fix clock_delay function
The clock_delay() function sleeps now correctly either
in micro or nano kernel.

Change-Id: I1df71b64c5f0b46d963ee117252e41be3ddfb1df
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:15:40 -05:00
Jukka Rissanen
cd83fcd536 net: Enable timeouts and timers kernel support
IP networking depends on CONFIG_NANO_TIMEOUTS and
CONFIG_NANO_TIMERS support so select them automatically
in Kconfig.

Change-Id: Ib3a86ca5a2006da545bed8c13b631d6a8c45ea99
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:15:40 -05:00
Szymon Janc
18b98614a4 Bluetooth: Make signed_value static in periperal sample
This variable is not used outside of c file.

Change-Id: I89b34fb6dd2cdd9dd111b6e33829f170d0ba00ae
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:15:40 -05:00
Arkadiusz Lichwa
cf7423a9d2 Bluetooth: Add LE Connection Update Complete Event handler
Adds handler for LE Connection Update complete event.

Change-Id: Ie33b7b01c5b7f828b41225f8ae1337205812fcdd
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-05 20:15:40 -05:00
Arkadiusz Lichwa
0f507833f8 Bluetooth: Add defines for LE Connection Update Complete event
Adds HCI layer event defines to be used by LE Connection Update
Complete event handler.

Change-Id: I5c3502054acd4f838a33c55df8d1eefe1acec6b4
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-05 20:15:40 -05:00
Arkadiusz Lichwa
992e18df97 Bluetooth: Handle LE Remote Connection Parameters Request Event
Adds Remote Connection Parameter Request Event handler and command response
handlers to support LL Connection Parameter Update procedure (BT 4.1).

< HCI Command: LE Connection Update (0x08|0x0013) plen 14                                                                                                           [hci1] 86319.053586
        Handle: 42
        Min connection interval: 38.75 msec (0x001f)
        Max connection interval: 58.75 msec (0x002f)
        Connection latency: 0x0000
        Supervision timeout: 32000 msec (0x0c80)
        Min connection length: 0.625 msec (0x0001)
        Max connection length: 0.625 msec (0x0001)
> HCI Event: Command Status (0x0f) plen 4                                                                                                                           [hci1] 86319.053597
      LE Connection Update (0x08|0x0013) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 11                                                                                                                           [hci0] 86319.053600
      LE Remote Connection Parameter Request (0x06)
        Handle: 42
        Min connection interval: 38.75 msec (0x001f)
        Max connection interval: 58.75 msec (0x002f)
        Connection latency: 0x0000
        Supervision timeout: 32000 msec (0x0c80)

	...

< HCI Command: LE Remote Connection Parameter Request Reply (0x08|0x0020) plen 14                                                                                   [hci0] 86319.055663
        Handle: 42
        Min connection interval: 38.75 msec (0x001f)
        Max connection interval: 58.75 msec (0x002f)
        Connection latency: 0x0000
        Supervision timeout: 32000 msec (0x0c80)
        Min connection length: 0.000 msec (0x0000)
        Max connection length: 0.000 msec (0x0000)
> HCI Event: Command Complete (0x0e) plen 6                                                                                                                         [hci0] 86319.055687
      LE Remote Connection Parameter Request Reply (0x08|0x0020) ncmd 1
        Status: Success (0x00)
        Handle: 42
> HCI Event: LE Meta Event (0x3e) plen 10                                                                                                                           [hci1] 86319.055694
      LE Connection Update Complete (0x03)
        Status: Success (0x00)
        Handle: 42
        Connection interval: 38.75 msec (0x001f)
        Connection latency: 0.00 msec (0x0000)
        Supervision timeout: 32000 msec (0x0c80)
> HCI Event: LE Meta Event (0x3e) plen 10                                                                                                                           [hci0] 86319.055692
      LE Connection Update Complete (0x03)
        Status: Success (0x00)
        Handle: 42
        Connection interval: 38.75 msec (0x001f)
        Connection latency: 0.00 msec (0x0000)
        Supervision timeout: 32000 msec (0x0c80)

Change-Id: Ief5d7bd404ce476e48a4d66983a03928d9db11d0
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-05 20:15:40 -05:00
Grzegorz Kolodziejczyk
f535c0674e Bluetooth: Add possiblity to set advertising mode
This patch adds possibility of setting advertise mode.
If no advertising mode is set, use default value (discoverable).

Change-Id: I86456ca52ad54a2fd4e4c6443a79087ddeb99ec6
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
2016-02-05 20:15:40 -05:00
Szymon Janc
109d6fb21b Bluetooth: Make bt_uart_open parameters explicit void
Change-Id: I87826f2ab662bb07428cb0ba1edded0ab26d2d5b
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:15:40 -05:00
Grzegorz Kolodziejczyk
03706d4644 Bluetooth: Add advertising type argument set possibility
Bluetooth shell now supports advertising type set while starting
advertise.

Change-Id: I1e672b4c9315368dcef38398834acc5541c1843b
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
2016-02-05 20:15:40 -05:00
Szymon Janc
cfa51f89f1 Bluetooth: Strip command extra spaces in shell app
This makes shell a bit more convenient to use.

Change-Id: I50490eb3cf9434723737a71fb382316876ba6291
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:15:40 -05:00
Szymon Janc
e28d358d09 Bluetooth: Add explicit help command
This commands print list of all available commands.
On unknown command only short info about 'help' command is
printed.

Change-Id: I780f4fd8da7292192260a0e0af8815fe4e385ae2
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:15:40 -05:00
Szymon Janc
ea80649a83 Bluetooth: Refactor command parameters handling in shell app
Reduce usage of static variables making code easier to follow.
Also improve robustness in case of too many parameters provided.

Change-Id: I6a3f0162a4fb301479ed36c54ceca2967bb7e389
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:15:40 -05:00
Szymon Janc
022f1897e0 Bluetooth: Don't print help in shell app for empty input line
If empty input was provided simply reprint prompt instead of printing
uage information. This makes it similar to linux shell.

Change-Id: Ie4d9e1e7cb011ddf14f490188335ddc44289ffcf
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:15:40 -05:00
Grzegorz Kolodziejczyk
106656bae9 Bluetooth: Add missing if statement brackets
Style fix - add missing brackets for single instruction if statements.

Change-Id: If37f886949fb8587d6973a19bd2df92af03f7a87
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
2016-02-05 20:15:40 -05:00
Grzegorz Kolodziejczyk
798db87306 Bluetooth: Fix foreach attr lower range for att exec write
The minimal/start valid handle value is 1.

Change-Id: Ief3be01d0bf76193350b7632aedebc559d368810
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
2016-02-05 20:15:40 -05:00
Andrei Emeltchenko
eba54d6610 Bluetooth: Refactor btshell app
Use more robust approach when registering shell callbacks. Instead of
allocating maximum number of callbacks use exact memory which is
needed.

Change-Id: I96db75375e8d24df328adc0622c7817a3328f860
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:15:39 -05:00
Grzegorz Kolodziejczyk
e989683d83 Bluetooth: Fix setting proper conn data for read by type rsp
Att data structure passed to read_type callback wasn't set properly
with connection data. This cause parsing att struct set to 0 (casted
in cb, set in att_read_type_rsp). Wrong att data caused parsing wrong
mtu size and whole conn structure.

Change-Id: Ib0aa4b8edca4965afd746e7186a08cfa34e62cf3
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
2016-02-05 20:15:39 -05:00