]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wpa_supplicant: Add ieee80211ac information in STATUS
authorBhagavathi Perumal S <bperumal@codeaurora.org>
Tue, 24 Apr 2018 07:54:20 +0000 (13:24 +0530)
committerJouni Malinen <j@w1.fi>
Fri, 4 May 2018 17:18:55 +0000 (20:18 +0300)
This allows user to get current operating mode of station.

Signed-off-by: Bhagavathi Perumal S <bperumal@codeaurora.org>
wpa_supplicant/ctrl_iface.c
wpa_supplicant/events.c
wpa_supplicant/wpa_supplicant_i.h

index 2080419d1c2b32559d148c7592788bad832a6a2a..fe39c25b7a9618d622f68d675ed8159f6fafbe67 100644 (file)
@@ -2292,6 +2292,13 @@ static int wpa_supplicant_ctrl_iface_status(struct wpa_supplicant *wpa_s,
        }
 #endif /* CONFIG_WPS */
 
+       if (wpa_s->ieee80211ac) {
+               ret = os_snprintf(pos, end - pos, "ieee80211ac=1\n");
+               if (os_snprintf_error(end - pos, ret))
+                       return pos - buf;
+               pos += ret;
+       }
+
 #ifdef ANDROID
        /*
         * Allow using the STATUS command with default behavior, say for debug,
index 2fa3381006b1407cebc6f08c955b450c5552cd3e..02dfedd81aac9f21ef3d8b91478c6b498763b5bf 100644 (file)
@@ -319,6 +319,7 @@ void wpa_supplicant_mark_disassoc(struct wpa_supplicant *wpa_s)
        wpa_s->last_tk_alg = WPA_ALG_NONE;
        os_memset(wpa_s->last_tk, 0, sizeof(wpa_s->last_tk));
 #endif /* CONFIG_TESTING_OPTIONS */
+       wpa_s->ieee80211ac = 0;
 }
 
 
@@ -2300,6 +2301,10 @@ static int wpa_supplicant_event_associnfo(struct wpa_supplicant *wpa_s,
                interworking_process_assoc_resp(wpa_s, data->assoc_info.resp_ies,
                                                data->assoc_info.resp_ies_len);
 #endif /* CONFIG_INTERWORKING */
+               if (wpa_s->hw_capab == CAPAB_VHT &&
+                   get_ie(data->assoc_info.resp_ies,
+                          data->assoc_info.resp_ies_len, WLAN_EID_VHT_CAP))
+                       wpa_s->ieee80211ac = 1;
        }
        if (data->assoc_info.beacon_ies)
                wpa_hexdump(MSG_DEBUG, "beacon_ies",
index 4d18177fb530ac3838cfa4a1e673377d2d002dd5..2b0dca0ef2feb9d6edf3db94b182bd070c45b82d 100644 (file)
@@ -1225,6 +1225,7 @@ struct wpa_supplicant {
 #ifdef CONFIG_FILS
        unsigned int disable_fils:1;
 #endif /* CONFIG_FILS */
+       unsigned int ieee80211ac:1;
 };