Commit graph

42249 commits

Author SHA1 Message Date
Andrei Emeltchenko
3a18f7e25c drivers/nble: Update nble_version structure
Add missing build_hash field.

Change-Id: Iee843b0354b7ab1699f75355542b719581b16b08
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-07-15 16:41:33 +03:00
Arkadiusz Lichwa
796d467653 Bluetooth: L2CAP: Set BR/EDR CoC channel as connected
Finalizes CoC channel configuration setup. The channel's CONNECTED state
can be set depending on context path by two responsible for that handlers.
Then one of them announces to all registered clients the connection is
set successfully.

> ACL Data RX: Handle 12 flags 0x02 dlen 12                   [hci1] 108.666944
      L2CAP: Connection Request (0x02) ident 3 len 4
        PSM: 3 (0x0003)
        Source CID: 64
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci1] 108.668572
        Num handles: 1
        Handle: 12
        Count: 2
< ACL Data TX: Handle 12 flags 0x00 dlen 16                   [hci1] 108.673002
      L2CAP: Connection Response (0x03) ident 3 len 8
        Destination CID: 64
        Source CID: 64
        Result: Connection successful (0x0000)
        Status: No further information available (0x0000)
< HCI Command: Host Number of Complet.. (0x03|0x0035) plen 5  [hci1] 108.673548
        Num handles: 1
        Handle: 12
        Count: 1
< ACL Data TX: Handle 12 flags 0x00 dlen 16                   [hci1] 108.674725
      L2CAP: Configure Request (0x04) ident 5 len 8
        Destination CID: 64
        Flags: 0x0000
        Option: Maximum Transmission Unit (0x01) [mandatory]
          MTU: 48
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci1] 108.707579
        Num handles: 1
        Handle: 12
        Count: 2
> ACL Data RX: Handle 12 flags 0x02 dlen 16                   [hci1] 108.714206
      L2CAP: Configure Request (0x04) ident 4 len 8
        Destination CID: 64
        Flags: 0x0000
        Option: Maximum Transmission Unit (0x01) [mandatory]
          MTU: 560
> ACL Data RX: Handle 12 flags 0x02 dlen 18                   [hci1] 108.715442
      L2CAP: Configure Response (0x05) ident 5 len 10
        Source CID: 64
        Flags: 0x0000
        Result: Success (0x0000)
        Option: Maximum Transmission Unit (0x01) [mandatory]
          MTU: 48
< HCI Command: Host Number of Complet.. (0x03|0x0035) plen 5  [hci1] 108.720451
        Num handles: 1
        Handle: 12
        Count: 1
< ACL Data TX: Handle 12 flags 0x00 dlen 14                   [hci1] 108.720472
      L2CAP: Configure Response (0x05) ident 4 len 6
        Source CID: 64
        Flags: 0x0000
        Result: Success (0x0000)

Change-Id: If831777f7bd87489eefbd200a1ca8883b83aae3e
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-07-15 11:31:06 +02:00
Arkadiusz Lichwa
22bdf50615 Bluetooth: L2CAP: Mark finishing CoC configuration on BR/EDR
When each side involved in getting configured L2CAP CoC channel on
BR/EDR transport aggrees on configuration contract regarding in/out MTU,
set proper context flags to start prepare finalize config process.

Change-Id: Ic821ea3b961442be758ad4e2d91b2d812e2a54b5
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-07-15 11:01:17 +02:00
Arkadiusz Lichwa
c28720f167 Bluetooth: L2CAP: Introduce CoC channel states
Adds CoC channel's context to hold channel setup state and SM routine
that evaluates validness of transitions.
At the beginning DISCONNECTED, CONNECT and CONFIG states are added and
used by CoC setup on BR/EDR transport.

Change-Id: I1bbd16ec2f59ea961791786b78f22834d6f4b4d8
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-07-15 04:54:03 +00:00
Andrew Boie
ff948335be nios2: remove nios2e-zephyr
We are not using this core build any more. Users should be using
the provided F core instead.

