Commit graph

41161 commits

Author SHA1 Message Date
Dan Kalowsky
31ff5ad01f tinycrypt: moving includes
Moving the includes to include/tinycrypt. This will help make it
clear when looking at source files where each header originated from.

Change-Id: Ic79978da286f9c288868074a69262d89488925b8
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:24:27 -05:00
Andrew Boie
9882dcd3d2 sanitycheck: look for misaligned XIP VMA/LMA addresses
XIP is currently implemented in Zephyr by copying only the RW
sections from flash into RAM. For these sections, if the VMA spacing
is different than the LMA spacing the sections in RAM will not be
at the right addresses. Warn about this situation.

Change-Id: I59a55fc27703103e37a7f0bbc34f236047621e0e
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:24:27 -05:00
Andrew Boie
73b4ee69b7 sanitycheck: binary size calculation improvements
- Several recently added binary sections were not being taken
  into consideration, unknown sections now trigger test case
  failure
- Use same VMA/LMA terminology that objdump uses and show both
  addresses

Change-Id: I641eef64aaed6612f62e5aa092f66baaa2797c70
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:24:27 -05:00
Andrew Boie
c2a9a37e1c test_task: fix startup race
Bad things happen if an SW IRQ is asserted before it is initialized.

Change-Id: I4ad48480c4d7bb5fc14d778d2566d73086300fa1
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:24:27 -05:00
Anas Nashif
93f06fad7d Revert "tinycrypt: moving includes"
This commit breaks the sanitychecks

This reverts commit 93fa1053b21efe3d030ea060a31b80d6008d5bfd.

Change-Id: Ia52092e845c33234817a1cb27cd1f17064c65e7e

Signed-off-by: Anas Nashif <nashif@linux.intel.com>
2016-02-05 20:24:27 -05:00
Anas Nashif
cd6e315167 Revert "tinycrypt: use tabs not spaces"
breaks sanitychecks

This reverts commit 6712ac6c73dcfd6a8e5dc04f6e05ab33b8dbf51c.

Change-Id: I69c3938da0d215b63361cf4d741f2c978ad80661

Signed-off-by: Anas Nashif <nashif@linux.intel.com>
2016-02-05 20:24:27 -05:00
L.S. Cook
86f851c55a doc: adding :dfn: syntax where needed
Updated as per Allan's comments to correct use of Zephyr
kernel in lieu of codename variable

Change-Id: Iaf5f8531c5452b6d8fb13318f00050aa63d99200
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-02-05 20:24:27 -05:00
L.S. Cook
cb9749f443 doc: directive indentation fixes on language.rst
Editing language.rst file to clarify a few items
Also correcting a few things I missed earlier
Also fix title case without hyphen to be consistent

Change-Id: I463d1cdb436957a14af6ea40933f892a51b161aa
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-02-05 20:24:27 -05:00
Dan Kalowsky
3b650c5c44 tinycrypt: use tabs not spaces
Passing checkpatch check to use tabs instead of spaces for everything.

Change-Id: I2fdd507d48db83fda8d183043c5a4ab1b97148dc
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:24:27 -05:00
Dan Kalowsky
9d506d0a26 tinycrypt: moving includes
Moving the includes to include/tinycrypt. This will help make it
clear when looking at source files where each header originated from.

Change-Id: I062cb3c6ecc5bc2ed2d28228d5926646b6b5f912
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:24:27 -05:00
Dan Kalowsky
53dbe1f1ec crypto: comply with checkpatch file length
Fixes the tinycrypt library to use Zephyr checkpath acceptable line
lengths.

Change-Id: Ia7bef46a39fa029cda826ec5b2d7d42036d9bdfe
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:24:26 -05:00
Andrew Boie
579a490ea3 test_sema: fix initialization race
If the other tasks try to trigger a SW IRQ before MONITORTASK
has initilized it, the CPU generates an exception.

