Commit graph

42249 commits

Author SHA1 Message Date
Johan Hedberg
045bac2d4c Bluetooth: Fix zero-byte coding style for memset()
Change-Id: If2e657b855c142c04f206d3bc9e3c0bdf4057243
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:24:59 -05:00
Johan Hedberg
5e607f93b9 Bluetooth: Use continuous scanning when initiating LE connections
Since we always do passive scanning and wait for a connectable
advertising event it makes sense to request continous scanning when we
issue the HCI_LE_Create_Connection. This way we minimize the risk of
loosing any advertising packets.

Change-Id: Ie314e15243aede00d1fb3be9532efb74518b293d
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:24:59 -05:00
Jukka Rissanen
3949ef16ea net: contiki: IPv6 packet handling had debugging activated
By default all debugging should be off and only activated if
user really wants so.

Change-Id: I280748b7852052892c309d5f0ada611cb2bc08b0
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:59 -05:00
Jukka Rissanen
d0ac5c7cf0 net: buf: Enable IP and L2 buf debugging properly
The IP and L2 buffer debugging is now activated if one enables
CONFIG_NETWORKING_WITH_LOGGING option.

Change-Id: Idad4978cfd6bd705bdde6e21f1edcd3c7d280c75
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:59 -05:00
Grzegorz Kolodziejczyk
ce4a34181f Bluetooth: Add SM related struct defs to bttester
This patch adds structure definitions for SM related commands and
events. Structs are mapped with btp specification and will be used
within commands and events implementation.

Change-Id: I82231cdab62d170b86c548acc14ffdcbd888473a
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
2016-02-05 20:24:59 -05:00
Szymon Janc
3aad102874 Bluetooth: SMP: Fix missing new line
Change-Id: I732ec7884997d6f21ef18387927c62d9b54edee6
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:24:59 -05:00
Szymon Janc
2046a2d606 Bluetooth: Simplify preprocessor checks for BR/EDR samphores
There is no need for #if #else as BR/EDR enabled path is only special
case for LE connection. Also if there is return in if block else is not
needed.

Change-Id: Ie1a57a0e4dae6c4b79f64c14971b7e8ef009fca3
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:24:59 -05:00
Szymon Janc
b63a04fb51 Bluetooth: Remove extra semicolons
Change-Id: Ifa2934bf07cb39ab73c47a55ae469d89bc84a8f4
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:24:59 -05:00
Szymon Janc
51f8ca59cd Bluetooth: Add newline to log macros
Make newline part of log macros so that caller doesn't have to
append '\n' every time logs are used. This make sure that no
log will be missing new line which results in concatenated log
messages.

Change-Id: I3231ae747c790816dbc1608e0a3bd56467ba0a1b
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:24:59 -05:00
Arkadiusz Lichwa
b71cde8cb3 Bluetooth: ATT: err_to_att() minor fix
Adds missing CR to BT_DBG() output.

Change-Id: Ice903d973fc77289c8ec65567c99b9f5449263d0
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-05 20:24:59 -05:00
Szymon Janc
b0349f4d3c Bluetooth: SMP: Fix IO capa selection for LE SC
Selection of local IO capabilities based on registered auth
callbacks is different in legacy and LE SC pairing. With LE SC
we are able to use DisplayYesNo capabilities.

Change-Id: I5bb69cb962fa4ca6a89eb707fda76d46b2c99b1c
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:24:59 -05:00
Arkadiusz Lichwa
7422e70c37 Bluetooth: BR/EDR: Introduce bt_conn_add_br() routine
Adds routine to allow early initialization of connection object.

Change-Id: Icfa4a00732e631571a42dfd50f87b0779ea7f9a9
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-05 20:24:59 -05:00
Arkadiusz Lichwa
f30f0702dc Bluetooth: Refactor bt_conn_add_le() routine
Adds helper routine to get connection object from available pool.