Change-Id: I2b5266273030c1bd355aafa78733b4077848d115
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-14 22:40:45 +00:00
Andrei Emeltchenko
1aa71161c0 quark_se: Correct UART_IRQ_FLAGS to IOAPIC_LEVEL
This patch basically reverts patch "QMSI/uart: Use IOAPIC_EDGE instead
of IOAPIC_LEVEL". The issue with lost UART interrupts is fixed with
following patch: "_loapic_isr_vector_get: fix implementation" which is
a proper way.

Change-Id: I07aa168335827b09db7fcb2486b01585648ff5d6
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-07-14 22:40:24 +00:00
Flavio Santes
03c41c80a9 drivers/pinmux: Change spaces by tabs in the pinmap table
Change spaces by tabulators in the Arduino 101 pinmap table.

Add comment for spi master 1 pin connection.
Jira: ZEP-518

Change-Id: Iba2e807b315c3d1b70eceddd1c6709f5a5866cba
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-07-14 22:40:09 +00:00
Peter Mitsis
7d39b40f2f doc: Update floating point docs for ARM
The x86 architecture is no longer the only one that supports hardware
floating point operations.

Change-Id: Ib23e032f00661bab87a20872651b284580b8e7e5
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-07-14 17:26:09 +00:00
Szymon Janc
c9e2fc1929 Bluetooth: Fix changing advertising random address when scanning
If active scan was started while advertising random adress was
set to NRPA. This results in device advertising with new adress
instead of RPA making it imposible to resolve its identity by
remote devices.

To fix this NRPA for active scan is set only if advertising is
not enabled. This resulst in RPA being used for scan requests
but this is OK since device is advertising anyway.

Change-Id: I35e98bee72f4abc033f5adc664698c14c5d8a2b0
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-07-14 15:26:50 +00:00
Szymon Janc
40cf82bc60 Bluetooth: Track if active scan is being perfomed
Add new bt_dev flag for tracking if performing active scan.

Change-Id: I7eacaa94372bae933f648a49d2f55fc200f9d0bf
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-07-14 15:26:42 +00:00
Louis Caron
beeafae556 Bluetooth: Align the NBLE firmware version and upgrade SD
The latest NBLE firmware includes a new version
exchange mechanism that is independent from the
RPC function definition.  It also allows using
firmwares that are automatically generated by
the official builders without needing a local
build.
The upgrade of the softdevice fixes several
issues in PTS tests.  The major change in
term of API introduced by this upgrade is that
upon write requests, the offset and data of the
write request must be sent back to the softdevice.

Change-Id: Ie574047a09a4e6fdcbf775bc98d8a61f981cee0c
Signed-off-by: Louis Caron <louis.caron@intel.com>
2016-07-14 13:59:39 +00:00
Szymon Janc
9303331bbd Bluetooth: SMP: Fix disabling debug logs
SMP debugs should be enabled only if CONFIG_BLUETOOTH_DEBUG_SMP is
defined.

Change-Id: I17f8ad5e1a9504dcbd3df545af9205db88ee2849
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-07-14 11:52:48 +02:00
Johan Hedberg
94aa7e6cb0 net: buf: Minor cleanups & fixes to the API documentation
Rename left-over mentions of 'bt_buf' and ensure that all parameter
descriptions end with a period.

Change-Id: Ie63e63920a8bfea2d02806a65306421264c9f89b
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-07-14 05:10:13 +00:00
Andrew Boie
a69ea78b8a _loapic_isr_vector_get: fix implementation
The comments state that higher-numbered vectors have priority,
but the function was doing the opposite. The code now agrees
with the comments.

Change-Id: I1a689fc22c8355458bdd734d95ff637da0655533
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-13 22:41:51 +00:00
Andrew Boie
af085b8edf quark_se: make EOI operations atomic
Some issues have been noted with nested interrupts on quark SE.
In particular, the wrong vector # being sent to the IOAPIC EOI
register. Now when doing EOI, we lock interrupts so that the act
of reading the current vector being serviced, and sending EOI
to both controllers happens atomically.

