Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
104057e
[nrf fromtree] modules: hostap: Support bgscan
pdgendt Sep 4, 2025
2e200f1
[nrf fromtree] net: l2: wifi: shell: Add bgscan command
pdgendt Sep 8, 2025
9d73b18
[nrf fromtree] manifest: nrf_wifi: Pull modified API
krish2718 Nov 11, 2025
31e44d3
[nrf fromtree] doc: releases: release-notes: 4.4: Add note on new set…
nordicjm Nov 4, 2025
70150f2
[nrf fromtree] manifest: hostap: Pull fix for SAE
krish2718 Nov 16, 2025
d8ac076
[nrf fromlist] drivers: wifi: nrf_wifi: Set SSID for P2P discovery
rado17 Sep 8, 2025
e9e7321
[nrf fromlist] drivers: wifi: nrf_wifi: Set P2P capability
rado17 Oct 14, 2025
e979d0c
[nrf fromlist] net: wifi: Add Wi-Fi direct P2P discovery API support
kapbh Oct 9, 2025
9fa1524
[nrf fromlist] net: wifi: Add Wi-Fi direct P2P discovery shell comman…
kapbh Oct 29, 2025
8ab95c5
[nrf fromlist] manifest: Update nrf_wifi revision
kapbh Nov 3, 2025
9119862
[nrf fromlist] drivers: wifi: nrf_wifi: Add RoC support
rado17 Oct 30, 2025
a42b55f
[nrf fromlist] drivers: wifi: nrf_wifi: Allow off channel TX for prob…
rado17 Oct 30, 2025
77d625b
[nrf fromlist] drivers: wifi: nrf_wifi: Register frame without match
rado17 Oct 30, 2025
5d30076
[nrf fromlist] modules: hostap: Define heap and stack for P2P support
rado17 Oct 30, 2025
9685904
[nrf fromlist] modules: hostap: Remove obsolete conditional
krish2718 Oct 30, 2025
12c4d0a
[nrf fromlist] net: wifi: Add Wi-Fi direct P2P connect API support
kapbh Oct 31, 2025
7e567aa
[nrf fromlist] net: wifi: Add Wi-Fi direct P2P connect shell command …
kapbh Nov 12, 2025
b2e07f1
[nrf fromlist] drivers: nrf_wifi: Add default value to p2p mode Kconfig
kapbh Nov 7, 2025
fb14cae
[nrf fromlist] modules: hostap: Add support for P2P GO mode ops
rado17 Nov 12, 2025
f9f097a
[nrf fromlist] drivers: wifi: nrf_wifi: Add per-peer authorized flag
rado17 Nov 12, 2025
9f7e922
[nrf fromlist] net: wifi: Add API support for P2P GO mode
kapbh Nov 13, 2025
92d535b
[nrf fromlist] net: wifi: Add Wi-Fi direct P2P GO mode shell command
kapbh Nov 13, 2025
c942476
[nrf fromlist] drivers: wifi: nrf_wifi: Add P2P powersave support
rado17 Nov 17, 2025
b09fc05
[nrf fromlist] drivers: wifi: nrf_wifi: Add cookie handling support
rado17 Nov 17, 2025
69b7cd6
[nrf fromlist] manifest: hostap: Pull in P2P powersave support
rado17 Nov 17, 2025
0ef81d6
[nrf fromlist] net: wifi: Add API support for P2P power save
kapbh Nov 18, 2025
a793a52
[nrf fromlist] net: wifi: Add P2P power save shell command support
kapbh Nov 18, 2025
eb6dd8d
[nrf fromlist] drivers: wifi: nrf_wifi: Suppress 11b rates in P2P scan
rado17 Nov 24, 2025
882271a
[nrf noup] net: l2: wifi: Fix getopt handling
krish2718 Nov 24, 2025
7207c42
[nrf fromtree] doc: releases: 4.4: Add NVMEM entry for flash device s…
pdgendt Nov 14, 2025
b473916
[nrf fromlist] doc: networking: Add Wi-Fi P2P info
kapbh Nov 7, 2025
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
14 changes: 14 additions & 0 deletions doc/connectivity/networking/api/wifi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ The Wi-Fi management API is used to manage Wi-Fi networks. It supports below mod

