From: Jouni Malinen Date: Mon, 27 Nov 2023 10:01:15 +0000 (+0200) Subject: Ignore missing set_secure_ranging_ctx callback for testing purposes X-Git-Tag: hostap_2_11~729 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=033634019ddf8a2a12ad9c367d82cce6275804a5;p=thirdparty%2Fhostap.git 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 --- 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;