Change-Id: Id9ad992740e197bb9d4638764952b04a27c4af61
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-13 22:41:33 +00:00
Andre Guedes
813923e63c x86: crt0: Fix '_sys_soc_resume' type declaration
The '_sys_soc_resume' symbol is function-type not data-type as declared
in crt0.S. This patch fixes this by using GTEXT macro instead.

Change-Id: Ibe8bcf92ab045bfe908fd2048d046083e773894f
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-07-13 17:59:25 +00:00
Andrew Boie
448334c2eb nios2: _Swap(): fix C calling issue
The code expected r10 to be preserved across the call to the
event logger, which wasn't reasonable given that it is caller-
saved.

Change-Id: I694357ea7ee9b410b93b5a0894e8c38c53127363
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-13 17:58:42 +00:00
Andrew Boie
8c524a291e x86: merge IAMCU and SYS V core arch code
Having two parallel implementations is a maintenance issue, especially
when some strategically placed #ifdefs will suffice.

We prefer the ASM versions for SYS V, as we need complete control of
the emitted assembly for interrupt handling and context switching.
The SYS V code is far more mature. IAMCU C code has known issues with
-fomit-frame-pointer.

The only difference between the two calling conventions is that the
first three function arguments are provided in eax, edx, ecx instead
of on the stack.

Issue: ZEP-49
Change-Id: I9245e4b0ffbeb6d890a4f08bc8a3a49faa6d8e7b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-13 17:56:39 +00:00
Andrei Emeltchenko
8be61102da quark_d2000: Update UART_IRQ_FLAGS for the board
Since we started to use UART_IRQ_FLAGS define them also for
quark_d2000 board. Note that we use IOAPIC_LEVEL since this is right
thing to do and the issue with lost interrupts is fixed in
_loapic_isr_vector_get().

Change-Id: Iaed0283bcc01290e420b42ff5d40ce9d99bfc677
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-07-13 14:44:43 +00:00
Jani Pajarinen
6de5643eb1 net: Restructured Ethernet driver menu
Created menu for Ethernet driver and moved driver + debugging setting
under it. Changed prompt from "Grove log level" to more describing and
fixed typos.

Change-Id: If2f79fee1a002a42e89e2493a2294332abec05ee
Signed-off-by: Jani Pajarinen <jani.pajarinen@intel.com>
2016-07-13 14:33:44 +00:00
Mariusz Skamra
d98b9bd139 Bluetooth: Get the included service 128bit UUID
This adds reading of included service attribute 128bit UUID.
The limitation of this solution is that if several attr handle-range
pairs will be received, this will read first attribute UUID and then
start discovery from the the succeeding handle.

ZEP-373

Discovery related test results:

 2/76   GATT   TC_GAD_CL_BV_02_C   PASS
 3/76   GATT   TC_GAD_CL_BV_03_C   PASS
 4/76   GATT   TC_GAD_CL_BV_04_C   PASS
 5/76   GATT   TC_GAD_CL_BV_05_C   PASS
 6/76   GATT   TC_GAD_CL_BV_06_C   PASS

Change-Id: I27185b3a3ae96c9c03b0f356492df18ba83b183a
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-07-13 14:18:03 +00:00
Johan Hedberg
477fedcf1f net: buf: Add more big endian helpers
Change-Id: I3f8d9a2810359a0cc7b7ce2097f86e03fa35d3bc
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-07-13 14:11:37 +00:00
Johan Hedberg
77dfa93f47 net: buf: Add helpers to use net_buf_simple stack variables
Add a macro to easily define net_buf_simple stack variables, as well
as a helper to initialize them.

Change-Id: I3e4ffc172843a0946e8159618c8f84a87fc682bc
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-07-13 14:11:26 +00:00
Jukka Rissanen
02c83fd35d net: yaip: Print available DATA buffers during nbuf alloc
Print more debugging information about available DATA buffers
when allocating and de-allocating a net buf.

