Added ap_settings option for overriding WPS AP Settings in M7
[wpasupplicant] / hostapd / wpa.c
index 0d173c0..b1f29df 100644 (file)
@@ -345,6 +345,7 @@ static struct wpa_group * wpa_group_init(struct wpa_authenticator *wpa_auth,
  * wpa_init - Initialize WPA authenticator
  * @addr: Authenticator address
  * @conf: Configuration for WPA authenticator
+ * @cb: Callback functions for WPA authenticator
  * Returns: Pointer to WPA authenticator data or %NULL on failure
  */
 struct wpa_authenticator * wpa_init(const u8 *addr,
@@ -373,7 +374,8 @@ struct wpa_authenticator * wpa_init(const u8 *addr,
                return NULL;
        }
 
-       wpa_auth->pmksa = pmksa_cache_init(wpa_auth_pmksa_free_cb, wpa_auth);
+       wpa_auth->pmksa = pmksa_cache_auth_init(wpa_auth_pmksa_free_cb,
+                                               wpa_auth);
        if (wpa_auth->pmksa == NULL) {
                wpa_printf(MSG_ERROR, "PMKSA cache initialization failed.");
                os_free(wpa_auth->wpa_ie);
@@ -386,7 +388,7 @@ struct wpa_authenticator * wpa_init(const u8 *addr,
        if (wpa_auth->ft_pmk_cache == NULL) {
                wpa_printf(MSG_ERROR, "FT PMK cache initialization failed.");
                os_free(wpa_auth->wpa_ie);
-               pmksa_cache_deinit(wpa_auth->pmksa);
+               pmksa_cache_auth_deinit(wpa_auth->pmksa);
                os_free(wpa_auth);
                return NULL;
        }
@@ -422,7 +424,7 @@ void wpa_deinit(struct wpa_authenticator *wpa_auth)
                wpa_stsl_remove(wpa_auth, wpa_auth->stsl_negotiations);
 #endif /* CONFIG_PEERKEY */
 
-       pmksa_cache_deinit(wpa_auth->pmksa);
+       pmksa_cache_auth_deinit(wpa_auth->pmksa);
 
 #ifdef CONFIG_IEEE80211R
        wpa_ft_pmk_cache_deinit(wpa_auth->ft_pmk_cache);
@@ -2305,6 +2307,12 @@ int wpa_auth_pairwise_set(struct wpa_state_machine *sm)
 }
 
 
+int wpa_auth_get_pairwise(struct wpa_state_machine *sm)
+{
+       return sm->pairwise;
+}
+
+
 int wpa_auth_sta_key_mgmt(struct wpa_state_machine *sm)
 {
        if (sm == NULL)
@@ -2360,9 +2368,9 @@ int wpa_auth_pmksa_add(struct wpa_state_machine *sm, const u8 *pmk,
        if (sm == NULL || sm->wpa != WPA_VERSION_WPA2)
                return -1;
 
-       if (pmksa_cache_add(sm->wpa_auth->pmksa, pmk, PMK_LEN,
-                           sm->wpa_auth->addr, sm->addr, session_timeout,
-                           eapol, sm->wpa_key_mgmt))
+       if (pmksa_cache_auth_add(sm->wpa_auth->pmksa, pmk, PMK_LEN,
+                                sm->wpa_auth->addr, sm->addr, session_timeout,
+                                eapol, sm->wpa_key_mgmt))
                return 0;
 
        return -1;
@@ -2377,9 +2385,9 @@ int wpa_auth_pmksa_add_preauth(struct wpa_authenticator *wpa_auth,
        if (wpa_auth == NULL)
                return -1;
 
-       if (pmksa_cache_add(wpa_auth->pmksa, pmk, len, wpa_auth->addr,
-                           sta_addr, session_timeout, eapol,
-                           WPA_KEY_MGMT_IEEE8021X))
+       if (pmksa_cache_auth_add(wpa_auth->pmksa, pmk, len, wpa_auth->addr,
+                                sta_addr, session_timeout, eapol,
+                                WPA_KEY_MGMT_IEEE8021X))
                return 0;
 
        return -1;