]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
PASN: Rename struct wpas_pasn to pasn_data
authorVinay Gannevaram <quic_vganneva@quicinc.com>
Thu, 3 Nov 2022 08:02:06 +0000 (13:32 +0530)
committerJouni Malinen <j@w1.fi>
Fri, 4 Nov 2022 10:59:29 +0000 (12:59 +0200)
struct wpas_pasn is common to both initiator and responder, so rename it
to pasn_data to avoid the "wpas_" prefix that could be seen as a
reference to wpa_supplicant (PASN initiator).

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
src/ap/ieee802_11.c
src/ap/sta_info.h
src/pasn/pasn_common.h
src/pasn/pasn_initiator.c
src/pasn/pasn_responder.c
wpa_supplicant/pasn_supplicant.c
wpa_supplicant/wpa_supplicant_i.h

index 4691f91ee02f3849476192e6b6da85f2ce8f6ffa..da320bb78b8c32c683a1543a43f3403efd953e20 100644 (file)
@@ -2282,7 +2282,7 @@ static void pasn_fils_auth_resp(struct hostapd_data *hapd,
                                struct wpabuf *erp_resp,
                                const u8 *msk, size_t msk_len)
 {
-       struct wpas_pasn *pasn = sta->pasn;
+       struct pasn_data *pasn = sta->pasn;
        struct pasn_fils *fils = &pasn->fils;
        u8 pmk[PMK_LEN_MAX];
        size_t pmk_len;
@@ -2362,7 +2362,7 @@ static int pasn_wd_handle_fils(struct hostapd_data *hapd, struct sta_info *sta,
        wpa_printf(MSG_DEBUG, "PASN: FILS: RADIUS is not configured. Fail");
        return -1;
 #else /* CONFIG_NO_RADIUS */
-       struct wpas_pasn *pasn = sta->pasn;
+       struct pasn_data *pasn = sta->pasn;
        struct pasn_fils *fils = &pasn->fils;
        struct ieee802_11_elems elems;
        struct wpa_ie_data rsne_data;
@@ -2494,7 +2494,7 @@ static int hapd_pasn_send_mlme(void *ctx, const u8 *data, size_t data_len,
 static void hapd_initialize_pasn(struct hostapd_data *hapd,
                                 struct sta_info *sta)
 {
-       struct wpas_pasn *pasn = sta->pasn;
+       struct pasn_data *pasn = sta->pasn;
 
        pasn->cb_ctx = hapd;
        pasn->send_mgmt = hapd_pasn_send_mlme;
@@ -2560,7 +2560,7 @@ static void hapd_pasn_update_params(struct hostapd_data *hapd,
                                    const struct ieee80211_mgmt *mgmt,
                                    size_t len)
 {
-       struct wpas_pasn *pasn = sta->pasn;
+       struct pasn_data *pasn = sta->pasn;
        struct ieee802_11_elems elems;
        struct wpa_ie_data rsn_data;
        struct wpa_pasn_params_data pasn_params;
index eef40b501e9fc434e20466cb147397ef64a7b25d..1dc4425319db12d867fce4b0f93b530e1516839e 100644 (file)
@@ -296,7 +296,7 @@ struct sta_info {
 #endif /* CONFIG_AIRTIME_POLICY */
 
 #ifdef CONFIG_PASN
-       struct wpas_pasn *pasn;
+       struct pasn_data *pasn;
 #endif /* CONFIG_PASN */
 };
 
index fa73e3b6f121d4816a3d52c39d9b0894dbee8785..763cd6521bdf56374643224ddb860342b658b54f 100644 (file)
@@ -34,7 +34,7 @@ struct pasn_fils {
        struct wpabuf *erp_resp;
 };
 
-struct wpas_pasn {
+struct pasn_data {
        int akmp;
        int cipher;
        u16 group;
@@ -146,30 +146,30 @@ struct wpas_pasn {
 
 /* Initiator */
 
-void wpa_pasn_reset(struct wpas_pasn *pasn);
-int wpas_pasn_start(struct wpas_pasn *pasn, const u8 *own_addr,
+void wpa_pasn_reset(struct pasn_data *pasn);
+int wpas_pasn_start(struct pasn_data *pasn, const u8 *own_addr,
                    const u8 *bssid, int akmp, int cipher, u16 group,
                    int freq, const u8 *beacon_rsne, u8 beacon_rsne_len,
                    const u8 *beacon_rsnxe, u8 beacon_rsnxe_len,
                    const struct wpabuf *comeback);
-int wpa_pasn_verify(struct wpas_pasn *pasn, const u8 *own_addr,
+int wpa_pasn_verify(struct pasn_data *pasn, const u8 *own_addr,
                    const u8 *bssid, int akmp, int cipher, u16 group,
                    int freq, const u8 *beacon_rsne, u8 beacon_rsne_len,
                    const u8 *beacon_rsnxe, u8 beacon_rsnxe_len,
                    const struct wpabuf *comeback);
-int wpa_pasn_auth_rx(struct wpas_pasn *pasn, const u8 *data, size_t len,
+int wpa_pasn_auth_rx(struct pasn_data *pasn, const u8 *data, size_t len,
                     struct wpa_pasn_params_data *pasn_params);
-int wpa_pasn_auth_tx_status(struct wpas_pasn *pasn,
+int wpa_pasn_auth_tx_status(struct pasn_data *pasn,
                            const u8 *data, size_t data_len, u8 acked);
 
 /* Responder */
-int handle_auth_pasn_1(struct wpas_pasn *pasn,
+int handle_auth_pasn_1(struct pasn_data *pasn,
                       const u8 *own_addr, const u8 *peer_addr,
                       const struct ieee80211_mgmt *mgmt, size_t len);
-int handle_auth_pasn_3(struct wpas_pasn *pasn, const u8 *own_addr,
+int handle_auth_pasn_3(struct pasn_data *pasn, const u8 *own_addr,
                       const u8 *peer_addr,
                       const struct ieee80211_mgmt *mgmt, size_t len);
-int handle_auth_pasn_resp(struct wpas_pasn *pasn, const u8 *own_addr,
+int handle_auth_pasn_resp(struct pasn_data *pasn, const u8 *own_addr,
                          const u8 *peer_addr,
                          struct rsn_pmksa_cache_entry *pmksa, u16 status);
 
index 16e7b51481b81bde6b6b0771c03b58fef0f34e7d..ae7718b6e5eb1cf0bf33e2990ff711a1660ad111 100644 (file)
@@ -28,7 +28,7 @@
 
 #ifdef CONFIG_SAE
 
-static struct wpabuf * wpas_pasn_wd_sae_commit(struct wpas_pasn *pasn)
+static struct wpabuf * wpas_pasn_wd_sae_commit(struct pasn_data *pasn)
 {
        struct wpabuf *buf = NULL;
        int ret;
@@ -65,7 +65,7 @@ static struct wpabuf * wpas_pasn_wd_sae_commit(struct wpas_pasn *pasn)
 }
 
 
-static int wpas_pasn_wd_sae_rx(struct wpas_pasn *pasn, struct wpabuf *wd)
+static int wpas_pasn_wd_sae_rx(struct pasn_data *pasn, struct wpabuf *wd)
 {
        const u8 *data;
        size_t buf_len;
@@ -164,7 +164,7 @@ static int wpas_pasn_wd_sae_rx(struct wpas_pasn *pasn, struct wpabuf *wd)
 }
 
 
-static struct wpabuf * wpas_pasn_wd_sae_confirm(struct wpas_pasn *pasn)
+static struct wpabuf * wpas_pasn_wd_sae_confirm(struct pasn_data *pasn)
 {
        struct wpabuf *buf = NULL;
 
@@ -190,7 +190,7 @@ static struct wpabuf * wpas_pasn_wd_sae_confirm(struct wpas_pasn *pasn)
 
 #ifdef CONFIG_FILS
 
-static struct wpabuf * wpas_pasn_fils_build_auth(struct wpas_pasn *pasn)
+static struct wpabuf * wpas_pasn_fils_build_auth(struct pasn_data *pasn)
 {
        struct wpabuf *buf = NULL;
        struct wpabuf *erp_msg;
@@ -271,7 +271,7 @@ fail:
 }
 
 
-static struct wpabuf * wpas_pasn_wd_fils_auth(struct wpas_pasn *pasn)
+static struct wpabuf * wpas_pasn_wd_fils_auth(struct pasn_data *pasn)
 {
        wpa_printf(MSG_DEBUG, "PASN: FILS: wrapped data - completed=%u",
                   pasn->fils.completed);
@@ -290,7 +290,7 @@ static struct wpabuf * wpas_pasn_wd_fils_auth(struct wpas_pasn *pasn)
 }
 
 
-static int wpas_pasn_wd_fils_rx(struct wpas_pasn *pasn, struct wpabuf *wd)
+static int wpas_pasn_wd_fils_rx(struct pasn_data *pasn, struct wpabuf *wd)
 {
        struct ieee802_11_elems elems;
        struct wpa_ie_data rsne_data;
@@ -440,7 +440,7 @@ static int wpas_pasn_wd_fils_rx(struct wpas_pasn *pasn, struct wpabuf *wd)
 #endif /* CONFIG_FILS */
 
 
-static struct wpabuf * wpas_pasn_get_wrapped_data(struct wpas_pasn *pasn)
+static struct wpabuf * wpas_pasn_get_wrapped_data(struct pasn_data *pasn)
 {
        if (pasn->using_pmksa)
                return NULL;
@@ -482,7 +482,7 @@ static struct wpabuf * wpas_pasn_get_wrapped_data(struct wpas_pasn *pasn)
 }
 
 
-static u8 wpas_pasn_get_wrapped_data_format(struct wpas_pasn *pasn)
+static u8 wpas_pasn_get_wrapped_data_format(struct pasn_data *pasn)
 {
        if (pasn->using_pmksa)
                return WPA_PASN_WRAPPED_DATA_NO;
@@ -510,7 +510,7 @@ static u8 wpas_pasn_get_wrapped_data_format(struct wpas_pasn *pasn)
 }
 
 
-static struct wpabuf * wpas_pasn_build_auth_1(struct wpas_pasn *pasn,
+static struct wpabuf * wpas_pasn_build_auth_1(struct pasn_data *pasn,
                                              const struct wpabuf *comeback,
                                              bool verify)
 {
@@ -608,7 +608,7 @@ fail:
 }
 
 
-static struct wpabuf * wpas_pasn_build_auth_3(struct wpas_pasn *pasn)
+static struct wpabuf * wpas_pasn_build_auth_3(struct pasn_data *pasn)
 {
        struct wpabuf *buf, *wrapped_data_buf = NULL;
        u8 mic[WPA_PASN_MAX_MIC_LEN];
@@ -686,7 +686,7 @@ fail:
 }
 
 
-void wpa_pasn_reset(struct wpas_pasn *pasn)
+void wpa_pasn_reset(struct pasn_data *pasn)
 {
        wpa_printf(MSG_DEBUG, "PASN: Reset");
 
@@ -744,7 +744,7 @@ void wpa_pasn_reset(struct wpas_pasn *pasn)
 }
 
 
-static int wpas_pasn_set_pmk(struct wpas_pasn *pasn,
+static int wpas_pasn_set_pmk(struct pasn_data *pasn,
                             struct wpa_ie_data *rsn_data,
                             struct wpa_pasn_params_data *pasn_data,
                             struct wpabuf *wrapped_data)
@@ -857,7 +857,7 @@ static int wpas_pasn_set_pmk(struct wpas_pasn *pasn,
 }
 
 
-static int wpas_pasn_send_auth_1(struct wpas_pasn *pasn, const u8 *own_addr,
+static int wpas_pasn_send_auth_1(struct pasn_data *pasn, const u8 *own_addr,
                                 const u8 *bssid, int akmp, int cipher,
                                 u16 group, int freq,
                                 const u8 *beacon_rsne, u8 beacon_rsne_len,
@@ -925,7 +925,7 @@ fail:
 }
 
 
-int wpas_pasn_start(struct wpas_pasn *pasn, const u8 *own_addr,
+int wpas_pasn_start(struct pasn_data *pasn, const u8 *own_addr,
                    const u8 *bssid, int akmp, int cipher, u16 group,
                    int freq, const u8 *beacon_rsne, u8 beacon_rsne_len,
                    const u8 *beacon_rsnxe, u8 beacon_rsnxe_len,
@@ -989,7 +989,7 @@ int wpas_pasn_start(struct wpas_pasn *pasn, const u8 *own_addr,
  * provides support to construct PASN Authentication frames for pairing
  * verification.
  */
-int wpa_pasn_verify(struct wpas_pasn *pasn, const u8 *own_addr,
+int wpa_pasn_verify(struct pasn_data *pasn, const u8 *own_addr,
                    const u8 *bssid, int akmp, int cipher, u16 group,
                    int freq, const u8 *beacon_rsne, u8 beacon_rsne_len,
                    const u8 *beacon_rsnxe, u8 beacon_rsnxe_len,
@@ -1002,7 +1002,7 @@ int wpa_pasn_verify(struct wpas_pasn *pasn, const u8 *own_addr,
 }
 
 
-int wpa_pasn_auth_rx(struct wpas_pasn *pasn, const u8 *data, size_t len,
+int wpa_pasn_auth_rx(struct pasn_data *pasn, const u8 *data, size_t len,
                     struct wpa_pasn_params_data *pasn_params)
 
 {
@@ -1312,7 +1312,7 @@ fail:
 }
 
 
-int wpa_pasn_auth_tx_status(struct wpas_pasn *pasn,
+int wpa_pasn_auth_tx_status(struct pasn_data *pasn,
                            const u8 *data, size_t data_len, u8 acked)
 
 {
index 02a1088bf5d3a433d35a7f65f3cf5ed79795ba93..0c2515cdc05016785c77c05bad329180f4773758 100644 (file)
@@ -28,7 +28,7 @@
 #ifdef CONFIG_PASN
 #ifdef CONFIG_SAE
 
-static int pasn_wd_handle_sae_commit(struct wpas_pasn *pasn,
+static int pasn_wd_handle_sae_commit(struct pasn_data *pasn,
                                     const u8 *own_addr, const u8 *peer_addr,
                                     struct wpabuf *wd)
 {
@@ -104,7 +104,7 @@ static int pasn_wd_handle_sae_commit(struct wpas_pasn *pasn,
 }
 
 
-static int pasn_wd_handle_sae_confirm(struct wpas_pasn *pasn,
+static int pasn_wd_handle_sae_confirm(struct pasn_data *pasn,
                                      const u8 *peer_addr, struct wpabuf *wd)
 {
        const u8 *data;
@@ -163,7 +163,7 @@ static int pasn_wd_handle_sae_confirm(struct wpas_pasn *pasn,
 }
 
 
-static struct wpabuf * pasn_get_sae_wd(struct wpas_pasn *pasn)
+static struct wpabuf * pasn_get_sae_wd(struct pasn_data *pasn)
 {
        struct wpabuf *buf = NULL;
        u8 *len_ptr;
@@ -206,7 +206,7 @@ static struct wpabuf * pasn_get_sae_wd(struct wpas_pasn *pasn)
 
 #ifdef CONFIG_FILS
 
-static struct wpabuf * pasn_get_fils_wd(struct wpas_pasn *pasn)
+static struct wpabuf * pasn_get_fils_wd(struct pasn_data *pasn)
 {
        struct pasn_fils *fils = &pasn->fils;
        struct wpabuf *buf = NULL;
@@ -255,7 +255,7 @@ static struct wpabuf * pasn_get_fils_wd(struct wpas_pasn *pasn)
 
 #endif /* CONFIG_FILS */
 
-static struct wpabuf * pasn_get_wrapped_data(struct wpas_pasn *pasn)
+static struct wpabuf * pasn_get_wrapped_data(struct pasn_data *pasn)
 {
        switch (pasn->akmp) {
        case WPA_KEY_MGMT_PASN:
@@ -288,7 +288,7 @@ static struct wpabuf * pasn_get_wrapped_data(struct wpas_pasn *pasn)
 
 
 static int
-pasn_derive_keys(struct wpas_pasn *pasn,
+pasn_derive_keys(struct pasn_data *pasn,
                 const u8 *own_addr, const u8 *peer_addr,
                 const u8 *cached_pmk, size_t cached_pmk_len,
                 struct wpa_pasn_params_data *pasn_data,
@@ -359,7 +359,7 @@ pasn_derive_keys(struct wpas_pasn *pasn,
 }
 
 
-static void handle_auth_pasn_comeback(struct wpas_pasn *pasn,
+static void handle_auth_pasn_comeback(struct pasn_data *pasn,
                                      const u8 *own_addr, const u8 *peer_addr,
                                      u16 group)
 {
@@ -411,7 +411,7 @@ static void handle_auth_pasn_comeback(struct wpas_pasn *pasn,
 }
 
 
-int handle_auth_pasn_resp(struct wpas_pasn *pasn, const u8 *own_addr,
+int handle_auth_pasn_resp(struct pasn_data *pasn, const u8 *own_addr,
                          const u8 *peer_addr,
                          struct rsn_pmksa_cache_entry *pmksa, u16 status)
 {
@@ -584,7 +584,7 @@ fail:
 }
 
 
-int handle_auth_pasn_1(struct wpas_pasn *pasn,
+int handle_auth_pasn_1(struct pasn_data *pasn,
                       const u8 *own_addr, const u8 *peer_addr,
                       const struct ieee80211_mgmt *mgmt, size_t len)
 {
@@ -889,7 +889,7 @@ send_resp:
 }
 
 
-int handle_auth_pasn_3(struct wpas_pasn *pasn, const u8 *own_addr,
+int handle_auth_pasn_3(struct pasn_data *pasn, const u8 *own_addr,
                       const u8 *peer_addr,
                       const struct ieee80211_mgmt *mgmt, size_t len)
 {
index 65ac029aba4a9c3ee750c57a3a3151ba05d559c8..56ef3794297e6f21fe581f40d98620560ee9e675 100644 (file)
@@ -424,7 +424,7 @@ static void wpas_pasn_delete_peers(struct wpa_supplicant *wpa_s,
 }
 
 
-static void wpas_pasn_initiate_eapol(struct wpas_pasn *pasn,
+static void wpas_pasn_initiate_eapol(struct pasn_data *pasn,
                                     struct wpa_ssid *ssid)
 {
        struct eapol_config eapol_conf;
@@ -445,7 +445,7 @@ static void wpas_pasn_initiate_eapol(struct wpas_pasn *pasn,
 
 static void wpas_pasn_reset(struct wpa_supplicant *wpa_s)
 {
-       struct wpas_pasn *pasn = &wpa_s->pasn;
+       struct pasn_data *pasn = &wpa_s->pasn;
 
        wpas_pasn_cancel_auth_work(wpa_s);
        wpa_s->pasn_auth_work = NULL;
@@ -502,7 +502,7 @@ static void wpas_pasn_auth_start_cb(struct wpa_radio_work *work, int deinit)
 {
        struct wpa_supplicant *wpa_s = work->wpa_s;
        struct wpa_pasn_auth_work *awork = work->ctx;
-       struct wpas_pasn *pasn = &wpa_s->pasn;
+       struct pasn_data *pasn = &wpa_s->pasn;
        struct wpa_ssid *ssid;
        struct wpa_bss *bss;
        const u8 *rsne, *rsnxe;
@@ -739,7 +739,7 @@ int wpas_pasn_auth_start(struct wpa_supplicant *wpa_s,
 
 void wpas_pasn_auth_stop(struct wpa_supplicant *wpa_s)
 {
-       struct wpas_pasn *pasn = &wpa_s->pasn;
+       struct pasn_data *pasn = &wpa_s->pasn;
 
        if (!wpa_s->pasn.ecdh)
                return;
@@ -755,7 +755,7 @@ void wpas_pasn_auth_stop(struct wpa_supplicant *wpa_s)
 
 
 static int wpas_pasn_immediate_retry(struct wpa_supplicant *wpa_s,
-                                    struct wpas_pasn *pasn,
+                                    struct pasn_data *pasn,
                                     struct wpa_pasn_params_data *params)
 {
        int akmp = pasn->akmp;
@@ -786,7 +786,7 @@ static void wpas_pasn_deauth_cb(struct ptksa_cache_entry *entry)
 int wpas_pasn_auth_rx(struct wpa_supplicant *wpa_s,
                      const struct ieee80211_mgmt *mgmt, size_t len)
 {
-       struct wpas_pasn *pasn = &wpa_s->pasn;
+       struct pasn_data *pasn = &wpa_s->pasn;
        struct wpa_pasn_params_data pasn_data;
        int ret;
 
@@ -877,7 +877,7 @@ int wpas_pasn_auth_tx_status(struct wpa_supplicant *wpa_s,
                             const u8 *data, size_t data_len, u8 acked)
 
 {
-       struct wpas_pasn *pasn = &wpa_s->pasn;
+       struct pasn_data *pasn = &wpa_s->pasn;
        int ret;
 
        if (!wpa_s->pasn_auth_work) {
index 4952b165fec347c518cc018336f0db97320a1103..891d091cd456eed146681b6c17ed7f2e1408cfe8 100644 (file)
@@ -1500,7 +1500,7 @@ struct wpa_supplicant {
        bool mscs_setup_done;
 
 #ifdef CONFIG_PASN
-       struct wpas_pasn pasn;
+       struct pasn_data pasn;
        struct wpa_radio_work *pasn_auth_work;
        unsigned int pasn_count;
        struct pasn_auth *pasn_params;