Skip to content

Commit 1fe8da2

Browse files
rado17kapbh
authored andcommitted
[noup] zephyr: Add changes for P2P discovery
Register probe request frames. Needed by RPU to send the frames up to supplicant. Send probe response frame down to driver. This facilitates P2P discovery. Signed-off-by: Ravi Dondaputi <[email protected]>
1 parent f91f5cd commit 1fe8da2

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

src/drivers/driver_zephyr.c

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2542,7 +2542,7 @@ int wpa_drv_zep_send_mlme(void *priv, const u8 *data, size_t data_len, int noack
25422542
/* Unused till Wi-Fi7 MLO is supported in Zephyr */
25432543
(void)link_id;
25442544

2545-
#ifdef CONFIG_WIFI_NM_HOSTAPD_AP
2545+
#if defined CONFIG_WIFI_NM_HOSTAPD_AP || defined CONFIG_WIFI_NM_WPA_SUPPLICANT_P2P
25462546
dev_ops = get_dev_ops(if_ctx->dev_ctx);
25472547
#else
25482548
dev_ops = if_ctx->dev_ctx->config;
@@ -2733,6 +2733,28 @@ int wpa_drv_zep_cancel_remain_on_channel(void *priv)
27332733
return ret;
27342734
}
27352735

2736+
int wpa_drv_zep_probe_req_report(void *priv, int report)
2737+
{
2738+
struct zep_drv_if_ctx *if_ctx = NULL;
2739+
int ret = -1;
2740+
2741+
if (!priv) {
2742+
wpa_printf(MSG_ERROR, "%s: Invalid handle", __func__);
2743+
goto out;
2744+
}
2745+
2746+
if_ctx = priv;
2747+
ret = wpa_drv_register_frame(priv, WLAN_FC_STYPE_PROBE_REQ << 4,
2748+
NULL, 0, 0);
2749+
if (ret) {
2750+
wpa_printf(MSG_ERROR, "%s: register probe req report failed", __func__);
2751+
goto out;
2752+
}
2753+
2754+
out:
2755+
return ret;
2756+
}
2757+
27362758
void wpa_drv_zep_send_action_cancel_wait(void *priv)
27372759
{
27382760
struct zep_drv_if_ctx *if_ctx = NULL;
@@ -2806,5 +2828,6 @@ const struct wpa_driver_ops wpa_driver_zep_ops = {
28062828
.dpp_listen = wpa_drv_zep_dpp_listen,
28072829
.remain_on_channel = wpa_drv_zep_remain_on_channel,
28082830
.cancel_remain_on_channel = wpa_drv_zep_cancel_remain_on_channel,
2831+
.probe_req_report = wpa_drv_zep_probe_req_report,
28092832
.send_action_cancel_wait = wpa_drv_zep_send_action_cancel_wait,
28102833
};

0 commit comments

Comments
 (0)