In case of a busy environment and if STA is far, then we see many
retries for the frames that cause the RPU to be awake though host has
de-asserted wakeup_now signal, this leads to WDT interrupt and host
thinks that it has given sleep opportunity to RPU and initiates a
recovery.
To handle this, increase the sleep opportunity window to 5s to cover all
the retries, this solves the false recovery problem. While at it, also
increase the range, no reason to limit to lower window. And update the
help text with the warning about power consumption.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Firmware needs to know the connection type to be established.
use the wpa_proto field to derive the connection type.
Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
When running Zperf traffic + scan in the background eventual we hit a
deadlock:
* sysworkq: recovery->stop_zep->vif_lock->hal_disable->wait lock_rx
* nrf70_bh_wq: event_tasklet->lock_rx->disp_scan_done->
disp_scan_res_get_zep-> waiting on vif_lock
The traffic triggers recovery (another bug) and conflicts with display
scan.
Fix by moving scan results processing to system workqueue instead of
doing it in the FMAC event callback context, this is how supplicant scan
also works.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Monitor mode doesn't require station mode. Disabling station mode
require necessary changes to work monitor mode.
Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
Automatically hide the nRF7x interface from the connection manager if
the TX path is disabled (scan only mode). This prevents function calls
like `conn_mgr_all_if_up(true)` from bringing up the interface which
can never result in a connection.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Rpu recovey debug stats are stored in hal_dev_ctx which is not
persistent in case of interface is brought down/up. Need to add
in nrf_wifi_ctx_zep and update before interface goes down.
Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
Deleted a redundant check for 'rpu_ctx_zep' pointer after it was already
dereferenced.
Clarifies code logic in nrf_wifi_get_power_save_config function.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
s/net_if_get_by_ifindex/net_if_get_by_iface/
Fixes: 0e57844b2d ("drivers: wifi: esp_at: Bind DNS to device net
interface")
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Defaults cannot be overidden (even with configdefault extension), they
only work if the original symbol is defined after the override e.g.,
"drivers and then subsys/net" but for kernel symbols,the default value
overrides don't work due "kernel and drivers" order, the kernel defines
the original symbol with the default and then it cannot be overridden.
Move the kernel symbol override to the original definition to make it
affect. Else any sample that uses nRF70 but doesn't enable WPA
supplicant ends up with 1024 and crashes.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
When external station connects to soft ap,
fill ap_sta_info.twt_capable with external
station HE capability.
Signed-off-by: Qiankun Li <qiankun.li@nxp.com>
1. When external stations connect to soft ap,
Wi-Fi driver will send UAP_CLIENT_ASSOC event with data.
nxp_wifi_wlan_event_callback will be called to process this event.
2. The data should include some basic station information
but not only mac address of station.
3. Fill ap_sta_info with information of
connected station but not soft ap self.
4. Fix: Wi-Fi driver send UAP_CLIENT_ASSOC event
with basic station information.
5. Fix: ap_sta_info with information of connected station.
Signed-off-by: Qiankun Li <qiankun.li@nxp.com>
The preferred way to reference the size of the MAC address is
WIFI_MAC_ADDR_LEN.
For consistency, replace ARRAY_SIZE(mac.octet) with WIFI_MAC_ADDR_LEN.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
We avoid to assign unused values during declaration. Hence, the reader
knows that every value assigned are meaningful. It also allow compile to
raise true warning if a value is used uninitialized.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Usually, the exception are treated in a condition before the nominal
case:
ret = f();
if (ret) {
return -EXXX;
}
... nominal case ...
siwx91x_on_join_ipv4() and siwx91x_on_join_ipv6() didn't follow this
pattern.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
sl_wifi_interface_t interface is always initialized with
sl_wifi_get_default_interface().
Let's assign the value during the declaration everywhere.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Unify the way the error code are tested:
- sl_status_t is an alias to an int. The compiler won't complain if an
int is assigned or compared to a sl_status_t. In the other hand,
"int" is well known to manage error code. So, just use "int"
everywhere.
- Always name the return code "ret"
- Unless it is meaningful, test the value of ret against 0
(SL_STATUS_OK is just a convoluted way to say 0).
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
siwx91x_wifi.c starts to contains to much code. Let' simplify it by
grouping all the station 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 power-save 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' 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>