Evaluate CONFIG_LINKER_ITERABLE_SUBALIGN in CMake instead of in the
linker script.
It cannot be assumed that a linker generator implementation is
pre-processed and therefore Kconfig settings cannot be used in those
but must be evaluated in CMake.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Ensure that the output certificates directory is created, where
generated certificates will be placed. This fixes a build error seen
when using `make` to build samples/net/wifi for the rd_rw612_bga board,
where the output directory for generated certificates did not exist at
build time.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
The L2 function `ieee802154_decipher_data_frame()` relied on upper layer
LL address fields which breaks encapsulation.
Also fixes a bug introduced in another fix that went overboard (#53734).
Fixes: #78490
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
Found a few variable declarations that were not yet moved to the top of
the function/block. Doing this before actually fixing #78490 so that the
fix becomes more readable.
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
When an incoming PAN ID does not match or when an error occurs while
sending association requests, then locks were not properly released.
Fixes: #78495
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
We do not need promiscuous mode setting in host side when testing
bridging with native-sim, so just ignore errors in this case.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
According to Mbed TLS changelog this feature was set default ON
since 3.1.0 release, so the build symbol is no more available.
This commit removes it from Zephyr.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Move the network buffer header file from zephyr/net/buf.h to
zephyr/net_buf.h as the implementation now lives outside of the networking
subsystem.
Add (deprecated) zephyr/net/buf.h header to maintain compatibility with old
file path.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
When virtual interface is being started or stopped so when the
interface is brought up or down, check the return code and pass
it to net_if_up() or net_if_down() calls.
This helps to avoid printing success status even if the interface
up/down failed at the virtual interface level.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The legacy bridging code prevented normal IP traffic to the
bridged Ethernet interfaces. This is not intuitive and differs
how bridging setup works in Linux. This commit changes that and
creates a separate virtual interface that is doing the actual
bridging. This enables the bridged Ethernet interfaces to work
normally and provide IP connectivity.
How this works in practice:
* User needs to enable CONFIG_NET_ETHERNET_BRIDGE
* User needs to have a device with more than one Ethernet
interface
* After booting, the net-shell or program API can be used
to add interfaces to the bridge like this.
net bridge addif 1 3 2
where the 1 is the bridge interface index and
2 and 3 are the Ethernet interface indices.
* The bridging is then finally enabled / started when the
bridge interface 1 is taken up
net iface up 1
* If bridged interfaces are removed from the bridge (minimum
of two interfaces are needed there), then the bridging is
disabled automatically. The bridge interface stays up in
this case and can be taken down manually.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Adds missing checks for get_capabilities method not being NULL.
Fixes crash with netusb and possibly other drivers.
Signed-off-by: Maciej Panek <panekmaciej@outlook.com>
Increase wifi connect input parameters max count to 13. Previous count
7 is not enough if other security type is supported.
When enabling softAP, the parameter cnx_params in cmd_wifi_ap_enable()
is with static key word. Then the parameter will always save
configurations of last time. Remove static keyword to eliminate effects
of configs from last tim and do memset before setting up softAP.
Signed-off-by: Hui Bai <hui.bai@nxp.com>
Increase max count of CONFIG_WIFI_SHELL_MAX_AP_STA from 5 to 8. The
SoftAP of NXP wifi chip can support up to 8 stations.
Signed-off-by: Hui Bai <hui.bai@nxp.com>
Added new flag CONFIG_WIFI_NM_HOSTAPD_AP for hostapd support. Once this
flag is enabled, softAP will be setup by hostapd. Both wpa_supplicant
and hostapd uses same task and eloop.
Included necessary hostapd files when compiling wifi samples if
CONFIG_WIFI_NM_HOSTAPD_AP is enabled. Added hostapd support for all
softAP command of L2 wifi shell commands.
Signed-off-by: Hui Bai <hui.bai@nxp.com>
Improved debuggability of IEEE 802.15.4 network management commands.
Some of these conditions were especially hard to debug (e.g. invalid
channels due to the wrong driver being selected, conflict between
settings, ...)
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
ENABLED suffix does not really makes much sense for a kconfig
so it should be removed. Also other MBEDTLS symbols were recently
updated accordingly.
Moreover having it named exactly the same way as in Mbed TLS
symplifies the understanding of what this kconfig is doing.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
All the network related shell activities should be under
network shell so moving it to "net bridge ..." command.
Add this information to migration guide.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This commit ensures that the state of the address can be changed from
the Deprecated state to the Preferred state.
Additionally, an issue with improper memory comparison size for the mesh
local prefix has been fixed.
Signed-off-by: Łukasz Duda <lukasz.duda@nordicsemi.no>
Add basic WPA2 EAP-TLS support.
Also, add test infrasturcture esp. the certification handling,
non-certificate credentials are take as runtime input and certificated
are build time input for testing.
A real application can set certificates at runtime too.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
- Remove the `strlen`, as it is unnecessary for safe copying.
- Limit the `strncpy` to `sizeof(fsm->terminate_reason) - 1`
to ensure the last byte is reserved for null-termination.
- Add an explicit null terminator to guarantee correct string termination.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Refactor (1 << xyz) to use the BIT(xyz) macro.
The change aims to enhance code readability.
Signed-off-by: Muhammad Haziq <muhammad.haziq@zintechnologies.com>
Introduce `wifi_utils_get_next_chan_6g` to get the next
valid Wi-Fi 6GHz channel.
This commit addresses the proper handling of cases when
`chan_start` is not 1.
Fix#74063
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Enhancing code consistency provides cognitive leverage with
the following changes:
- Unified the order of declaration for `opt`, `opt_index`,
`state`, and `long_options`.
- Unified the wrapping of `getopt_long` calls, regardless of
the length of the `options` string.
- Renamed `option_index` to `opt_index` for consistency.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Using `getopt_state` to access `optarg` and also `optopt` offers
a better alternative to direct global access.
See e145eb9201 for the previous change related to this.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
This change marks the remaining instance of the `struct option` as
`static const`.
The rationale is that `struct option` is a read-only variable.
By using `static const`, we ensure immutability, leading to usage of only
the `.rodata` section and a reduction in the `.data` area.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Various manual code formatting adjustments, including:
- Wrapping lines in the `long_options` declaration to prevent them
from extending too far to the right.
- Adding missing `{` and `}` in the `if` statement in
`cmd_wifi_set_rts_threshold`.
- Aligning `SHELL_CMD_ARG` in `wifi_commands` with previous declarations.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Current PHY rate
It represents the current PHY rate of transfer
of data in bits per second. It will a TX data rate.
Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
Over run count
It represents the number of packets dropped either at
received and sent due to lack of buffer memory to retain
all packets on the network interface.
Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
This commit fixes an issue where deprecated IPv6 addresses were not
being correctly marked. In some cases, deprecated addresses might have
been used as source addresses.
Signed-off-by: Łukasz Duda <lukasz.duda@nordicsemi.no>
For 2.4GHz and 6GHz bands, while counting the channels in configured
range, start of the range is being counted twice. Correct this
by advancing the index by 1 while counting channels in range.
Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
This is related to change in commit dacb3dbfeb
("iterable_sections: move to specific header")
Until now iterable sections APIs have been part of the toolchain
(common) headers. They are not strictly related to a toolchain, they
just rely on linker providing support for sections. Most files relied on
indirect includes to access the API, now, it is included as needed.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The Association permit bit shall be set to zero if the coordinator does
not accept association requests.
Not accepting association request ist not a reason to filter the
beacons from this coordinator during network scan. It is still a
network, just one you cannot associate with.
Signed-off-by: Fabian Pflug <fabian.pflug@grandcentrix.net>