Change-Id: Id2745d728a7cf15132096585c073f85f8306cb38
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:24:26 -05:00
Jukka Rissanen
966401307e x86: Allow use of simple_uart driver with ia32 target
Needed to get simple uart driver working in qemu with
SLIP networking or qemu<->qemu network testing. Because
this is only needed in qemu the patch only touches ia32
platform.

This can conflict with Bluetooth in x86 and qemu so caveat emptor.

Change-Id: Iba20543f968c8fd37ee36747d9aa1ad3f782057d
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:26 -05:00
L.S. Cook
1f901bd491 doc: change bash to console refs
Also: fixed trailing whitespaces.
Also: integrated comment change suggestions from GA

Change-Id: I41f7052d9895e0c61ad0e76be989ea6161f9ed83
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-02-05 20:24:26 -05:00
Leona
c98560f783 doc: edit of gerrit tutorial
Change-Id: I3f5831d5e41968c5ce43cc1042565f7677025caa
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
Signed-off-by: Leona <lsc@hackeress.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:26 -05:00
Szymon Janc
0fe883ccb1 Bluetooth: Fix not reseting required security in case of error
If bt_conn_security failed required security level should be set
back to current security. Otherwise it might not be possible to
try later on with lower security.

Change-Id: I3ad7151f2cdff15147b9948bbdab516b8cc16ce2
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:24:26 -05:00
Mariusz Skamra
ab665fbe27 Bluetooth: Clear pairing flag if all keys have been distributed
This fixes the bug that affected pairing as peripheral.
With this patch pairing flag is cleared and timeout timer stops
if all keys has been distributed.

Change-Id: If7575197d5a42a0ca5bb158ea5607934e92abb81
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-05 20:24:26 -05:00
Szymon Janc
7aae2849c3 Bluetooth: Rename connection state notify functions
Rename bt_conn_connected to notify_connected. This will avoid
confusion with BT_CONN_CONNECTED state name. Same goes with
bt_conn_disconnected.

Change-Id: I6e9d50016036b30345068ef2a6bb556c45d7dd06
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:24:26 -05:00
Szymon Janc
89f8453ebe Bluetooth: Don't delay bt_conn connected callback
Delaying only connected callback resulted in races where security
or pairing callback could be called before bt_conn connected.

Currently only procedure that relies on read features is connection
parameters update and that should not conflict with other traffic.

Change-Id: I835535abbff21ea8d86b728f5681f90ef9fd337c
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:24:26 -05:00
Jukka Rissanen
6dba9310d4 net: Keep track of number of free L2 buffers
Print current number of free MAC buf count when allocating
or freeing mbufs.

Change-Id: I3c434671b28ac4b4d8c8d968899e891391d849d9
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:26 -05:00
Jukka Rissanen
3e5a38d348 net: contiki: Do not try to free null mbuf
If mbuf could not be allocated, then do not try to free it.

Change-Id: Idf48f9f2eda260b8560a5388c920a9d9a3ef8f16
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:26 -05:00
Jukka Rissanen
44df1a12a2 net: Print local MAC address when setting local addresses
Useful for debugging.

Change-Id: I812ec770e1cdf24f6470c4a0d066c74107ce35df
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:26 -05:00
Jukka Rissanen
dbed256cb0 net: Print stack usage more often for 802.15.4 fibers
The stack usage was not printed often enough when receiving
and sending 802.15.4 packets.

Change-Id: I61a4b6acdc10cb1681e2aeb63cb6af7a35834dff
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:26 -05:00
Jukka Rissanen
c41ad174fc net: Print stack usage and statistics for every transmitted msg
The TX stack usage data and statistics were only printed
if there was an error. This happened very seldom which was
not very helpful.

Change-Id: I059cf9ee3449e5b39d872ef6026df968d86d0209
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:26 -05:00
Jukka Rissanen
b14fdb8b5d net: contiki: Print detailed info if packet len is wrong
If IPv6 packet length is incorrect, then print the actual
length values for debugging aid.

