]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Move pmf_in_use() into a more generic file
authorJouni Malinen <jouni@codeaurora.org>
Fri, 24 Sep 2021 18:02:19 +0000 (21:02 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 28 Sep 2021 08:07:21 +0000 (11:07 +0300)
This function is not specific to GAS, so make it available throughout
wpa_supplicant without requiring CONFIG_GAS.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
wpa_supplicant/gas_query.c
wpa_supplicant/gas_query.h
wpa_supplicant/wpa_supplicant.c
wpa_supplicant/wpa_supplicant_i.h

index e60a8c1fe6aaa92ada19a4078320d44a2bec55ba..a6172d69233b1fe33f0939ee09b370c081c3e1b9 100644 (file)
@@ -273,16 +273,6 @@ static void gas_query_tx_status(struct wpa_supplicant *wpa_s,
 }
 
 
-int pmf_in_use(struct wpa_supplicant *wpa_s, const u8 *addr)
-{
-       if (wpa_s->current_ssid == NULL ||
-           wpa_s->wpa_state < WPA_4WAY_HANDSHAKE ||
-           os_memcmp(addr, wpa_s->bssid, ETH_ALEN) != 0)
-               return 0;
-       return wpa_sm_pmf_enabled(wpa_s->wpa);
-}
-
-
 static int gas_query_tx(struct gas_query *gas, struct gas_query_pending *query,
                        struct wpabuf *req, unsigned int wait_time)
 {
index f9ce7b680fda6f5fe9dafb9f35120cb23063ec5e..6ccecd4ddbe10a918bfb8ef3fb9dd8cbf3de9bd2 100644 (file)
@@ -19,7 +19,6 @@ void gas_query_deinit(struct gas_query *gas);
 int gas_query_rx(struct gas_query *gas, const u8 *da, const u8 *sa,
                 const u8 *bssid, u8 categ, const u8 *data, size_t len,
                 int freq);
-int pmf_in_use(struct wpa_supplicant *wpa_s, const u8 *addr);
 
 /**
  * enum gas_query_result - GAS query result
index 2d10239634b7cf9ef2ad2daf46e3897b09dedffb..51c8da4a34479e4aa415d24fe77dac7bff687e28 100644 (file)
@@ -7812,6 +7812,16 @@ int wpas_get_ssid_pmf(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid)
 }
 
 
+int pmf_in_use(struct wpa_supplicant *wpa_s, const u8 *addr)
+{
+       if (wpa_s->current_ssid == NULL ||
+           wpa_s->wpa_state < WPA_4WAY_HANDSHAKE ||
+           os_memcmp(addr, wpa_s->bssid, ETH_ALEN) != 0)
+               return 0;
+       return wpa_sm_pmf_enabled(wpa_s->wpa);
+}
+
+
 int wpas_is_p2p_prioritized(struct wpa_supplicant *wpa_s)
 {
        if (wpa_s->global->conc_pref == WPA_CONC_PREF_P2P)
index 951d3ee1ba499a4524c6fb1fc0184ff273a90c8b..cda8a114e1766f375d489d6721e0a89a9245e421 100644 (file)
@@ -1763,6 +1763,7 @@ static inline int wpas_mode_to_ieee80211_mode(enum wpas_mode mode)
 
 int wpas_network_disabled(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
 int wpas_get_ssid_pmf(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
+int pmf_in_use(struct wpa_supplicant *wpa_s, const u8 *addr);
 
 int wpas_init_ext_pw(struct wpa_supplicant *wpa_s);