The API name space for Bluetooth is bt_* and BT_* so it makes sense to
align the Kconfig name space with this. The additional benefit is that
this also makes the names shorter. It is also in line with what Linux
uses for Bluetooth Kconfig entries.
Some Bluetooth-related Networking Kconfig defines are renamed as well
in order to be consistent, such as NET_L2_BLUETOOTH.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
We need to define __LINUX_ERRNO_EXTENSIONS__ if newlib is being
used otherwise there is a compile error about ESHUTDOWN errno
value missing.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
- Fix typo'd "&&" when checking bit value
- Don't use NET_EVENT_IPV6_ADDR_ADD for checking mask value
due to combination of bits: _NET_EVENT_IPV6_BASE |
NET_EVENT_IPV6_CMD_ADDR_ADD
Instead use NET_EVENT_IPV6_CMD_ADDR_ADD so the check works
when NET_EVENT_IPV6_ROUTER_ADD is enabled.
Tested fix with echo_server on x86 qemu where it was previously
broken.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
This enables IPSP node role which requires IPSS GATT service to be
registered.
Jira: ZEP-2451
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Some network interfaces such as bluetooth 6lowpan can start without
an assigned IP address and then later once the connection is up a
router advertisement broadcast will assign the IP address.
The net_app framework will timeout out during network init if a value
cannot be parsed from CONFIG_NET_APP_MY_IPV6_ADDR. Let's adjust
the framework to handle a missing value there and fill it in later
when the IPv6 address is added to the interface.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Historically, stacks were just character buffers and could be treated
as such if the user wanted to look inside the stack data, and also
declared as an array of the desired stack size.
This is no longer the case. Certain architectures will create a memory
region much larger to account for MPU/MMU guard pages. Unfortunately,
the kernel interfaces treat both the declared stack, and the valid
stack buffer within it as the same char * data type, even though these
absolutely cannot be used interchangeably.
We introduce an opaque k_thread_stack_t which gets instantiated by
K_THREAD_STACK_DECLARE(), this is no longer treated by the compiler
as a character pointer, even though it really is.
To access the real stack buffer within, the result of
K_THREAD_STACK_BUFFER() can be used, which will return a char * type.
This should catch a bunch of programming mistakes at build time:
- Declaring a character array outside of K_THREAD_STACK_DECLARE() and
passing it to K_THREAD_CREATE
- Directly examining the stack created by K_THREAD_STACK_DECLARE()
which is not actually the memory desired and may trigger a CPU
exception
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Add API that allows net-shell to get net_app context information
that can be used to debug net_app connections.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If IEEE 802.15.4 is enabled, then setup the network settings
automatically so that the device is ready for IP configuration.
This is only done if CONFIG_NET_APP_AUTO_INIT is enabled, which
is currently the default.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If either UDP or TCP is enabled but not both, then connectivity
fails. This was a side effect of commit 3604c391e ("net: udp:
Remove NET_UDP_HDR() macro and direct access to net_buf")
Jira: ZEP-2380
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Upcoming memory protection features will be placing some additional
constraints on kernel objects:
- They need to reside in memory owned by the kernel and not the
application
- Certain kernel object validation schemes will require some run-time
initialization of all kernel objects before they can be used.
Per Ben these initializer macros were never intended to be public. It is
not forbidden to use them, but doing so requires care: the memory being
initialized must reside in kernel space, and extra runtime
initialization steps may need to be peformed before they are fully
usable as kernel objects. In particular, kernel subsystems or drivers
whose objects are already in kernel memory may still need to use these
macros if they define kernel objects as members of a larger data
structure.
It is intended that application developers instead use the
K_<object>_DEFINE macros, which will automatically put the object in the
right memory and add them to a section which can be iterated over at
boot to complete initiailization.
There was no K_WORK_DEFINE() macro for creating struct k_work objects,
this is now added.
k_poll_event and k_poll_signal are intended to be instatiated from
application memory and have not been changed.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
When neither IPv4 nor IPv6 are selected the limit that is
passed to k_sem_init will end up being 0, which will trigger
the folowing assertion in k_sem_init;
__ASSERT(limit != 0, "limit cannot be zero");
Fixed by not passing count as initial and limit value but
only as initial value and use UINT_MAX as limit.
Signed-off-by: Erwin Rol <erwin@erwinrol.com>
The network application API is a higher level API for creating
client and server type applications. Instead of applications
dealing with low level details, the network application API
provides services that most of the applications can use directly.
This commit removes the internal net_sample_*() API and converts
the existing users of it to use the new net_app API.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>