From 033634019ddf8a2a12ad9c367d82cce6275804a5 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Mon, 27 Nov 2023 12:01:15 +0200 Subject: [PATCH] Ignore missing set_secure_ranging_ctx callback for testing purposes nl80211_set_secure_ranging_ctx() was already ignoring the operation, but this is included only with CONFIG_DRIVER_NL80211_QCA=y. Make the default case use same behavior based on the callback function not being defined. This is needed to allow the following test cases to work: pasn_owe_tm_kdk_secure_ltf pasn_sae_kdk_secure_ltf Signed-off-by: Jouni Malinen --- wpa_supplicant/driver_i.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/driver_i.h b/wpa_supplicant/driver_i.h index dcf576487..9a4c23537 100644 --- a/wpa_supplicant/driver_i.h +++ b/wpa_supplicant/driver_i.h @@ -1155,8 +1155,10 @@ static inline int wpa_drv_set_secure_ranging_ctx(struct wpa_supplicant *wpa_s, { struct secure_ranging_params params; + /* Configure secure ranging context only to the drivers that support it. + */ if (!wpa_s->driver->set_secure_ranging_ctx) - return -1; + return 0; os_memset(¶ms, 0, sizeof(params)); params.action = action;