Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
55b1572
[nrf fromtree] samples: net: wifi: Add TLSv1.3 support in wifi example
nxf58150 Aug 11, 2025
024b941
[nrf fromtree] manifest: hostap: Pull hostap changes required for mul…
krish2718 Sep 15, 2025
0e195b9
[nrf fromtree] modules: hostap: Update WPA supplicant to use per-VIF …
krish2718 Sep 15, 2025
0460115
[nrf fromtree] manifest: update hostap module to correct time.h and s…
cfriedt Sep 25, 2025
260fcbe
[nrf fromtree] manifest: update hostap revision for bgscan fix
pdgendt Sep 5, 2025
1a99519
[nrf fromtree] manifest: update hostap to fix EAP-FAST connection issue
MaochenWang1 Oct 20, 2025
88e7734
[nrf fromtree] manifest: hostap: Pull fix for SoftAP start
krish2718 Oct 21, 2025
ab298d2
[nrf fromtree] modules: hostap: Support bgscan
pdgendt Sep 4, 2025
0314f67
[nrf fromtree] net: l2: wifi: shell: Add bgscan command
pdgendt Sep 8, 2025
094454d
[nrf fromlist] drivers: wifi: nrf_wifi: Set SSID for P2P discovery
rado17 Sep 8, 2025
99466e3
[nrf fromlist] drivers: wifi: nrf_wifi: Set P2P capability
rado17 Oct 14, 2025
645fc9a
[nrf fromlist] net: wifi: Add Wi-Fi direct P2P discovery API support
kapbh Oct 9, 2025
96cce0d
[nrf fromlist] net: wifi: Add Wi-Fi direct P2P discovery shell comman…
kapbh Oct 29, 2025
9a807df
[nrf fromlist] manifest: Update hostap revision
rado17 Oct 14, 2025
290003e
[nrf fromlist] manifest: Update nrf_wifi revision
kapbh Nov 3, 2025
37265b3
[nrf fromlist] drivers: wifi: nrf_wifi: Add RoC support
rado17 Oct 30, 2025
711c924
[nrf fromlist] drivers: wifi: nrf_wifi: Allow off channel TX for prob…
rado17 Oct 30, 2025
f274322
[nrf fromlist] drivers: wifi: nrf_wifi: Register frame without match
rado17 Oct 30, 2025
e6f8978
[nrf fromlist] modules: hostap: Define heap and stack for P2P support
rado17 Oct 30, 2025
d34f8c5
[nrf fromlist] modules: hostap: Remove obsolete conditional
krish2718 Oct 30, 2025
9ccd57c
[nrf fromlist] net: wifi: Add Wi-Fi direct P2P connect API support
kapbh Oct 31, 2025
f982234
[nrf fromlist] net: wifi: Add Wi-Fi direct P2P connect shell command …
kapbh Nov 12, 2025
28daad8
[nrf fromlist] drivers: nrf_wifi: Add default value to p2p mode Kconfig
kapbh Nov 7, 2025
c667e9c
[nrf fromlist] doc: networking: Add Wi-Fi P2P info
kapbh Nov 7, 2025
e904bf9
[nrf fromlist] modules: hostap: Add support for P2P GO mode ops
rado17 Nov 12, 2025
0edcbac
[nrf fromlist] modules: hostap: Increase hostap heap size
rado17 Nov 12, 2025
b4f22ef
[nrf fromlist] drivers: wifi: nrf_wifi: Add per-peer authorized flag
rado17 Nov 12, 2025
ccd72ab
[nrf fromlist] net: wifi: Add API support for P2P GO mode
kapbh Nov 13, 2025
0074a3e
[nrf fromlist] net: wifi: Add Wi-Fi direct P2P GO mode shell command
kapbh Nov 13, 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 @@ -192,6 +193,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 -- -DCONFIG_WIFI_NM_WPA_SUPPLICANT_P2P=y

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

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
8 changes: 8 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,16 @@
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_roc_complete(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);

Check notice on line 132 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:132 - 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_get_country(void *if_priv, char *alpha2);
int nrf_wifi_supp_remain_on_channel(void *if_priv, unsigned int freq, unsigned int duration);
int nrf_wifi_supp_cancel_remain_on_channel(void *if_priv);

#endif /* CONFIG_NRF70_STA_MODE */
#ifdef CONFIG_NRF70_AP_MODE
Expand Down
4 changes: 4 additions & 0 deletions drivers/wifi/nrf_wifi/src/fmac_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,8 @@ static int nrf_wifi_drv_main_zep(const struct device *dev)
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_roc_complete;
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 +965,8 @@ static const struct zep_wpa_supp_dev_ops wpa_supp_ops = {
.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,
#ifdef CONFIG_NRF70_AP_MODE
.init_ap = nrf_wifi_wpa_supp_init_ap,
.start_ap = nrf_wifi_wpa_supp_start_ap,
Expand Down
19 changes: 15 additions & 4 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 */
if ((vif_ctx_zep->if_carr_state != NRF_WIFI_FMAC_IF_CARR_STATE_ON) ||
(!vif_ctx_zep->authorized && !is_eapol(pkt))) {
ret = -EPERM;
goto drop;

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_err("%s: Invalid peer",
__func__);
goto out;
}

if ((vif_ctx_zep->if_carr_state != NRF_WIFI_FMAC_IF_CARR_STATE_ON) ||

Check warning on line 451 in drivers/wifi/nrf_wifi/src/net_if.c

View workflow job for this annotation

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

SUSPECT_CODE_INDENT

drivers/wifi/nrf_wifi/src/net_if.c:451 suspect code indent for conditional statements (16, 32)
(!sys_dev_ctx->tx_config.peers[peer_id].authorized && !is_eapol(pkt))) {
ret = -EPERM;
goto drop;
}

Check notice on line 455 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:455 - nrf_wifi_osal_log_err("%s: Invalid peer", - __func__); + nrf_wifi_osal_log_err("%s: Invalid peer", __func__); goto out; } if ((vif_ctx_zep->if_carr_state != NRF_WIFI_FMAC_IF_CARR_STATE_ON) || - (!sys_dev_ctx->tx_config.peers[peer_id].authorized && !is_eapol(pkt))) { - ret = -EPERM; - goto drop; + (!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
Loading
Loading