Currently, only address related changes are handled.
Change-Id: I2aa366518dae2725e58cbede4ccbe2ef19cd8b16
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This will be useful when creating request and/or event codes.
Change-Id: Ibc117b476c52d72c77924a245e1f263f583061f6
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
The network interface naming macro is ignoring the
dev_name parameter. This can bring issues if having
more than one network interface in the system.
Change-Id: I7e975be61e82bd04bd865b0c4078607cbdef2230
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
As the function does not modify the IPv6 address,
it can be const.
Change-Id: I2af58a4954d8b6f0d71bc7d0d14ddf0f62f8ca7c
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
While doing some documentation for it, I realized names were not all
good and it missed some stuff:
- what belongs to event should contain "event" in it
- we have a structur as callback so let's type the handler as a handler
- let's add the request handler signature
Change-Id: I18822cbcdc3c10e33600d6db38abab5ca73a228c
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
In some cases the BT header files are missing and the compilation
will fail when done by sanitycheck script.
Change-Id: I484e1f0c23975053e947bc57ff3c9f4042fad71e
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Use ?= for the CONF_FILE variable to match the default assignement for
BOARD ?= qemu_x86.
Change-Id: I0b6cf1e967eeb437d99aa7286cf560426d48fbf9
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Export ieee802154 radio over USB to be used in other Operation Systems
like Linux. In this scenario Linux SoftMAC driver would be used
implementing ieee802154 stack inside Linux.
Currently tested to work with Raspberry Pi and addon ieee802154 board.
Change-Id: Iabcbbfcaad8e3935a63faca50a19fb624e78a351
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
L2 RAW channel allows to use some functions of IP stack for RAW access
of network drivers. It is hidden from user and is selected by 2520 raw
driver.
Change-Id: I91dd09803052072dfddb7989d9d67c3a5840f89e
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Add TI CC2520 driver allowing RAW access to radio interface similar
way Bluetooth user channel works. This makes possible to handle radio
channel inside external 802.15.4 stacks, for example export it over USB
and handle in Linux.
Change-Id: I61bb4c8b998ff1e47dc65427ac471f04ec8fea63
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
It mimics how event could be thrown through a dedicated thrower (a
fiber). The amount and event it can throw is gived through parameters.
Change-Id: I484bc72bdb730a77ce976b0b2998411d9918b7fc
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This adds the capability to raise an event, and for anybody to listen to
it.
Change-Id: I2287b43d678930c29391efa2ddf7b12652cc1bb6
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Define the ground mechanism to interact with the network stack.
Change-Id: Id2af76188967fa66e0f0d755a2c1dc8a85985540
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Basic unit tests for Router Advertisement message handler.
Change-Id: Ia99cd160632972a12e2099a3ff6e41e6ea48ff9b
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Add multi fragment parsing support for Router Advertisement
packet.
Change-Id: Ie2730156c96759ee720f406f9d034b350643322e
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Get the last fragment only once instead of searching it for
every byte written.
Change-Id: Iebeed21671b12bc081d7a1291f91d2c897a7a1d6
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The buf parameter cannot point to a data fragment in
net_nbuf_write() because we need to use user data inside
that function and the fragments do not have that information.
Change-Id: I45b9c23869df08a0852bd99c0b453210ad2300b5
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If the caller did not allocate first data fragment, then allocate
it automatically.
Change-Id: Ice0f3bf65b1f9cd838738549ba15117d925b37b7
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This way we do not access invalid pointer if user passes NULL
pointer to this function. Also we can avoid extra error checks
when calling net_nbuf_read() function.
Change-Id: Ie124cbe8a7915fa07decedd48c0c274138cfd0aa
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Two utility functions net_nbuf_read_be16() and net_nbuf_read_be32()
added which return either 16 or 32 bit big endian value.
Change-Id: I3401dde75669b429160c602a820359c800671afb
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Source contiki headers only for legacy driver
Change-Id: I356fd65ce9a4ee144c29eed1b51f2f0175315c1c
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
The bug was introduced by commit ID
a136a2587752cca256950b0efd5567ca29117d11
Which led to write junk as an address into cc2520 and thus made the
chip filtering out all unicast packet (as the incoming address never
matched)
Change-Id: I72009e795039f2059177a5b37a4bcf5d9717d65d
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This commit tries to improve inline documentation by refactoring
the original text. Missing information is also added, for example:
function return codes.
Change-Id: I940d4b6fa3e8079323e5e0ec1e5f63407505c9d9
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
As it used directly as the ieee addr.
Propre endianess will have to be solved once this stack will be ported
to other arch than x86.
Change-Id: Ie556fabbd99cc5559025c8392d2f699facb007fa
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
In a case prefix is valid do not return prematurely.
Change-Id: I4d3a7567787c4bd74a2d66a642b632c32e675be3
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Fix returning without linking laddr to the neighbor, return only when
neighbor is not found.
Change-Id: I284d42bf5b3ffde6487f669be0f95ad40368674a
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
At the moment after receiving Neighbor Solicitation from the peer
a new neighbour is created with unassigned lladr resulting in
error later one below:
...
[net/nbr] [ERR] net_nbr_get_lladdr: {assert: 'idx <
CONFIG_NET_IPV6_MAX_NEIGHBORS' failed} idx 255 >= max 8
...
Change-Id: Ieb218fa5e850f018255b6080cbc0c7764595d40c
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
The patch fixes calculation of link address length. In a case of
IEEE802154 link address is 8 bytes long and formula for Source/Target
Link-layer Address calculation gives value 2 * 8 - 2 = 14 bytes.
Change-Id: I27570d4d45d348e53f7f63cb4681a1c8c5150e5e
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
The net_ipv6_set_reachable_time() was incorrectly named, the
correct name is net_if_ipv6_set_reachable_time().
The _if_ prefix needs to be there as the function is located
in net_if.c file.
Change-Id: Ic841328bdff92fbb90f51a199ebbee82d7b1c9fd
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Tests for net_nbuf_read, net_nbuf_write and net_nbuf_skip API's.
Change-Id: I77f702dda8c9df7892120f47ff03a6b256191d31
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Helper functions to read and write data across multiple fragments.
Write function always adds at the end of last fragment. If there is
no space in last fragment new data fragment will be created and added
to input buffer.
Read function start reading from offset of input fragment. If the
required data is located in mutliple fragments it reads from list
of fragments and returns position and fragment where read stopped.
Skip function start skipping from offset of input fragment. If the
required length is across multiple fragments it skip till length and
returns position and fragment where read stopped. This is useful
when reading with unwanted data (reserved or unhandled data).
These functions are quite useful when handling with multiple fragments.
Change-Id: I348b869108724602ae780a1cba4fe17d3af7ffc2
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Distant address is always plain: pan id and address. Using comp
generated a bug where pan_id was overwritten with ll address parts.
Change-Id: I19c6df0b3e7072a3e8d2b9539e5aef69fe309a4a
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
One second timeout seems to be too short as some test runs
fail when run in Jenkins.
Change-Id: Ifb01929148415961712468e3cc85387aac5eb2bb
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
We have no use of configuring cc2520, at built time at least, in
promiscuous mode. So let's get rid of these options for the new driver.
Change-Id: I17611c43bc7ba7961831beaa47cc4e2371f8de61
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
No need to store the nbr pool data into a dedicated section
as we have only one nbr pool defined.
Change-Id: I6f2afcce57b5f588878496bf085567b938e32c80
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Provide a generic API for managing routing entries in the system.
Change-Id: I917a2deaafe3f340a2852ec190817ed27b3d4d7b
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>