]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Store secure ranging driver capabilities in WPA state machine
authorVinay Gannevaram <quic_vganneva@quicinc.com>
Sun, 20 Mar 2022 13:56:02 +0000 (19:26 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 1 Sep 2022 15:59:58 +0000 (18:59 +0300)
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
src/rsn_supp/wpa.c
src/rsn_supp/wpa.h
wpa_supplicant/wpa_supplicant.c

index cf9b21039398b29cabb2060b22981ec76fa3ea4b..3e39947a50c6a83688fee21afc4dd65d05f7a680 100644 (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 */
 
 
index be70f4156ce9dd75de61298ff4a02e6bd54fc4e7..df32240c666f88aed6334db6729a7c602e915558 100644 (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 */
index 09ba7cda9d9b27257fff62d6e219183ce5b5066f..deb51a721cac3008ed384c407a3598ebc16905a2 100644 (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;