Skip to content

[Backport v4.0.99-ncs1-branch] wifi: Upmerge 3 (fixes only) #2777

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Apr 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions boards/nordic/nrf7002dk/nrf5340_cpuapp_common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@
status = "okay";
};

&lfxo {
load-capacitors = "internal";
load-capacitance-picofarad = <7>;
};

&adc {
status = "okay";
};
Expand Down
29 changes: 7 additions & 22 deletions doc/connectivity/networking/api/wifi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,31 +42,16 @@ Test certificates in PEM format are committed to the repo at :zephyr_file:`sampl
build process the certificates are converted to a C header file that is included by the Wi-Fi shell
module.

If you want to use your own certificates, you can replace the existing certificates with your own certificates in the same directory.

.. code-block:: bash

$ export WIFI_TEST_CERTS_DIR=samples/net/wifi/test_certs/rsa3k
$ cp client.pem $WIFI_TEST_CERTS_DIR
$ cp client-key.pem $WIFI_TEST_CERTS_DIR
$ cp ca.pem $WIFI_TEST_CERTS_DIR
$ cp client2.pem $WIFI_TEST_CERTS_DIR
$ cp client-key2.pem $WIFI_TEST_CERTS_DIR
$ cp ca2.pem $WIFI_TEST_CERTS_DIR
$ cp client.pem samples/net/wifi/test_certs/
$ cp client-key.pem samples/net/wifi/test_certs/
$ cp ca.pem samples/net/wifi/test_certs/
$ cp client2.pem samples/net/wifi/test_certs/
$ cp client-key2.pem samples/net/wifi/test_certs/
$ cp ca2.pem samples/net/wifi/test_certs/
$ west build -p -b <board> samples/net/wifi -S wifi-enterprise

or alternatively copy ``rsa2k`` certificates by changing the ``WIFI_TEST_CERTS_DIR`` environment variable.

.. code-block:: bash

$ export WIFI_TEST_CERTS_DIR=samples/net/wifi/test_certs/rsa2k

or you can set the :envvar:`WIFI_TEST_CERTS_DIR` environment variable to point to the directory containing your certificates.

.. code-block:: bash

$ west build -p -b <board> samples/net/wifi -S wifi-enterprise -- -DWIFI_TEST_CERTS_DIR=<path_to_your_certificates>

Run time certificates
---------------------

Expand All @@ -77,7 +62,7 @@ To facilitate installation of the certificates, a helper script is provided in t

.. code-block:: bash

$ samples/net/wifi/test_certs/install_certs.py -p samples/net/wifi/test_certs/rsa2k
$ ./scripts/utils/wifi_ent_cert_installer.py -p samples/net/wifi/test_certs/rsa2k

The script will install the certificates in the ``rsa2k`` directory to the TLS credentials store in the device over UART and using TLS credentials shell commands.

Expand Down
3 changes: 2 additions & 1 deletion drivers/wifi/nrf_wifi/Kconfig.nrfwifi
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,8 @@ config NRF_WIFI_CTRL_HEAP_SIZE

config NRF_WIFI_DATA_HEAP_SIZE
int "Dedicated memory pool for data plane"
default 8000 if NRF70_SCAN_ONLY || NRF70_RADIO_TEST #TODO: Need to optimize this.
default 0 if NRF70_RADIO_TEST || NRF70_OFFLOADED_RAW_TX
default 8000 if NRF70_SCAN_ONLY
default 110000 if !SOC_FAMILY_NORDIC_NRF
default 130000

Expand Down
4 changes: 4 additions & 0 deletions drivers/wifi/nrf_wifi/src/wpa_supp_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,10 @@ void nrf_wifi_wpa_supp_event_proc_deauth(void *if_priv,
event.deauth_info.ie_len = (frame + frame_len - mgmt->u.deauth.variable);
}

if (!(deauth->valid_fields & NRF_WIFI_EVENT_MLME_RXDEAUTH_FROM_AP)) {
event.deauth_info.locally_generated = 1;
}

if (vif_ctx_zep->supp_drv_if_ctx && vif_ctx_zep->supp_callbk_fns.deauth) {
vif_ctx_zep->supp_callbk_fns.deauth(vif_ctx_zep->supp_drv_if_ctx,
&event, mgmt);
Expand Down
23 changes: 23 additions & 0 deletions modules/nrf_wifi/os/shim.c
Original file line number Diff line number Diff line change
Expand Up @@ -575,11 +575,32 @@ static void *zep_shim_llist_node_alloc(void)
return llist_node;
}

static void *zep_shim_ctrl_llist_node_alloc(void)
{
struct zep_shim_llist_node *llist_node = NULL;

llist_node = zep_shim_mem_zalloc(sizeof(*llist_node));

if (!llist_node) {
LOG_ERR("%s: Unable to allocate memory for linked list node", __func__);
return NULL;
}

sys_dnode_init(&llist_node->head);

return llist_node;
}

static void zep_shim_llist_node_free(void *llist_node)
{
zep_shim_data_mem_free(llist_node);
}

static void zep_shim_ctrl_llist_node_free(void *llist_node)
{
zep_shim_mem_free(llist_node);
}

static void *zep_shim_llist_node_data_get(void *llist_node)
{
struct zep_shim_llist_node *zep_llist_node = NULL;
Expand Down Expand Up @@ -1071,7 +1092,9 @@ const struct nrf_wifi_osal_ops nrf_wifi_os_zep_ops = {
.log_err = zep_shim_pr_err,

.llist_node_alloc = zep_shim_llist_node_alloc,
.ctrl_llist_node_alloc = zep_shim_ctrl_llist_node_alloc,
.llist_node_free = zep_shim_llist_node_free,
.ctrl_llist_node_free = zep_shim_ctrl_llist_node_free,
.llist_node_data_get = zep_shim_llist_node_data_get,
.llist_node_data_set = zep_shim_llist_node_data_set,

Expand Down
29 changes: 0 additions & 29 deletions samples/net/wifi/test_certs/rsa2k/ca.pem

This file was deleted.

29 changes: 0 additions & 29 deletions samples/net/wifi/test_certs/rsa2k/ca2.pem

This file was deleted.

30 changes: 0 additions & 30 deletions samples/net/wifi/test_certs/rsa2k/client-key.pem

This file was deleted.

30 changes: 0 additions & 30 deletions samples/net/wifi/test_certs/rsa2k/client-key2.pem

This file was deleted.

27 changes: 0 additions & 27 deletions samples/net/wifi/test_certs/rsa2k/client.pem

This file was deleted.

27 changes: 0 additions & 27 deletions samples/net/wifi/test_certs/rsa2k/client2.pem

This file was deleted.

30 changes: 0 additions & 30 deletions samples/net/wifi/test_certs/rsa2k/server-key.pem

This file was deleted.

31 changes: 0 additions & 31 deletions samples/net/wifi/test_certs/rsa2k/server.pem

This file was deleted.

Loading
Loading