Change-Id: I20d4d73efd1e0103f670e8e53ba6417a4795ab80
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:26 -05:00
Jukka Rissanen
f857815455 net: Print warning if 6lowpan is not used with 802.15.4
If one has 802.15.4 network and tries to compile without
6lowpan, then print warning as that combination is not a
usable network setup. It can be used for testing but not
for real live setup.

Change-Id: I3b540686c8556ed0306723834ca38633aff63165
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:26 -05:00
Jukka Rissanen
a3c8bf6ce3 net: contiki: Typo in 802.15.4 reassembly debug message
Change-Id: Ib363ff582fe5e3e019055c2f3bf062deb5ba8eba
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:26 -05:00
Jukka Rissanen
b7d790b4b2 net: contiki: Do not discard non-fragmented packets
If the fragmentation header is missing, then do not discard
the message but pass it to upper layers as is. The fragmentation
header might be missing if the packet fits into 128 bytes.

Change-Id: I39d29e7ad80be5531262a0ac413d8137da0c64f5
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:26 -05:00
Jukka Rissanen
ea0d712ee1 net: Compile 6lowmac layer only if 6lowpan is enabled
No need to compile sicslowmac.c if we do not have 6lowpan.

Change-Id: I8624089f4b360fb12ef1c4a6d7104f0b190f048c
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:26 -05:00
Jukka Rissanen
d0731d5d81 net: Pretty print statistics
Align statistics columns better.

Change-Id: I9e83fbbb744d910cae3512bdddab8a5d0e217ba5
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:26 -05:00
Jukka Rissanen
a8c54384c0 net: Gather statistics about amount of received L2 bytes
This collects received statistics from layer 2 (MAC).

Change-Id: Ie869c1209bd06f0a5ccad5094b0cafe5fe74d787
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:26 -05:00
Jukka Rissanen
f84e0c1b9b net: Gather statistics about amount of sent L2 bytes
This collects byte counts from layer 2 (MAC).

Change-Id: I16c25f7ae8b9aa485e3c5f1573154cd2270cff93
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:26 -05:00
Jukka Rissanen
f10641f072 net: contiki: Initialize statistics structure
The statistics counts were not initialized so the numbers were
mostly bogus.

Change-Id: If4c33701fbdc4d4603d708c69950a8a18f8eaeaf
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:26 -05:00
Szymon Janc
66f6cfc86f Bluetooth: Cover whole key API under CONFIG_BLUETOOTH_SMP
There is no need to define keys types if SMP is disabled.

Change-Id: If6b653906df4623f440b258afd574722498109d0
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:24:26 -05:00
Szymon Janc
4372347319 Bluetooth: SMP: Move code to reduce number of ifdefs
Gather central and peripheral related code togerther so it can be
placed under single blocks of ifdefs.

Change-Id: Ia5fe45b86173b0e647b582bf2cd96fc7c9cb7feb
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:24:26 -05:00
Szymon Janc
07805cb9a4 Bluetooth: Move GATT code to reduce number of ifdefs
Gather client related code togerther so it can be placed under
single blocks of ifdefs.

Change-Id: I6f2f5a06c0308b885d01fc6af300b162baec0823
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:24:26 -05:00
Szymon Janc
888fac8ac8 Bluetooth: Move connection code to reduce number of ifdefs
Gather SMP related code together so that it can be placed under
single blocks of ifdefs.

Change-Id: I3c2e71243b694e9984ae8e88025a6ead7969e020
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:24:26 -05:00
Szymon Janc
5deb2667dd Bluetooth: Fix connecting to devices that use RPA
This fix a regression that cause identity address to be passed to
LE Create Connection HCI command. This was affecting connecting to
iPhone. Regression was introduced in beaf30fda7de1476c742a
(Bluetooth: Simplify check_pending_conn function).

check_pending_conn now takes two addresses: ID and real address.
ID is used to find connection object and real is used in LE Create
Connection HCI command. If no IRK is present both addresses have
same value. This is to avoid double lookup of ID address for every
advertising report.

