Store secure ranging driver capabilities in WPA state machine

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
Vinay Gannevaram 2022-03-20 19:26:02 +05:30 committed by Jouni Malinen
parent 96a604128b
commit d0d585c481
3 changed files with 17 additions and 0 deletions

View file

@ -5281,6 +5281,7 @@ void wpa_sm_set_dpp_z(struct wpa_sm *sm, const struct wpabuf *z)
#ifdef CONFIG_PASN
void wpa_pasn_pmksa_cache_add(struct wpa_sm *sm, const u8 *pmk, size_t pmk_len,
const u8 *pmkid, const u8 *bssid, int key_mgmt)
{
@ -5288,6 +5289,18 @@ void wpa_pasn_pmksa_cache_add(struct wpa_sm *sm, const u8 *pmk, size_t pmk_len,
bssid, sm->own_addr, NULL,
key_mgmt, 0);
}
void wpa_pasn_sm_set_caps(struct wpa_sm *sm, unsigned int flags2)
{
if (flags2 & WPA_DRIVER_FLAGS2_SEC_LTF_STA)
sm->secure_ltf = 1;
if (flags2 & WPA_DRIVER_FLAGS2_SEC_RTT_STA)
sm->secure_rtt = 1;
if (flags2 & WPA_DRIVER_FLAGS2_PROT_RANGE_NEG_STA)
sm->prot_range_neg = 1;
}
#endif /* CONFIG_PASN */

View file

@ -562,5 +562,6 @@ void wpa_sm_set_fils_cache_id(struct wpa_sm *sm, const u8 *fils_cache_id);
void wpa_sm_set_dpp_z(struct wpa_sm *sm, const struct wpabuf *z);
void wpa_pasn_pmksa_cache_add(struct wpa_sm *sm, const u8 *pmk, size_t pmk_len,
const u8 *pmkid, const u8 *bssid, int key_mgmt);
void wpa_pasn_sm_set_caps(struct wpa_sm *sm, unsigned int flags2);
#endif /* WPA_H */

View file

@ -6900,6 +6900,9 @@ static int wpa_supplicant_init_iface(struct wpa_supplicant *wpa_s,
wpa_s->extended_capa[2] & 0x40)
wpa_s->multi_bss_support = 1;
}
#ifdef CONFIG_PASN
wpa_pasn_sm_set_caps(wpa_s->wpa, wpa_s->drv_flags2);
#endif /* CONFIG_PASN */
if (wpa_s->max_remain_on_chan == 0)
wpa_s->max_remain_on_chan = 1000;