Change-Id: Id4aa4c46b5dc70e683029ccc525abed5b6cfbefb
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-07-13 14:06:24 +00:00
Jukka Rissanen
b375394369 net: yaip: Make sure that RX is started before TX
The network stack initialization will need to make sure
that RX side is ready before TX side is started. So in
order to do that the TX init is called from RX fiber.

This is needed so that we can start to send network packets already
during the net_init(), like IPv6 neighbor solicitation messages
during duplicate address detection process.

Change-Id: I12fde3d388d9aab41daa93b1edc02f25b8c5511d
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-07-13 14:06:24 +00:00
Jukka Rissanen
d0daa97820 net: yaip: Moved ARP helper macro to arp.h
The helper macro NET_ARP_BUF() needs to be used from other
files so arp.h is proper place for it.

Change-Id: Ief7bbb385d9c180213ecd7cb08023f13999f5270
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-07-13 14:06:23 +00:00
Tomasz Bursztyka
56a747ead4 net: yaip: Add comment explaining net_core's verdict values
It is then clear what logic to expect once such verdict has been given.

Change-Id: Id64ff00e65ffe2dad45673d1eca4eb76ae3ae1f6
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-07-13 14:06:23 +00:00
Tomasz Bursztyka
402ea39dc1 net: yaip: Save some bytes on net_if logic
Instead of runtime checks, let's use NET_ASSERT() to verify that net if
API is properly set.

Change-Id: I8e5c769b8383aa9aec5a5e9600c07e05ca96d517
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-07-13 14:06:22 +00:00
Jukka Rissanen
902912adbb net: yaip: Add NET_ASSERT() macro
Change-Id: Ie98da69fbd1cf277a5d517736217209c85180416
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-07-13 14:06:22 +00:00
Tomasz Bursztyka
967f5b3145 net: yaip: Tiny comment fix
Change-Id: I9fff6651be90f74eaaccdc082b14997b8e55565d
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-07-13 14:06:21 +00:00
Tomasz Bursztyka
5c64a078f4 net: yaip: Removing capabilities() from net_if api
As there is a L2 in the middle, there is no need for a net_if to provide
such information.

Change-Id: I58a35d4d124cd8a67026f32e71713ef06f43b7c5
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-07-13 14:06:21 +00:00
Tomasz Bursztyka
7b52246eb9 net: yaip: Re-factor Kconfig and move ARP to a better place
ARP and its related Kconfig options now belong to l2.

Change-Id: Ie21ed3cc39a7c7c76d823587ec33fdd22b439fcd
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-07-13 14:06:20 +00:00
Tomasz Bursztyka
d8f0b9ffed net: yaip: Add an L2 layer
Net core then does not know anything about l2 related logic.
For instance ARP is used in ethernet l2 API and nowhere else.
This will be helpful when adding different technologies altogether.

Currently, only SLIP driver is enabled to use relevant l2 layer.

Change-Id: I03c93326321028d04222733ca4083e3c6b785202
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-07-13 14:06:20 +00:00
Tomasz Bursztyka
bb1fe0c147 net: yaip: Make net_core.h include the least amount of necessary header
net_core.h is the ground brick of the IP stack, and thus should not
include other headers that might include net_core.h also: this would
create circular dependencies.

Change-Id: I70c17b736788528e4e0b4b5b2c478098b049c9b1
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-07-13 14:06:19 +00:00
Tomasz Bursztyka
1f9f3e138b net: yaip: Add an helper to queue a buffer in a net_if instance
Makes code cleaner so it won't be necessary to access the net_if
internal queue directly.

Change-Id: I119a54e0639843093fa0da6f11e590e8990525d8
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-07-13 14:06:19 +00:00
Tomasz Bursztyka
cd14d27e8e slip: Fix compiler warnings
2 warnings happens when CONFIG_SLIP_DEBUG is set, thus fixing it.

Change-Id: I032d7481942e86911764da35cdd6f7b8e05cdeaa
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-07-13 14:06:18 +00:00
Tomasz Bursztyka
bbf7d35001 net: yaip: Shorten IPv4/6 config options
This is meant to stay in 80 chars line length limit.

