siwx91x_wifi.c starts to contains to much code. Let' simplify it by
grouping all the Access Point related functions in a separated file.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
siwx91x_wifi.c starts to contains to much code. Let's simplify it by
grouping all the scan related functions in a separated file.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Functions in siwx91x_wifi_socket.h are not declared static. So it create
duplicated symbols if the file is included twice.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Remember which DNS server was added by a source like DHCPv4 or v6
message. This will allow system to remove DNS servers that were added by
that source. Then when stopping for example DHCP, we can remove those
specific DNS servers and not leaving DNS servers hanging in the system.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
When try to set twt, system will try to
get interface status firstly.
In shim driver, miss filling twt_capable field.
The twt_capable is set as false by default.
Failed to set twt because of incorrect
twt_capable.
Add enhance code to fill twt_capable field
in shim driver.
Signed-off-by: Qiankun Li <qiankun.li@nxp.com>
This fixes deadlock in socket close path. In the scenario:
1. on_cmd_ipd/esp_socket_rx invokes esp_socket_ref_from_link_id
and increments refcount.
2. zvfs_close/esp_put locks cond.lock.
3. zvfs_close/esp_put waits on sem_free.
4. on_cmd_ipd/esp_socket_rx waits on cond.lock before esp_socket_unref.
5. sem_free waits on esp_socket_unref for refcount reaching zero.
As we detect socket is closing, we can ignore last rx data and escape
from the trap.
Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
This fixes premature socket release. Without this fix, system will crash
because esp_rx thread can still hold reference to the socket in the
following cases:
1. esp_rx thread has got the socket reference but hasn't unref'ed
via esp_socket_unref.
2. esp_rx thread can still get the socket reference for refcount not
being zero in esp_socket_ref.
Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
Automatically initialize NXP Wi-Fi driver and FW for Wi-Fi networking
operation. Disable this setting if Wi-Fi module will be used for
non-Wi-Fi use cases (manufacturing/calibration/test).
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Enable NXP_WIFI_TX_RX_ZERO_COPY for IW610, which will reduce extra memcpy
between net stack and driver in TX data path and avoid the allocation of
RXPD and mlan_buffer in RX data path, to improve the throughput
performance.
Increase CONFIG_NET_BUF_DATA_SIZE to hold one packet in one buffer.
NXP_WIFI_TX_RX_ZERO_COPY can be enabled not only for NXP_RW610 case.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Replaced conditional compilation of `CONFIG_NXP_WIFI_SOFTAP_SUPPORT`
where applicable with IS_ENABLED() macro to improve code readability.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Raising event from driver itself after successful AP start,
instead of waiting for an event from SDK/TA FW. TA used to send an
asynchronous event earlier but currently does not.
Signed-off-by: Muzaffar Ahmed <muzaffar.ahmed@silabs.com>
Add Kconfig to enable/disable Dynamic ED which add support for
proprietary algorithm to enhance performance in high-traffic channels.
Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
Only by default enable NXP_WIFI_TC_RELOCATE for RW612, which will
relocate traffic API into RAM. But for other platform, for example
the RT series, the ITCM/DTCM is a more suitable place for critical
code.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
To reduce low power current value, added host sleep handshake
enhancement. If CPU3 is wokenup by WLAN, do host sleep handshake with
CPU1 as before. For other wakeup sources, skip host sleep handshake.
Signed-off-by: Hui Bai <hui.bai@nxp.com>
When set 'wifi reg_domain' CMD, need to create and download countryinfo
to sync driver and FW for embedded supplicant case
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Instead of using 32 bit enum values for event numbers, convert
the code to use 64 bit long bit fields. This means that the
user API is changed to use 64 bit event values instead of 32
bit event values.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
In the previous code, strnlen could have returned WIFI_SSID_MAX_LEN, and
the following statement ensuring NUL termination would have written one
past the end of the array.
Replace this with code that ensures a NUL termination within the bounds
of the array and then use strlen to compute the length.
Signed-off-by: Keith Packard <keithp@keithp.com>
It seems there is no functional impact, but it makes sense to also update
the state of the interface when AP is started/stopped.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
The interface was properly set "dormant" on disconnect. However on startup,
it arrived in the system with "awake" status. Hence, some configuration
frames were sent before the interface was connected. Then, when the
interface was marked awake after the connection, the frames were not sent
again since the operational mode did not changed.
Therefore, Router Solicitations were not send, the Router Advertisements
were not received and the IPv6 address was not set.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
In the raw data send API, the interface was hardcoded
for client mode. Now, we determine the opermode and
pass the appropriate interface to the raw data API
based on the current opermode.
Signed-off-by: Rahul Gurram <rahul.gurram@silabs.com>
This commit resolves incorrect results in the interface status response.
The parameter for `sl_wifi_get_wireless_info` has changed following the
HAL Silabs update to version 3.5.0.
In AP mode, the implementation now correctly uses the `mac_address`
variable instead of `bssid`.
Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
Power save is not supported in AP mode. This commit ensures that
`-EINVAL` is returned instead of success, preventing incorrect behavior.
Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
The `CONFIG_WIFI` symbol currently covers a number of different
use-cases of Wi-Fi, primarily:
* Wi-Fi AP (Broadcasting a network others can connect to)
* Wi-Fi Station (Connecting to an AP + SSID scanning)
* Wi-Fi AP + Station (Both the above)
* Wi-Fi SSID scanning (SSID scanning only)
Each of these application usages of Wi-Fi requires a different set of
supporting options to operate correctly (`WPA_SUPP`,
`NET_CONNECTION_MANAGER`, etc), and different opportunities for resource
optimisation (System heap, buffer counts, etc).
Currently, optimizing the Wi-Fi drivers depends on driver specific
options, which can be challenging to find and are obviously not portable
across different drivers.
The addition of this choice allows applications to specify in a single
Kconfig option which features of Wi-Fi they use, and enable individual
Wi-Fi drivers to choose defaults based on those features.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Separate out host(local) and FW(remote) statistics and in case of a
FW statistics timeout, return success with a magic value in the FW
statistics, this way atleast host statistics would be handy for
debugging instead of sending failure up.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
- Setting default value of passive scan
dwell time of 400ms as SDK doesn't
configure default value.
Signed-off-by: Nitin Pandey <nitin.pandey@silabs.com>