Change-Id: Ic6a7480bfbc35d297caceee3fd7eb53d6916b031
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-05 20:24:59 -05:00
Arkadiusz Lichwa
96fc48edb3 Bluetooth: Refactor bt_conn_add() routine
Renames bt_conn_add() to bt_conn_add_le() to emphasize LE context.
Initializes link type to LE in early stage of setting LE connection.

Change-Id: Ica88764e1f3aba563ec7edc3b630e5e76ead249f
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-05 20:24:59 -05:00
Szymon Janc
607f7c12cd Bluetooth: Disable SMP debugs in shell app
Those are debug feature and were enabled by mistake.

Change-Id: Id49078fd4b910578af35dbe8660d148a691a4f13
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:24:58 -05:00
Szymon Janc
fc01e6622b Bluetooth: SMP: Add clarifying comment about rand and ediv
Both legacy STK and LE SC LTK have rand and ediv equal to zero.
Comment that in code to avoid confusion if correct key is being
requested.

Change-Id: I00cbf7264659470226b5ceb28f9cce4ca6b0e2e4
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:24:58 -05:00
Daniel Leung
6354e36be7 aio: dw: fix compilation errors
() Fix compilation errors due to variable ordering.
() Fix the default config for Quark/SE SS as
   the kconfig options were renamed in previous
   patches.

Change-Id: I1004ae332fb857b60ed90df59831e7bd9c490cb8
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:24:58 -05:00
Benjamin Walsh
0dbca43e6a benchmarks: disable CONFIG_ERRNO for minimal configurations
Change-Id: I41bc04abc517f90bf37781060407f8486267861a
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:24:58 -05:00
Benjamin Walsh
355a00e6f0 test: add nanokernel errno test
Tests errno is retrieved per-thread with fibers and one task.

Change-Id: I0b0890f250a80a30806dc1294944aa42f4209ace
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:24:58 -05:00
Benjamin Walsh
fc1c0c3345 libc/minimal: use per-thread errno implementation
Provides proper access to the per-thread errno variable, by using the
_get_errno() call.

Users can now do:

  errno = EINVAL;
  printk("errno: %d\n", errno);

Change-Id: I0ef365199656d002623b39b7f45f14f561501375
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:24:58 -05:00
Benjamin Walsh
3181df6db4 kernel: add per-thread errno support
Saves an errno per-thread, retrieved via _get_errno(), instead of
changing the value of a global variable during context switches to avoid
a hit to the context switch performance.

Per-arch asm implementations are provided for maximum performance.

Enabled by default, but can be disabled via the CONFIG_ERRNO option.

Change-Id: I81d57a2e318c94c68eee913ae0d4ca3a3609c7a4
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:24:58 -05:00
Johan Hedberg
6eeec2137f drivers/console: Reduce scope of 'pos' variable
The 'pos' variable is only used within a very limited scope inside the
uart_console_isr() function. Move it's declaration there to avoid
having it exposed to the entire c-file.

Change-Id: I45ff0090ea4e0aabe77db2549d0194e26ebb63ef
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:24:58 -05:00
Johan Hedberg
5ad78034c9 drivers/console: Remove unnecessary indentation in uart_console_isr
Most of the uart_console_isr() function is heavily indented. We can
remove one level by converting:

	if (uart_irq_rx_ready(uart_console_dev)) {
		...
		...
	}

to:

	if (!uart_irq_rx_ready(uart_console_dev)) {
		continue;
	}

Change-Id: Ib2fe150490a8391de4001f29e4727431668853c4
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:24:58 -05:00
Johan Hedberg
7ad2d474d8 drivers/console: shell: Decrease maximum line length from 1024 to 256
It's very rare to have lines exceeding 100 characters (default console
width being 80) so 1024 is quite overkill. Even 256 is probably more
than anyone will need any time soon, but if that becomes an issue this
define can be converted to a Kconfig option in the future.

Change-Id: If5fd324b17a0e8ef7b39ea7cc6624739d0241cac
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:24:58 -05:00
Johan Hedberg
2893def459 drivers/console: shell: Add custom prompt callback support
Shell applications may want to have a dynamic prompt rather than a
fixed string. Add a new API to let the application specify a custom
callback instead of using the fixed string given to shell_init().