* IEEE802.11 Station (STA)
* IEEE802.11 Access Point (AP)
* IEEE802.11 P2P (Wi-Fi Direct)

Only personal mode security is supported with below types:

Expand Down Expand Up @@ -215,6 +216,19 @@ The test certificates in ``samples/net/wifi/test_certs/rsa2k`` are generated usi
.. note::
These certificates are for testing only and should not be used in production.

Wi-Fi P2P (Wi-Fi Direct)
************************

Wi-Fi P2P or Wi-Fi Direct enables devices to communicate directly with each other without requiring
a traditional access point. This feature is particularly useful for device-to-device communication
scenarios.

To enable and build with Wi-Fi P2P support:

.. code-block:: bash

$ west build -p -b <board> samples/net/wifi/shell -- -DCONFIG_WIFI_NM_WPA_SUPPLICANT_P2P=y

API Reference
*************

Expand Down
18 changes: 18 additions & 0 deletions doc/releases/release-notes-4.4.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,24 @@ New APIs and options
* :dtcompatible:`jedec,mspi-nor` now allows MSPI configuration of read, write and
control commands separately via devicetree.

* NVMEM

* Flash device support

* :kconfig:option:`CONFIG_NVMEM_FLASH`
* :kconfig:option:`CONFIG_NVMEM_FLASH_WRITE`

* Networking

* Wi-Fi

* Add support for Wi-Fi Direct (P2P) mode.

* Settings

* :kconfig:option:`CONFIG_SETTINGS_SAVE_SINGLE_SUBTREE_WITHOUT_MODIFICATION`
* :kconfig:option:`CONFIG_SETTINGS_SAVE_SINGLE_SUBTREE_WITHOUT_MODIFICATION_VALUE_SIZE`

.. zephyr-keep-sorted-stop

New Boards
Expand Down
1 change: 1 addition & 0 deletions drivers/wifi/nrf_wifi/Kconfig.nrfwifi
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ config NRF70_ENABLE_DUAL_VIF

config NRF70_P2P_MODE
bool "P2P support in driver"
default y if WIFI_NM_WPA_SUPPLICANT_P2P

config NRF70_SYSTEM_WITH_RAW_MODES
bool "nRF70 system mode with raw modes"
Expand Down
3 changes: 0 additions & 3 deletions drivers/wifi/nrf_wifi/inc/fmac_main.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ struct nrf_wifi_vif_ctx_zep {
#endif /* CONFIG_NET_STATISTICS_ETHERNET_VENDOR */
struct net_stats_eth eth_stats;
#endif /* CONFIG_NET_STATISTICS_ETHERNET */
#if defined(CONFIG_NRF70_STA_MODE) || defined(CONFIG_NRF70_RAW_DATA_RX)
bool authorized;
#endif
#ifdef CONFIG_NRF70_STA_MODE
unsigned int assoc_freq;
enum nrf_wifi_fmac_if_carr_state if_carr_state;
Expand Down
10 changes: 10 additions & 0 deletions drivers/wifi/nrf_wifi/inc/wpa_supp_if.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,18 @@
void nrf_wifi_supp_event_proc_get_conn_info(void *os_vif_ctx,
struct nrf_wifi_umac_event_conn_info *info,
unsigned int event_len);
void nrf_wifi_supp_event_remain_on_channel(void *os_vif_ctx,
struct nrf_wifi_event_remain_on_channel *info,
unsigned int event_len);
void nrf_wifi_supp_event_roc_cancel_complete(void *os_vif_ctx,
struct nrf_wifi_event_remain_on_channel *info,
unsigned int event_len);
int nrf_wifi_supp_set_country(void *if_priv, const char *alpha2);
int nrf_wifi_supp_get_country(void *if_priv, char *alpha2);
int nrf_wifi_supp_remain_on_channel(void *if_priv, unsigned int freq,
unsigned int duration, u64 host_cookie);
int nrf_wifi_supp_cancel_remain_on_channel(void *if_priv, u64 rpu_cookie);

Check notice on line 136 in drivers/wifi/nrf_wifi/inc/wpa_supp_if.h

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

drivers/wifi/nrf_wifi/inc/wpa_supp_if.h:136 - struct nrf_wifi_event_remain_on_channel *info, - unsigned int event_len); + struct nrf_wifi_event_remain_on_channel *info, + unsigned int event_len); void nrf_wifi_supp_event_roc_cancel_complete(void *os_vif_ctx, - struct nrf_wifi_event_remain_on_channel *info, - unsigned int event_len); + struct nrf_wifi_event_remain_on_channel *info, + unsigned int event_len); int nrf_wifi_supp_set_country(void *if_priv, const char *alpha2); int nrf_wifi_supp_get_country(void *if_priv, char *alpha2); -int nrf_wifi_supp_remain_on_channel(void *if_priv, unsigned int freq, - unsigned int duration, u64 host_cookie); +int nrf_wifi_supp_remain_on_channel(void *if_priv, unsigned int freq, unsigned int duration, + u64 host_cookie);
int nrf_wifi_supp_set_p2p_powersave(void *if_priv, int legacy_ps, int opp_ps, int ctwindow);

