Disable per-BSSID authentication for RSN IBSS
[wpasupplicant] / wpa_supplicant / mlme.c
index ec63f51..964b8c0 100644 (file)
@@ -1738,9 +1738,9 @@ static void ieee80211_rx_mgmt_ft_action(struct wpa_supplicant *wpa_s,
 
 #ifdef CONFIG_IEEE80211W
 
-/* MLME-PING.response */
-static int ieee80211_sta_send_ping_resp(struct wpa_supplicant *wpa_s,
-                                       const u8 *addr, const u8 *trans_id)
+/* MLME-SAQuery.response */
+static int ieee80211_sta_send_sa_query_resp(struct wpa_supplicant *wpa_s,
+                                           const u8 *addr, const u8 *trans_id)
 {
        struct ieee80211_mgmt *mgmt;
        int res;
@@ -1749,7 +1749,7 @@ static int ieee80211_sta_send_ping_resp(struct wpa_supplicant *wpa_s,
        mgmt = os_zalloc(sizeof(*mgmt));
        if (mgmt == NULL) {
                wpa_printf(MSG_DEBUG, "MLME: Failed to allocate buffer for "
-                          "ping action frame");
+                          "SA Query action frame");
                return -1;
        }
 
@@ -1759,11 +1759,11 @@ static int ieee80211_sta_send_ping_resp(struct wpa_supplicant *wpa_s,
        os_memcpy(mgmt->bssid, wpa_s->bssid, ETH_ALEN);
        mgmt->frame_control = IEEE80211_FC(WLAN_FC_TYPE_MGMT,
                                           WLAN_FC_STYPE_ACTION);
-       mgmt->u.action.category = WLAN_ACTION_PING;
-       mgmt->u.action.u.ping_resp.action = WLAN_PING_RESPONSE;
-       os_memcpy(mgmt->u.action.u.ping_resp.trans_id, trans_id,
-                 WLAN_PING_TRANS_ID_LEN);
-       len += 1 + sizeof(mgmt->u.action.u.ping_resp);
+       mgmt->u.action.category = WLAN_ACTION_SA_QUERY;
+       mgmt->u.action.u.sa_query_resp.action = WLAN_SA_QUERY_RESPONSE;
+       os_memcpy(mgmt->u.action.u.sa_query_resp.trans_id, trans_id,
+                 WLAN_SA_QUERY_TR_ID_LEN);
+       len += 1 + sizeof(mgmt->u.action.u.sa_query_resp);
 
        res = ieee80211_sta_tx(wpa_s, (u8 *) mgmt, len);
        os_free(mgmt);
@@ -1772,36 +1772,36 @@ static int ieee80211_sta_send_ping_resp(struct wpa_supplicant *wpa_s,
 }
 
 
-static void ieee80211_rx_mgmt_ping_action(
+static void ieee80211_rx_mgmt_sa_query_action(
        struct wpa_supplicant *wpa_s, struct ieee80211_mgmt *mgmt, size_t len,
        struct ieee80211_rx_status *rx_status)
 {
-       if (len < 24 + 1 + sizeof(mgmt->u.action.u.ping_req)) {
-               wpa_printf(MSG_DEBUG, "MLME: Too short Ping Action frame");
+       if (len < 24 + 1 + sizeof(mgmt->u.action.u.sa_query_req)) {
+               wpa_printf(MSG_DEBUG, "MLME: Too short SA Query Action frame");
                return;
        }
 
-       if (mgmt->u.action.u.ping_req.action != WLAN_PING_REQUEST) {
-               wpa_printf(MSG_DEBUG, "MLME: Unexpected Ping Action %d",
-                          mgmt->u.action.u.ping_req.action);
+       if (mgmt->u.action.u.sa_query_req.action != WLAN_SA_QUERY_REQUEST) {
+               wpa_printf(MSG_DEBUG, "MLME: Unexpected SA Query Action %d",
+                          mgmt->u.action.u.sa_query_req.action);
                return;
        }
 
        if (os_memcmp(mgmt->sa, wpa_s->bssid, ETH_ALEN) != 0) {
-               wpa_printf(MSG_DEBUG, "MLME: Ignore ping from unknown source "
-                          MACSTR, MAC2STR(mgmt->sa));
+               wpa_printf(MSG_DEBUG, "MLME: Ignore SA Query from unknown "
+                          "source " MACSTR, MAC2STR(mgmt->sa));
                return;
        }
 
        if (wpa_s->mlme.state == IEEE80211_ASSOCIATE) {
-               wpa_printf(MSG_DEBUG, "MLME: Ignore ping request during "
+               wpa_printf(MSG_DEBUG, "MLME: Ignore SA query request during "
                           "association process");
                return;
        }
 
-       wpa_printf(MSG_DEBUG, "MLME: Replying to ping request");
-       ieee80211_sta_send_ping_resp(wpa_s, mgmt->sa,
-                                    mgmt->u.action.u.ping_req.trans_id);
+       wpa_printf(MSG_DEBUG, "MLME: Replying to SA Query request");
+       ieee80211_sta_send_sa_query_resp(wpa_s, mgmt->sa, mgmt->u.action.u.
+                                        sa_query_req.trans_id);
 }
 
 #endif /* CONFIG_IEEE80211W */
@@ -1824,8 +1824,8 @@ static void ieee80211_rx_mgmt_action(struct wpa_supplicant *wpa_s,
                break;
 #endif /* CONFIG_IEEE80211R */
 #ifdef CONFIG_IEEE80211W
-       case WLAN_ACTION_PING:
-               ieee80211_rx_mgmt_ping_action(wpa_s, mgmt, len, rx_status);
+       case WLAN_ACTION_SA_QUERY:
+               ieee80211_rx_mgmt_sa_query_action(wpa_s, mgmt, len, rx_status);
                break;
 #endif /* CONFIG_IEEE80211W */
        default: