PASN: Add driver operation to set secure ranging context and PASN response

This is used to set secure ranging context and send PASN response to the
driver.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
Vinay Gannevaram 2022-07-26 12:39:17 +05:30 committed by Jouni Malinen
parent 2edebc6b63
commit 06317f5e32

View file

@ -1117,4 +1117,39 @@ static inline int wpa_drv_dpp_listen(struct wpa_supplicant *wpa_s, bool enable)
return wpa_s->driver->dpp_listen(wpa_s->drv_priv, enable);
}
static inline int wpa_drv_send_pasn_resp(struct wpa_supplicant *wpa_s,
struct pasn_auth *params)
{
if (!wpa_s->driver->send_pasn_resp)
return -1;
return wpa_s->driver->send_pasn_resp(wpa_s->drv_priv, params);
}
static inline int wpa_drv_set_secure_ranging_ctx(struct wpa_supplicant *wpa_s,
const u8 *own_addr,
const u8 *peer_addr,
u32 cipher, u8 tk_len,
const u8 *tk,
u8 ltf_keyseed_len,
const u8 *ltf_keyseed,
u32 action)
{
struct secure_ranging_params params;
if (!wpa_s->driver->set_secure_ranging_ctx)
return -1;
os_memset(&params, 0, sizeof(params));
params.action = action;
params.own_addr = own_addr;
params.peer_addr = peer_addr;
params.cipher = cipher;
params.tk_len = tk_len;
params.tk = tk;
params.ltf_keyseed_len = ltf_keyseed_len;
params.ltf_keyseed = ltf_keyseed;
return wpa_s->driver->set_secure_ranging_ctx(wpa_s->drv_priv, &params);
}
#endif /* DRIVER_I_H */