#endif /* CONFIG_NRF70_STA_MODE */
#ifdef CONFIG_NRF70_AP_MODE
Expand Down
10 changes: 10 additions & 0 deletions drivers/wifi/nrf_wifi/src/fmac_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,12 @@
/* TODO: When supp_callbk_fns.mgmt_tx_status is implemented, add logic
* here to use the cookie and host_cookie to map requests to responses.
*/
if (vif_ctx_zep->supp_drv_if_ctx &&
vif_ctx_zep->supp_callbk_fns.cookie_event) {
vif_ctx_zep->supp_callbk_fns.cookie_event(vif_ctx_zep->supp_drv_if_ctx,
cookie_rsp_event->host_cookie, cookie_rsp_event->cookie);
}
}

Check notice on line 460 in drivers/wifi/nrf_wifi/src/fmac_main.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

drivers/wifi/nrf_wifi/src/fmac_main.c:460 - if (vif_ctx_zep->supp_drv_if_ctx && - vif_ctx_zep->supp_callbk_fns.cookie_event) { + if (vif_ctx_zep->supp_drv_if_ctx && vif_ctx_zep->supp_callbk_fns.cookie_event) { vif_ctx_zep->supp_callbk_fns.cookie_event(vif_ctx_zep->supp_drv_if_ctx, - cookie_rsp_event->host_cookie, cookie_rsp_event->cookie); - } + cookie_rsp_event->host_cookie, + cookie_rsp_event->cookie); + }
#endif /* CONFIG_NRF70_STA_MODE */

