]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Ignore missing set_secure_ranging_ctx callback for testing purposes
authorJouni Malinen <quic_jouni@quicinc.com>
Mon, 27 Nov 2023 10:01:15 +0000 (12:01 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 27 Nov 2023 10:01:15 +0000 (12:01 +0200)
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 <quic_jouni@quicinc.com>
wpa_supplicant/driver_i.h

index dcf576487a82dc2f8c99956b453c01c98f6474db..9a4c2353712716bd89a5d049b3e05885e028df67 100644 (file)
@@ -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(&params, 0, sizeof(params));
        params.action = action;