Adjust length of the packet before setup_ipv4_header() which actually
might increase packet size if there is not enough space available.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Previous approach allowed only single word update for single
function call. Updating context in ISR was inefficient for
controllers supporting automatic multiple data packets transaction.
Signed-off-by: Michał Kruszewski <michal.kruszewski@nordicsemi.no>
Tweaks to the zephyr-doc-theme for improving the API layout
should be applied to the read-the-docs (RTD) theme too.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Fixing regression, address family is now called sa_family.
The testcase.yaml file was missing so no tests were actually run.
After making test to run, it was also failing because link address
was accessed before first fragment was set. This caused null pointer
access.
Fixes#1474
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
I2C device drivers which support DTS have their default boot
configuration provided by DTS. The legacy I2C_x_DEFAULT_CFG
option in Kconfig is no longer required. This patch hides
this option from the Kconfig menu for I2C device drivers which
support DTS.
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
Whenever a buffer is sent to the driver via bt_raw using bt_send() the
buffer might not be consumed if an error is returned. In that case
unreference the buffer to avoid leaking the already allocated net_buf.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Whenever the HCI ACL flow control is violated by the Host, a Data Buffer
Overflow event is now issued by the Controller (if enabled) to notify
the Host of the buffer overrun.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Create support for registering a callback that will be called
if the device leaves or joins IPv6 multicast group.
Jira: ZEP-1673
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Commit cd35742a2 missed one unref too many on pending packet which was
triggering a crash which commit 0b8434f08 tried to fix, but it generates
a leak when there is not pending entries left in arp core. Finally,
fixing what cd35742a2 should have done: removing the extra unecessary
unref after sending the pending packet.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
xtensa uses more stack than other arches, enable the sentinel since we
don't currently have HW-assisted stack checking on this arch.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This new image has the following additions:
- gperf
- cmake
- Zephyr SDK 0.9.2-rc4 for initial testing (in addition to 0.9.1)
- Various python modules needed for building and CI
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
- _arch_user_mode_enter() implemented
- _arch_is_user_context() implemented
- _new_thread() will honor K_USER option if passed in
- System call triggering macros implemented
- _thread_entry_wrapper moved and now looks for the next function to
call in EDI
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Now creating a thread will assign it a unique, monotonically increasing
id which is used to reference the permission bitfield in the kernel
object metadata.
Stub functions in userspace.c now implemented.
_new_thread is now wrapped in a common function with pre- and post-
architecture thread initialization tasks.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
We already check the stack sentinel for outgoing thread when we _Swap,
just leverage that.
The thread state check in _check_stack_sentinel now only exits if the
current thread is a dummy thread.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Thread may be in user mode when it returns and can't look at
_current. Use k_current_get() which will be a system call.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Errors has been ignored when using TLV writer to create/write object
instance/resources. Modify to propagate the error back to the caller.
To reproduce the issue, try to create IPSO light control object
instances twice. Since the default instance count is 1, the second one
should be rejected and responded w/ error. But the current
implementation will respond w/ 2.04.
Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
We did not check the requested object/object instance/resource exists or
not before we adding an observer. Correct it by checking the existence
first.
Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
We should stop sending out notification to the peer when the
object/object instances requested to be observed is removed
Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
We were using sys_slist_remove() to remove object, object instance and
observer w/o passing the previous sys_snode_t to it (NULL).
This will instruct the function to treat the node as the list head and
result in unexpected behavior after the removal.
Correct it by using sys_slist_find_and_remove() or passing the previous
node to the function.
Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
When a request demands to create a new object instance, it will search
whether the request object instance exists or not. However, current
implementation does not reset the lwm2m_engine_obj_inst at the time it
is deleted. It only removes the object instance from the sys list.
Correct the behavior by resetting both object instance and resource
instances at the time it's deleted. Also, consolidate function
lwm2m_delete_handler() and lwm2m_delete_obj_inst().
To reproduce the issue, try to create light control object instance
(/3301), delete the created instance and create it again. You shall find
following error message dumped.
> [ipso_light_control] [ERR] light_control_create: Can not create
instance - already existing: 0
> [lib/lwm2m_engine] [ERR] lwm2m_create_obj_inst: unable to create obj -
3311 instance 0
Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
Currently, we don't have a .conf which enabled BT. This will be
re-enabled at some future date after migrating to the full net_app
APIs by setting CONFIG_NET_APP_BT_NODE=y.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
- There's no point in building up "validity" (declared volatile for some
strange reason), just exit with false return value if any of the page
directory or page table checks don't come out as expected
- The function was returning the opposite value as its documentation
(0 on success, -EPERM on failure). Documentation updated.
- This function will only be used to verify buffers from user-space.
There's no need for a flags parameter, the only option that needs to
be passed in is whether the buffer has write permissions or not.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This will be used by system call handlers to ensure that any memory
regions passed in from userspace are actually accessible by the calling
thread.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
We shouldn't be imposing any policy here, we do not yet use these in
Zephyr. Zero these at boot and otherwise leave alone.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
stm32f417xe and stm32f417xg have been introduced with 2
different defconfig files. Since same code is declared
in both files, mutualize declarations in a single file.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Remove usart2_pins_b as this configuration is not possible
(PA15 could not be mapped on USART2).
Besides usart2_pins_c as this configuration is not used yet,
remove to reserve "usart2_pins_c" for future use
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>