Change-Id: I6b86a698087889c4e6c2a1cbc9a688a804cfeb84
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:24:26 -05:00
Szymon Janc
eb8dfd116e Bluetooth: Refactor handling of identity address lookup
This reduces number of idefs cuts and make code much easier to read.
In case of SMP not supported (or connection support since SMP depends
on it) find_id_addr is simplified and will most likely be inlined by
compiler resulting in no-op.

Change-Id: Ib16d1508c5664fcb58f619b090a5d62b2ecfe8c5
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:24:26 -05:00
Jukka Rissanen
18a375d487 net: tools: echo-client can send data forever
Added -e option to echo-client and it will not quit but just
send data forever to the echo-server.

Change-Id: I9085220844b5bc45b2b7fffc46fb1b9e93235307
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:25 -05:00
Jukka Rissanen
2456300976 net: 802.15.4: Ignore too long network packets in dummy radio
If we receive too long message in dummy radio driver,
then we need to discard the packet as we cannot handle
it anyway.

Change-Id: Ibed0ac5f1568dd791dec3e780c7f6c71914d02cd
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:25 -05:00
Jukka Rissanen
05d8a096e1 net: apps: test_15_4 fixes when running in one qemu
Made the test_15_4 application to run much faster when it is
running inside qemu (started with make qemu0).

Change-Id: I4455eca4f0426e8acc8b87d93eb80f4d179a1b48
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:25 -05:00
Jukka Rissanen
b8fb7ebd02 net: apps: Fix the 802.15.4 monitor application
The 802.15.4 monitor application had issues with connecting
pipes together and making sure the first byte from qemu is
not lost. Before starting real data connection we send five
null bytes and the discard them in receiving side.

Change-Id: I376ae4f79aaa1ea742640999ec5b3d9c57a1279a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:25 -05:00
Jukka Rissanen
83dd828d58 net: apps: Add readme file describing various IP stack examples
Change-Id: I22cd281ae3157f0638c773e2c251289b51da78a9
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:25 -05:00
Jukka Rissanen
9368afd336 net: apps: Connect echo-server and echo-client tests together
It is now possible to loop echo-server and echo-client test
applications together when they are running in qemu.

Start echo-server with "make server" and echo-client using
"make client" in the corresponding samples directory.

Change-Id: Ic852735f7bebc93e42873e98427e282902b3ca03
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:25 -05:00
Jukka Rissanen
40638b3ad4 net: Additional checks for length of the data to be sent
Dummy 802.15.4 has now some additional check to verify that we
are really sending correct amount of bytes.

Change-Id: I4d223c02e2628966e3b1a3cdcf7b560043d7d788
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:25 -05:00
Jukka Rissanen
03e0d10ab3 net: contiki: Remember original data length when sending
If the stack is sending network packets by itself, like when
sending router or neighbor solicitation messages, then remember
the original length of the message. This is important because
uIP stack will clear the length of the sent message after it
is sent.
After this change, the lower level drivers can use
the net_buf_datalen() to get the original length of the
buffer. The issue is seen because uIP stack is running in
different fiber than the network device driver.

Change-Id: I6078c5d716bba455a93be9be122e97cd24b8dc0e
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:25 -05:00
Jukka Rissanen
ddab4c11af net: contiki: Print debug information about fragment length
Print information about how much data we are losing if
null fragmentation is used.

Change-Id: I2f18d180a4c75768534de851c7cc27c3e70ca310
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:25 -05:00
Jukka Rissanen
d9e0f0494a net: User can select the desired 6LoWPAN compression method
Adding selection of 6LoWPAN compression method to Kconfig.
Possible values are:
* no compression
* IP header compression

Change-Id: I8721fa683f7488ec9ad0bf37f6637fa264c2038f
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:25 -05:00
Jukka Rissanen
c890edc687 net: 802.15.4: Allow user to set the PAN id
User can set the desired network id from Kconfig.

Change-Id: Iac9de1deb2b01bcfcb3382849d451dce1a05077a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:25 -05:00