Change-Id: I9844481057fc8e164530a677e7cb1bfb6d02cfc0
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:24:58 -05:00
Daniel Leung
3c9592ec59 quark_se: need some extra love for interrupt driver UARTs
() The SCSS has some additional registers to mask interrupts
   from peripherals. This patch unmasks the interrupts for
   the two UARTs on board, so that interrupts can be delivered.
() The UART interrupts are edge-triggerd, so set the config
   options accordingly.

Change-Id: I39a1edccd830a8a19288982efa2e9d0faaaff8ba
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:24:58 -05:00
Tomasz Bursztyka
04f5cfb889 wdt: dw: Add support for optional clock gating
Clock gating is platform specific and not mandatory. Thus making it
Kconfig based as well as generic.

Change-Id: I4ea10eadb077ac3d57c9337b43b1a9fb14763302
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-05 20:24:58 -05:00
Tomasz Bursztyka
61c15ba1e1 rtc: dw: Add support for optional clock gating
Clock gating is platform specific and not mandatory. Thus making in
Kconfig based as well as generic.

Change-Id: I01b7831536efd87cc66a95060fcf1faf4a340073
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-05 20:24:58 -05:00
Tomasz Bursztyka
d1d66a6200 rtc: dw: Unmasking interrupt is not generic among platforms
Let's apply the interruption unmasking if only the mask is defined.
Which definition should be done in board.h thus applying the change to
quark_se and quark_d2000 platforms

Change-Id: I9c273e2e7e33dd077a54e8f9205fa949a5e3707a
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-05 20:24:58 -05:00
Tomasz Bursztyka
49a6e0ae37 wdt: dw: Unmasking interrupt is not generic among platforms
Let's apply the interruption unmasking if only the mask is defined.
Which definition should be done in board.h thus applying the change to
quark_se and quark_d2000 platforms

Change-Id: Ie0a4912f0dfbd97f2273efed963f7810a985c0bd
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-05 20:24:58 -05:00
Tomasz Bursztyka
66f05ce4b3 rtc: dw: Make internal primitives Kconfig based
Base address, IRQ, interrupt priority as well as the instance name: all
are now Kconfig based. Thus Applying the change to quark_se and
quark_d2000 platforms. Sample code is updated as well.

Change-Id: I1c225c1b68d94b22ca10423b50a78a0ba09a27a5
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-05 20:24:58 -05:00
Tomasz Bursztyka
85b49efe67 watchdog: dw: Make internal primitives Kconfig based
Base address, IRQ, interrupt priority as well as the instance name: all
are now Kconfig based. Thus Applying the change to quark_se and
quark_d2000 platforms. Sample code is updated as well.

Change-Id: Idcc89e6e9f4acc337fafc7d42f8de3061a5ece04
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-05 20:24:58 -05:00
Tomasz Bursztyka
466cb00d3f rtc: Make the API ready for multiple RTC instances
A platform might provide multiple RTC, either internally or externally.
Applying the changes to the DesignWare driver relevantly as well as
to the sample code.

Change-Id: Ia70e791a6c45e186cbc4dc900a268fa882331af5
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-05 20:24:58 -05:00
Tomasz Bursztyka
e8c4335aa6 watchdog: Make the API ready for multiple WDT instances
A platform might provide multiple watchdogs, either internally or
externally. Applying the changes to the DesignWare driver relevantly as
well as into the sample application.
Taking the opportunity to apply propre style when need (80 chars limit
for instance).

Change-Id: Iad020c697846db483a70a748cfc8fe7147ec3c04
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-05 20:24:58 -05:00
Anas Nashif
275ca60b08 Fixed file description and applied doxygen style
Removed old style file description and documnetation and apply
doxygen synatx.

Change-Id: I3ac9f06d4f574bf3c79c6f6044cec3a7e2f6e4c8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:58 -05:00
Anas Nashif
7283fe0dd3 Zephyr 0.7.0
Changed version to 0.7.0