void reg_change_callbk_fn(void *vif_ctx,
Expand Down Expand Up @@ -843,6 +848,8 @@
callbk_fns.event_get_wiphy = nrf_wifi_wpa_supp_event_get_wiphy;
callbk_fns.mgmt_rx_callbk_fn = nrf_wifi_wpa_supp_event_mgmt_rx_callbk_fn;
callbk_fns.get_conn_info_callbk_fn = nrf_wifi_supp_event_proc_get_conn_info;
callbk_fns.roc_callbk_fn = nrf_wifi_supp_event_remain_on_channel;
callbk_fns.roc_cancel_callbk_fn = nrf_wifi_supp_event_roc_cancel_complete;
#endif /* CONFIG_NRF70_STA_MODE */

/* The OSAL layer needs to be initialized before any other initialization
Expand Down Expand Up @@ -963,6 +970,9 @@
.get_conn_info = nrf_wifi_supp_get_conn_info,
.set_country = nrf_wifi_supp_set_country,
.get_country = nrf_wifi_supp_get_country,
.remain_on_channel = nrf_wifi_supp_remain_on_channel,
.cancel_remain_on_channel = nrf_wifi_supp_cancel_remain_on_channel,
.set_p2p_powersave = nrf_wifi_supp_set_p2p_powersave,
#ifdef CONFIG_NRF70_AP_MODE
.init_ap = nrf_wifi_wpa_supp_init_ap,
.start_ap = nrf_wifi_wpa_supp_start_ap,
Expand Down
15 changes: 13 additions & 2 deletions drivers/wifi/nrf_wifi/src/net_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

#include "util.h"
#include "common/fmac_util.h"
#include "system/fmac_peer.h"
#include "shim.h"
#include "fmac_main.h"
#include "wpa_supp_if.h"
Expand Down Expand Up @@ -388,6 +389,8 @@
struct rpu_host_stats *host_stats = NULL;
void *nbuf = NULL;
bool locked = false;
unsigned char *ra = NULL;
int peer_id = -1;

if (!dev || !pkt) {
LOG_ERR("%s: vif_ctx_zep is NULL", __func__);
Expand Down Expand Up @@ -436,12 +439,20 @@
nbuf);
} else {
#endif /* CONFIG_NRF70_RAW_DATA_TX */

ra = nrf_wifi_util_get_ra(sys_dev_ctx->vif_ctx[vif_ctx_zep->vif_idx], nbuf);
peer_id = nrf_wifi_fmac_peer_get_id(rpu_ctx_zep->rpu_ctx, ra);
if (peer_id == -1) {
nrf_wifi_osal_log_dbg("%s: Invalid peer",
__func__);
goto out;

Check notice on line 448 in drivers/wifi/nrf_wifi/src/net_if.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

drivers/wifi/nrf_wifi/src/net_if.c:448 - nrf_wifi_osal_log_dbg("%s: Invalid peer", - __func__); + nrf_wifi_osal_log_dbg("%s: Invalid peer", __func__);
}

if ((vif_ctx_zep->if_carr_state != NRF_WIFI_FMAC_IF_CARR_STATE_ON) ||
(!vif_ctx_zep->authorized && !is_eapol(pkt))) {
(!sys_dev_ctx->tx_config.peers[peer_id].authorized && !is_eapol(pkt))) {
ret = -EPERM;
goto drop;
}

ret = nrf_wifi_fmac_start_xmit(rpu_ctx_zep->rpu_ctx,
vif_ctx_zep->vif_idx,
nbuf);
Expand Down
32 changes: 25 additions & 7 deletions drivers/wifi/nrf_wifi/src/wifi_mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "system/fmac_api.h"
#include "system/fmac_tx.h"
#include "common/fmac_util.h"
#include "common/fmac_structs_common.h"
#include "fmac_main.h"
#include "wifi_mgmt.h"

Expand Down Expand Up @@ -757,6 +758,8 @@
struct nrf_wifi_vif_ctx_zep *vif_ctx_zep = NULL;
struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx = NULL;
struct nrf_wifi_sys_fmac_dev_ctx *sys_dev_ctx = NULL;
struct peers_info *peer = NULL;
int i = 0;
int ret = -1;

if (!dev || !mode) {
Expand Down Expand Up @@ -798,10 +801,16 @@
goto out;
}

if (vif_ctx_zep->authorized && (mode->mode == NRF_WIFI_MONITOR_MODE)) {
LOG_ERR("%s: Cannot set monitor mode when station is connected",
__func__);
goto out;
for (i = 0; i < MAX_PEERS; i++) {
peer = &sys_dev_ctx->tx_config.peers[i];
if (peer->peer_id == -1) {
continue;
}
if (peer->authorized && (mode->mode == NRF_WIFI_MONITOR_MODE)) {
LOG_ERR("%s: Cannot set monitor mode when station is connected",
__func__);
goto out;
}

Check notice on line 813 in drivers/wifi/nrf_wifi/src/wifi_mgmt.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

drivers/wifi/nrf_wifi/src/wifi_mgmt.c:813 - goto out; + goto out;
}

/**
Expand Down Expand Up @@ -851,6 +860,8 @@
struct nrf_wifi_vif_ctx_zep *vif_ctx_zep = NULL;
struct nrf_wifi_sys_fmac_dev_ctx *sys_dev_ctx = NULL;
struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx = NULL;
struct peers_info *peer = NULL;
int i = 0;
int ret = -1;

if (!dev || !channel) {
Expand All @@ -864,9 +875,16 @@
return ret;
}

if (vif_ctx_zep->authorized) {
LOG_ERR("%s: Cannot change channel when in station connected mode", __func__);
return ret;
for (i = 0; i < MAX_PEERS; i++) {
peer = &sys_dev_ctx->tx_config.peers[i];
if (peer->peer_id == -1) {
continue;
}
if (peer->authorized) {
LOG_ERR("%s: Cannot change channel when in station connected mode",
__func__);
return ret;
}
}

rpu_ctx_zep = vif_ctx_zep->rpu_ctx_zep;
Expand Down
Loading
Loading