Change-Id: Ib3b3b1cf5e05fec2407e470ae3600ff5a4c6a505
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-07-13 14:06:18 +00:00
Tomasz Bursztyka
389e4ee70d net: yaip: The core initialize ARP layer relevantly
Up to the core to initialize what's required to get all things working.
Introducing a NET_ARP configuration option, in future this one will be
set if only some hardware requires it along IPv4.

In order to differentiate ARP and actualy hardware drivers supporting
ethernet frames, adding a NET_ETHERNET config option. Which option, if
enabled along NET_SLIP, will be used later on to fully simulate ethernet
over slip TAP driver. Such option will also be used to unlock ethernet
hardware devices in drivers in future.

Change-Id: I10ed151b96256ea3f265c3926bf9a35e49692e1e
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-07-13 14:06:18 +00:00
Tomasz Bursztyka
fdc93e6202 net: debug: Indent properly some config options.
Change-Id: I3500081592a983e97e3e5407ac441b4ece58634d
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-07-13 14:06:17 +00:00
Tomasz Bursztyka
514f184350 net: yaip: Include toolchain related header for aliases
__packed is an alias for __attribute__(packed) and is declared in
toochain's headers.

Change-Id: Ib9d136a1a2dd401194988d6573bf7778f07dbfb6
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-07-13 14:06:17 +00:00
Tomasz Bursztyka
c02d2fdfd0 net: yaip: Use generic wrapper for semaphore give operation
No need to recreate an convenient context wise wrapper since one already
exists.

Change-Id: Ie1bfc0e203281485acb36e0e844b2bad384c2af6
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-07-13 14:06:16 +00:00
Ravi kumar Veeramally
4450a41532 net: yaip: Fix __packed attribute, use shorter alias
Change-Id: I5bee3f1a9cf8629151734fc85b2c3e6097232cc0
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-07-13 14:06:15 +00:00
Ravi kumar Veeramally
7789df23d1 net: yaip: Add UDP header
Change-Id: I2f3bba1014cf598bed7606d5d43b3653052b1f7f
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-07-13 14:06:15 +00:00
Ravi kumar Veeramally
2cdbb932df net: yaip: Trivial comment fixes in header files
Change-Id: I2f3bba1014cf598bed7606d5d43b3653052b1f88
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-07-13 14:06:14 +00:00
Ravi kumar Veeramally
3ef38a6e05 net: yaip: Provide separate header file for ethernet
Change-Id: I2f3bba1014cf598cdd7606d5d43b3653052b1f7f
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-07-13 14:06:14 +00:00
Jukka Rissanen
1145bd43a1 net: yaip: Setting static IP addresses for echo-server
Makes it possible to test things between qemu and host when
using slip.

Change-Id: I27e17de9f0d8c2c8406f0afdd66c295e827f87a0
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-07-13 14:06:14 +00:00
Jukka Rissanen
01af51d71f net: yaip: Handle ARP messages
Catch ARP messages when processing incoming messages and call
ARP input for parsing.

Change-Id: I88ea4699dfb8e7e35d3cecbce32d50aa485c307c
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-07-13 14:06:13 +00:00
Jukka Rissanen
19dc87ea7d net: tests: Additional tests for ICMPv4 checksum verification
Change-Id: I21566c9365b8abc5753f6bedba55a3fb494745b9
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-07-13 14:06:12 +00:00
Jukka Rissanen
ab91d99dc1 net: yaip: ICMPv4 checksum calculation fixed
The checksum for IPv4 ICMP was incorrect, the pseudo header
is not to be taken into account here.

Change-Id: I2a2a7e6eace24aba009574bf0021417257c8198a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-07-13 14:06:12 +00:00
Jukka Rissanen
11df6a01cd net: yaip: IP checksum calculation should ignore ll header
Link layer header was incorrectly taken into account when
calculating the checksum.

Change-Id: If09612145b87ed266998341d380eb6d5ecdde7cf
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-07-13 14:06:12 +00:00