Change-Id: Iaa629e415492c37bb32e45ff8bfc0164210afbf6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:58 -05:00
Yonattan Louise
c5d86e90a1 Fix logging of interrupt events.
The system crashed if an interrupt occurs before the
kernel event logger is initialized (Error seen on Galileo).
This patch adds a condition to check if the logger is ready
to operate.

Change-Id: I27d7cc31f386780725b0c47a9c92e9c064fc128a
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:24:58 -05:00
Yonattan Louise
9cb1e363f1 Add sleep events to sample in nanokernel.
Change the configuration to enable the sleep events in
the nanokernel event logger sample.

Change-Id: Iea5bde06736b0499c8517de1549dee894a9db094
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:24:58 -05:00
Yonattan Louise
8885d093c4 Add support for profiling sleep events in nanokernel.
This patch remove the dependency of the ADVANCE_POWER_MANAGEMENT
for profiling sleep events that was supported only for microkernel.
Allowing us to also use this feature in nanokernel-only systems.

Change-Id: I1761eb6c4d72f477b419dfca5dc152b0fb69ee27
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:24:58 -05:00
Yonattan Louise
dc12b5d06a Add _loapic_isr_vector_get to mvic
The kernel event logger requires this function to obtain
the irq that is being processed, but this was not implemented
for mvic. This patch add this function to mvic.

Change-Id: I5e1b4a6e2758b69ec713c18ac9f78aebad18a93f
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:24:57 -05:00
Yonattan Louise
6b67133df2 Fix event logger header.
The option sleep event did not work without enabling
the context switch option. This patch fixes that error.

Change-Id: I2e44ddabb7ce190d3a2d5ccece10848f6c44cb48
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:24:57 -05:00
Anas Nashif
036f793544 quark_se: change interrupt values for UART
The values for this platform were wrong.

Change-Id: Iaa24ae05b29b7af26437f0be8fe88e6eab12469d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:57 -05:00
Anas Nashif
98e5c41363 configs: remove obsolete CONFIG_UART_CONSOLE_INDEX
This config option is not being used anymore.

Change-Id: I0bf54a2b57be12567348c12d9823045d64aae4b6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:57 -05:00
Anas Nashif
8ff397d005 qemu_x86: remove obsolete UART defines
Those are now defined using Kconfig

Change-Id: Ie3518f8865968902f8400d209d1b6c38dfb7eca7
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:57 -05:00
Anas Nashif
0f0d8d2c2f quark_se: set UART IRQ flags
Set correct interrupt flags which are used with the console
handler.

Change-Id: I6a3a76826cedd0b4116f622701f2cb1161dd8adc
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:57 -05:00
Anas Nashif
de40d9f90f uart: check for MVIC when creating stubs
Some systems are configured with CONFIG_MVIC which uses the same
call to create the stub.

Change-Id: I92f6657806159624dee9c271554a78bc76935613
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:57 -05:00
Anas Nashif
e6f5702e5f quark_d2000: set UART IRQ flags
Set correct interrupt flags which are used with the console
handler.

Change-Id: I473a1fca6234ffb8d926457e8ccecfa29d1be6a5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:57 -05:00
Anas Nashif
40e41a968d quark_d2000: change interrupt values for UART
Set correct interrupt values for this platform.

Change-Id: I97361b4420630e73bb8c8f812c943ee972cb8762
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:57 -05:00
Juan Manuel Cruz
39a985a045 adc: update adc sanity check with new platform name
Change-Id: I2f1e6362a5da3b4c1a799eae0137144b57e0e554
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:24:57 -05:00
Daniel Leung
a0a140f470 uart/nsim: Make config for uart/nsim explicit
This adds CONFIG_UART_NSIM to enable the uart/nsim driver.
This fixes compilation issue where the base address parameter
is not defined due to CONFIG_NSIM=y but CONFIG_SERIAL=n.

Change-Id: I1dc1c15b22ad174d4db514d89551780f0dfcae66
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:24:57 -05:00