Skip to content

Commit 6269cce

Browse files
committed
[nrf fromlist] drivers: wifi: nrf_wifi: Register frame without match
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]>
1 parent d916c8a commit 6269cce

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

drivers/wifi/nrf_wifi/src/wpa_supp_if.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1702,7 +1702,7 @@ int nrf_wifi_supp_register_frame(void *if_priv,
17021702
struct nrf_wifi_ctx_zep *rpu_ctx_zep = NULL;
17031703
struct nrf_wifi_umac_mgmt_frame_info frame_info;
17041704

1705-
if (!if_priv || !match || !match_len) {
1705+
if (!if_priv) {
17061706
LOG_ERR("%s: Invalid parameters", __func__);
17071707
return -1;
17081708
}
@@ -1723,8 +1723,14 @@ int nrf_wifi_supp_register_frame(void *if_priv,
17231723
memset(&frame_info, 0, sizeof(frame_info));
17241724

17251725
frame_info.frame_type = type;
1726-
frame_info.frame_match.frame_match_len = match_len;
1727-
memcpy(frame_info.frame_match.frame_match, match, match_len);
1726+
if (match_len > 0) {
1727+
if (!match) {
1728+
LOG_ERR("%s: Invalid match parameters", __func__);
1729+
goto out;
1730+
}
1731+
frame_info.frame_match.frame_match_len = match_len;
1732+
memcpy(frame_info.frame_match.frame_match, match, match_len);
1733+
}
17281734

17291735
status = nrf_wifi_sys_fmac_register_frame(rpu_ctx_zep->rpu_ctx, vif_ctx_zep->vif_idx,
17301736
&frame_info);

0 commit comments

Comments
 (0)