Skip to content

Conversation

@rado17
Copy link
Contributor

@rado17 rado17 commented Oct 31, 2025

No description provided.

nxf58150 and others added 20 commits October 31, 2025 03:07
Add TLSv1.3 support in wifi example for RW612 and IW610.

Signed-off-by: Hui Bai <[email protected]>
(cherry picked from commit 439d9a9)
…tiple VIF

This commit links the hostap PR required for the nrf7002 driver.
west.yml is updated

Signed-off-by: Hanan Arshad <[email protected]>
Signed-off-by: Chaitanya Tata <[email protected]>
(cherry picked from commit c99a526)
…ignal.h paths

Update the hostap module to use non-prefixed paths for the ISO C time.h
and signal.h headers.

Signed-off-by: Chris Friedt <[email protected]>
(cherry picked from commit 5a7a574)
The hostap module is updated with a build fix fetched from upstream.

Signed-off-by: Pieter De Gendt <[email protected]>
(cherry picked from commit 7452cce)
DUT Failed to associate fast-gtc/fast-mscahpv2 enterprise network, there
is error log shows 'EAP-FAST: Compound MAC did not match'.
tls_connection_get_eap_fast_key() gets wrong key, currently using
mbedtls_ssl_tls_prf to derive key, and it's not PSA API.
Therefore, conn->expkey_keyblock_size can't be set as 0, the correct
expkey_keyblock_size should contain keylen + mac_key_len + ivlen.
Remove MBEDTLS_USE_PSA_CRYPTO to get keyblock_size correctly.

Signed-off-by: Maochen Wang <[email protected]>
(cherry picked from commit 4f395b4)
Due to the recent nRF70 driver changes, the driver ops are removed from
config, but few functions in hostap still depend on that, so, pull the
fix for hostap driver ops.

Signed-off-by: Chaitanya Tata <[email protected]>
(cherry picked from commit dadcee7)
Add configuration options for background scanning (bgscan) in
wpa_supplicant.

Signed-off-by: Pieter De Gendt <[email protected]>
(cherry picked from commit 93c4dbd)
Add a shell command to configure the background scanning.

Signed-off-by: Pieter De Gendt <[email protected]>
(cherry picked from commit 1da7a11)
Use `ssids` instead of `filter_ssids` to set the SSID in probe
requests. `filter_ssids` are to filter scan results to include
only the specified SSIDs.

Signed-off-by: Ravi Dondaputi <[email protected]>
In P2P mode, inform supplicant that the driver is P2P capable.

Upstream PR #: 97183

Signed-off-by: Ravi Dondaputi <[email protected]>
Add supplicant api and  mgmt ops support for P2P discovery.

Upstream PR #: 97183

Signed-off-by: Kapil Bhatt <[email protected]>
…d support

Add shell command support for P2P discovery.

Upstream PR #: 97183

Signed-off-by: Kapil Bhatt <[email protected]>
Update hostap revision to add wpa_cli command
response with no print.
Update nrf_wifi revision to include P2P build
time flags.

Upstream PR #: 97183

Signed-off-by: Ravi Dondaputi <[email protected]>
Signed-off-by: Kapil Bhatt <[email protected]>
Add ops for remain-on-channel and cancelling remain-on-channel.

Upstream PR #: 97183

Signed-off-by: Ravi Dondaputi <[email protected]>
…e responses

For frames sent down by supplicant in station mode, inform RPU
to allow off-channel transmission. This is needed for sending
P2P probe responses.

Upstream PR #: 97183

Signed-off-by: Ravi Dondaputi <[email protected]>
For frames like Probe Requests, there is no match criterion.
Re-arrange the checks to support registering of frames without
providing any matching info.

Upstream PR #: 97183

Signed-off-by: Ravi Dondaputi <[email protected]>
Increase required heap and stack size for P2P. More stack was required
during WPS negotiation.

Upstream PR #: 97183

Signed-off-by: Ravi Dondaputi <[email protected]>
We now support a single MbedTLS shim for hostap, so, this extra check is
not needed, we can always use DH5 groups from Mbedtls.

Upstream PR #: 97183

Signed-off-by: Chaitanya Tata <[email protected]>
Add structures and API support for P2P connect.

Upstream PR #: 97183

Signed-off-by: Kapil Bhatt <[email protected]>
…support

Add shell command support for P2P connect.

Upstream PR #: 97183

Signed-off-by: Kapil Bhatt <[email protected]>
@github-actions
Copy link

github-actions bot commented Oct 31, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff
hostap zephyrproject-rtos/hostap@5abcff1 zephyrproject-rtos/hostap#107 zephyrproject-rtos/hostap#107/files
nrf_wifi zephyrproject-rtos/nrf_wifi@e269670 (main) zephyrproject-rtos/nrf_wifi#83 zephyrproject-rtos/nrf_wifi#83/files

Additional metadata changed:

Name URL Submodules West cmds module.yml Blobs
nrf_wifi 5x ✏

DNM label due to: 2 projects with PR revision, 1 project with metadata changes and 5 blob changes

