Add a callback struct with only the pairing_confirm authentication
method. This is useful both for just-works testing as well as the
recently added fixed passkey support.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Add a new bt_passkey_set() API that can be used to set a fixed passkey
to be used for pairing. The new API also requires a new Kconfig option
to be enabled first (CONFIG_BT_FIXED_PASSKEY).
Fixes#8350
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The code was not doing the right thing when we as peripheral would
send a security request to the central. First of all, the SEQ_REQ flag
was getting cleared by the pairing request handler, resulting in
pairing_confirm() callbacks for no reason. Secondly, the behavior in
encrypt_change() was not utilizing the smp_reset() helper as it should
have done.
Fix the situation by calling smp_init() when sending a security
request, and detect that this has been done when receiving a pairing
request. Also do the appropriate cleanup if the result is an encrypt
change instead of a pairing request (in case we were already paired
with the peer).
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The smp pointer is the return value of CONTAINER_OF() which is
guaranteed to always be non-NULL.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Provide proper documentation for all of the authentication callbacks,
and clarify the usage of the cancel callback. Previously the cancel
callback was always required, even though that doesn't necessarily
make sense now that the pairing_complete/failed callbacks exist.
Fixes#8385
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
There are too many individual requests for Qav related parameters. There
are more Qav parameters that need to be supported (and will be supported
soon - both on the GET and SET side). Handling it the way it was handled
so far would render the eth mgmt API dominated by Qav parameters. That
would make the file hard to read and understand.
Instead of that - use a single GET and SET requests for all Qav
parameters. This works by adding a separate enum with Qav request type
to the ethernet_qav_param struct.
Additionally this approach makes it much easier to document it all since
we now have just a single request and documentation comments in the
ethernet_qav_param struct.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
Print information about supported hardware capabilities for
ethernet interfaces when executing "net iface" command.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If MMU is enabled, always make the BSS section MMU page aligned.
According to the comments, it is always aligned anyway.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The SDK has been packaged for Arch Linux and can be found
in Arch User Repository. Update the docs to make this known.
The package is useful because by installing it the user
gets all dependencies automatically installed.
Signed-off-by: Alexei Colin <ac@alexeicolin.com>
Change logo and increase logo size, remove RTD links to github source,
add CSS for :kbd: role (keyboard key press), change logo link to project
home rather than doc home (via zephyr-custom.js). Update 404 error page
for wider page layout, force page break before footer, show URL that got
you to the 404 page.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
When the SDK/toolchain has been incorrectly installed such that the
user does not have permissions to execute it an incomprehensible
errror message occurs.
This patch tests that executing 'gcc --version' does not give an error
code and errors out with an appropriate error message if it does.
This fixes#8977
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Add descriptions and doxygen groups for app_memory,
stack_protection, stack_randomization and
obj_validation.
Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
If ethernet mgmt is enabled and the driver supports priority queues,
show info about them including the Qav status
(enabled/disabled/unsupported).
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
This commit changes how the fake driver stores info about priority
queues. This allows it to test the Qav status API.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
Add calls responsible for getting and setting on/off status of Qav on
capable priority queues.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
Test that we can define our own system calls in application code
and that fault handling works properly.
Additional tests for base system call infrastructure, outside of
specific system calls, go here.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
We now have functions for handling all the details of copying
data to/from user mode, including C strings and copying data
into resource pool allocations.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Uses fixup infrastructure to safely abort if we get an MPU
fault when examining a string passed in from user mode.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Uses fixup infrastructure to safely abort if we get a page
fault while measuring a string passed in from user mode.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Defines some common macros and data structures for declaring
text section ranges with fixup handler addresses if an
exception occurs.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
ports_enable array holds port clock information.
It is populated for all SoCs, but ports availability depends on
SoCs. The way it is defined today, location of the port in the
array depends on previous ports definition in SoC CMSIS files.
Though, port index is always the same irrespective of previous
ports availability in the SoC.
This will result in incoherency between port index and clock
information.
Fix this by setting a bogus value if port is not defined.
Return an error if bogus value is read.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Only basic features supported initially but more could be added from:
https://www.nxp.com/docs/en/data-sheet/MMA8451Q.pdffixes#9006
A sample app will be provided in a separate PR.
Signed-off-by: Lars Knudsen <larsgk@gmail.com>
Adding IPv4 autoconf sample application that can be used to
test IPv4 autoconf functionality.
Signed-off-by: Matthias Boesl <matthias.boesl@gmail.com>
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add basic IPv4 Link Local support as described in RFC 3927.
Signed-off-by: Matthias Boesl <matthias.boesl@gmail.com>
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
It shouldn't be necessary to disable the mpu for this test. Enable
CONFIG_MPU_ALLOW_FLASH_WRITE=y instead.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
The flash API requires write protection to be disabled before erasing
the flash. It appears that the nordic platforms for which this test was
originally implemented do not enforce the requirement to disable write
protection. The mcux flash driver, however, does enforce the
requirement, so fix the test to make it work on kinetis platforms.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Warnings generated during symbol evaluation were accidentally ignored,
due to checking for warnings before writing .config and autoconf.h
(which indirectly evaluates all symbols).
Move the warning checking code to after writing the configuration to
catch such warnings. kconfig.py still gets rerun if any
warnings-turned-errors show up.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Whoever added Zephyr's prefer-later-defaults Kconfig patch originally
didn't do the same for 'range's. Earlier ranges are still preferred.
Swap the ranges on BT_RFCOMM_L2CAP_MTU to give the intended behavior.
Fixes the following warning for tests/bluetooth/shell/prj_br.conf:
warning: default value 200 on BT_RFCOMM_L2CAP_MTU (defined at
subsys/bluetooth/host/Kconfig:508) clamped to 264 due to being outside
the active range ([264, 32767])
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Essentially all products that support pairing or Mesh need to be able
to support ECC. This is particularly important for traditional
peripheral/central use cases where legacy pairing is considered
insecure. With split builds we don't know if the controller supports
ECC HCI commands or not, however with a combined build we know that
the current controller lacks any special ECC support, so enable
TINYCRYPT_ECC by default for such a configuration.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This app will not fit in the 96b_nitrogen board with ECC enabled.
"real-ld: region `SRAM' overflowed by 68 bytes". Disable the feature
explicitly since a subsequent patch will auto-enable it for all
combined Bluetooth Host-Controller builds.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
OpenThread L2 could've called multicast address registration multiple
times for specific address, which resulted in having multiple entries
containing the same multicast IPv6 address in Zephyr.
Checking if address was already registered prevents that.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Thread registers multiple unicast and multicast adresses by default. As
they are exchanged with Zephyr interface, we need enough buffers to
store them all.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit makes the driver enable HW Qav support for all available
priority queues.
Note that the hardware doesn't support setting the deltaBandwidth
parameter directly, but it is possible to do this by calculating it
from the negotiated link speed.
The default settings are set according to 802.1Qav 34.3.1, that says:
The recommended default value of deltaBandwidth(N) for the highest
numbered traffic class supported is 75%, and for any lower
numbered traffic classes, the recommended default value is 0%.
The default/recommended values can be changed using the ethernet
management API (set_config) - which this commit also adds.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
Handle getting the number of priority queues. The total number of queues
for this driver is configured in kconfig so it is as simple as returning
a defined value in this case.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
Follow the packet sending error code in the driver. If packet
cannot be sent, then return <0 to the caller and do not free
the packet. In practice this is not happening here but follow
this general rule anyway.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
For each driver/model with command line options.
Move its code for the board file into the driver/model file.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Allow command line arguments to be registered dynamically
instead of being statically defined.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>