If the hw supports filtering, L2 will apply the ieee address, short
address or PAN ID filters.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This will replace the current mandatory set_ieee_addr, set_short_addr
and set_pan_id functions, which are only valid if the hardware is
supporting filtering. Which is not the case on some chips.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Using radio's get_capabilities, it is possible to know if the driver can
get CSMA work handed-over.
For now, up to device drivers to use
CONFIG_NET_L2_IEEE802154_RADIO_CSMA_CA_* parameters.
Let's see if it will be interesting at some point to enable runtime
modification of these parameters.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Further support will need work per-driver basis, as soon as the L2 will
be able to make usage of such support.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This will be useful to know various generic hardware aspects that can be
used relevantly by the L2 layer.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Now that lqi and rssi are embedded into net_pkt, there is no need for
that function.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Instead of having dedicated function on the radio api level for 15.4,
let's just add the relevant values to the net_pkt structure (if only
IEEE802154 is enabled). It's simpler and make the values relevantly
tied to the received packet.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Fixed a missing reset of FC feature on HCI reset. This
feature provided a simple connection handle based event
exclusions, but this is no longer needed with the
support for controller to host flow control. This feature
should be removed in the future.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add support for flashing targets compatible with esp32.sh.
Only tested by comparing commands that would be run.
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
Add support for flashing targets compatible with bossa-flash.sh.
This is something of a bug-for-bug reimplementation, as the existing
flashing script makes some potentially unsafe assumptions.
Only tested by comparing commands that would be run.
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
Add support for flashing targets compatible with pyocd.sh.
Tested on 96b_nitrogen, nrf52_blenano2, and frdm_k64f, with and
without PYOCD_BOARD_ID. Additionally, frdm_k64f was tested with
PYOCD_DAPARG_ARG='limit_packets=True'.
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
Zephyr board flashing and debugging is done via shell scripts. It
would improve the CMake transition to remove the shell dependency.
Add zephyr_flash_debug.py to allow phasing out the shell scripts.
This takes two arguments:
- a command (eventually flash, debug, and debugserver, but just flash
for now)
- the path to the corresponding shell script
zephyr_flash_debug.py runs the command in pure Python if it
knows how. Otherwise, it falls back on the shell script. In
this patch, it always falls back. Subsequent patches add support
for existing flash backends.
Invoke zephyr_flash_debug.py from the Makefile flash target, but only
if USE_ZEPHYR_FLASH_DEBUG_SHELL is empty. This lets users keep existing
behavior in case of issues, and can be removed later once the Python
script is more widely tested.
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
A connection might have gotten disconnected by the time that an ACL
buffer is free up, in which case there is no need to send a HCI
command for it.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This is subject to the constraint that such system calls must have a
return value which is "u64_t" or "s64_t".
So far all the relevant kernel calls just have zero or one arguments,
we can later add more _syscall_ret64_invokeN() APIs as needed.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
User threads aren't trusted and shouldn't be able to alter the
scheduling assumptions of the system by making thread priorities more
favorable.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
We now have macros which should significantly reduce the amount of
boilerplate involved with defining system call handlers.
- Macros which define the proper prototype based on number of arguments
- "SIMPLE" variants which create handlers that don't need anything
other than object verification
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
- Dumping error messages split from _k_object_validate(), to avoid spam
in test cases that are expected to have failure result.
- _k_object_find() prototype moved to syscall_handler.h
- Clean up k_object_access() implementation to avoid double object
lookup and use single validation function
- Added comments, minor whitespace changes
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
When a peer master performed a PHY update procedure with no
change, the state machine was not released. This blocked
any future local initiation of the procedure and also
leading to termination of connection with reason LMP
response timeout.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Computing the total size of the array need to handle the case where
the product overflow a 32-bit unsigned integer.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Use new _SYSCALL_OBJ/_SYSCALL_OBJ_INIT macros.
Use new _SYSCALL_MEMORY_READ/_SYSCALL_MEMORY_WRITE macros.
Some non-obvious checks changed to use _SYSCALL_VERIFY_MSG.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Instead of boolean arguments to indicate memory read/write
permissions, or init/non-init APIs, new macros are introduced
which bake the semantics directly into the name of the macro.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Expecting stringified expressions to be completely comprehensible to end
users is wishful thinking; we really need to express what a failed
system call verification step means in human terms in most cases.
Memory buffer and kernel object checks now are implemented in terms of
_SYSCALL_VERIFY_MSG.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This API only gets used inside system call handlers and a specific test
case dedicated to it. Move definition to the private kernel header along
with the rest of the defines for system call handlers.
A non-userspace inline variant of this function is unnecessary and has
been deleted.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Userspace is built on top of hardware stack protection and assumes
it is there. We can't enable this unless ARCH_HAS_USERSPACE is defined
anyway.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
On ARM, a zero memory address actually falls within the expected bounds
of kernel memory.
Move the NULL check outside the bounds check, so that kernel objects
with NULL memory addresses in the DWARF info (because gc-sections
discarded them) won't confound the script's logic.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Fixed the usage of NRF_AAR peripheral for controller privacy
to clear events on configure and on every radio ISR entry.
Without this fix, there was spurious AAR matches leading to
controller asserts.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
The test should only run on platforms where CONFIG_USERSPACE
dependencies are met.
Remove the whitelist, the filter will capture the right platforms.
Fixes: #4050
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
To avoid making a system call for every character emitted, there is now
a small line buffer if userspace is enabled. The interface to the kernel
is a new system call which takes a sized buffer of console data.
If userspace is not enabled this works like before.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Write-block-size values were filled for nRF5, STM32, QMSI, MCUX and
w25qxxdv devices.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
This path introduce API for retrieving a minimum write-block-size
supported by the flash driver.
This value can differ from the hardware alignment requirement
(as it does for nRF5x).
As the driver has a certain requirement for alignment
when writing, it is necessary to export this value for upper modules
which need to know the write-block-size (for instance, NFFS needs this).
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
There are several issues with the dev_config union used as a
convenience when calling the i2c_configure api. One, the union is well
name spaced protected and doesn't convey use with just i2c. Second
there are assumptions of how the bits might get packed by the union
which can't be guaranteed. Since the API takes a u32_t lets change in
tree uses to using the macros to setup a u32_t and make the union as
deprecated.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
ztest unit tests run on the host system, so provide those empty files to
make it build host tests. Those files are auto-generated and not
available when building unit tests.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
because we do not use ini files anymore, to avoid confusion, rename this
to be yamlfile, which is the format we use for testcases now.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>