Note: This message is automatically posted and updated by the Manifest GitHub Action.

…control channel

Update WPA supplicant functions to pass the control channel (socket) as a
parameter instead of relying on a global socket. This change aligns with
the PR 80 modifications in hostap repo and ensures that each Virtual
Interface (VIF) uses its dedicated control channel for communication.

Signed-off-by: Hanan Arshad <[email protected]>
Signed-off-by: Chaitanya Tata <[email protected]>
(cherry picked from commit 53a885a)
@rado17 rado17 requested review from Copilot and krish2718 October 31, 2025 12:45
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds Wi-Fi Direct (P2P) support to the Zephyr networking stack, enabling device discovery and connection capabilities. The implementation includes P2P shell commands, event handling, and background scanning functionality.

  • Adds P2P device discovery, connection, and peer management functionality
  • Implements background scanning for legacy roaming scenarios
  • Extends the WiFi management API with P2P operations

Reviewed Changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
west.yml Updates hostap and nrf_wifi module revisions to pull/head versions
subsys/net/l2/wifi/wifi_shell.c Adds P2P shell commands and background scanning support
subsys/net/l2/wifi/wifi_mgmt.c Implements P2P and background scan management handlers
modules/hostap/src/wpa_cli.c Updates wpa_cli implementation with interface handling
modules/hostap/src/supp_main.h Removes duplicate function declaration
modules/hostap/src/supp_main.c Adds P2P and background scan operations to management API
modules/hostap/src/supp_events.h Extends event structures for P2P device discovery
modules/hostap/src/supp_events.c Implements P2P event processing and parsing
modules/hostap/src/supp_api.h Adds function declarations for P2P and background scan
modules/hostap/src/supp_api.c Implements P2P operations and background scanning logic
modules/hostap/Kconfig Adds configuration options for P2P and background scanning
modules/hostap/CMakeLists.txt Includes P2P and background scan source files
include/zephyr/net/wifi_mgmt.h Extends WiFi management API with P2P structures and events
drivers/wifi/nrf_wifi/src/wpa_supp_if.c Updates driver interface for P2P support
drivers/wifi/nrf_wifi/src/fmac_main.c Adds P2P callback registrations
drivers/wifi/nrf_wifi/inc/wpa_supp_if.h Extends interface with P2P function declarations
Comments suppressed due to low confidence (1)

modules/hostap/src/supp_api.c:1

  • The macro wpa_cli_cmd_v spans multiple lines but lacks proper backslash continuation on line 95. This could cause compilation issues.
/**

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

static void print_peer_info(const struct shell *sh, int index,
const struct wifi_p2p_device_info *peer)
{
uint8_t mac_string_buf[sizeof("xx:xx:xx:xx:xx:xx")];
Copy link

Copilot AI Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The buffer size calculation using sizeof() on a string literal is fragile. Consider using a named constant like #define MAC_ADDR_STR_LEN 18 to make the intent clearer.

Copilot uses AI. Check for mistakes.
Comment on lines +3596 to +3598
if (sscanf(argv[1], "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx",
&mac_addr[0], &mac_addr[1], &mac_addr[2],
&mac_addr[3], &mac_addr[4], &mac_addr[5]) != WIFI_MAC_ADDR_LEN) {
Copy link

Copilot AI Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This MAC address parsing logic is duplicated in multiple functions (lines 3596-3598 and 3752-3754). Consider extracting it into a helper function like parse_mac_address() to reduce code duplication.

Suggested change
if (sscanf(argv[1], "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx",
&mac_addr[0], &mac_addr[1], &mac_addr[2],
&mac_addr[3], &mac_addr[4], &mac_addr[5]) != WIFI_MAC_ADDR_LEN) {
if (parse_mac_address(argv[1], mac_addr) != 0) {

Copilot uses AI. Check for mistakes.
Comment on lines +2744 to +2746
if (sscanf(addr, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx",
&mac[0], &mac[1], &mac[2],
&mac[3], &mac[4], &mac[5]) == WIFI_MAC_ADDR_LEN) {
Copy link

Copilot AI Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is another instance of duplicated MAC address parsing logic. The same pattern appears in the shell commands and should be consolidated into a shared utility function.

Copilot uses AI. Check for mistakes.
Comment on lines +548 to 559
if (params->num_ssids) {
scan_info->scan_params.num_scan_ssids = params->num_ssids;

for (indx = 0; indx < params->num_filter_ssids; indx++) {
for (indx = 0; indx < params->num_ssids; indx++) {
memcpy(scan_info->scan_params.scan_ssids[indx].nrf_wifi_ssid,
params->filter_ssids[indx].ssid,
params->filter_ssids[indx].ssid_len);
params->ssids[indx].ssid,
params->ssids[indx].ssid_len);

scan_info->scan_params.scan_ssids[indx].nrf_wifi_ssid_len =
params->filter_ssids[indx].ssid_len;
params->ssids[indx].ssid_len;
}
}
Copy link

Copilot AI Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code should validate that params->ssids[indx].ssid_len does not exceed the destination buffer size before calling memcpy() to prevent buffer overflow.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants