]> git.ipfire.org Git - thirdparty/hostap.git/blobdiff - wpa_supplicant/sme.c
Support HT capability overrides
[thirdparty/hostap.git] / wpa_supplicant / sme.c
index 8e1d95a946ee3cf77df605a6916530a0651383da..c07b7a6316fdfebe38cf630cc4922f42ef7a7436 100644 (file)
@@ -265,8 +265,8 @@ void sme_authenticate(struct wpa_supplicant *wpa_s,
        if (wpa_drv_authenticate(wpa_s, &params) < 0) {
                wpa_msg(wpa_s, MSG_INFO, "SME: Authentication request to the "
                        "driver failed");
-               wpa_supplicant_set_state(wpa_s, WPA_DISCONNECTED);
                wpas_connection_failed(wpa_s, bss->bssid);
+               wpa_supplicant_mark_disassoc(wpa_s);
                return;
        }
 
@@ -367,6 +367,10 @@ void sme_associate(struct wpa_supplicant *wpa_s, enum wpas_mode mode,
 {
        struct wpa_driver_associate_params params;
        struct ieee802_11_elems elems;
+#ifdef CONFIG_HT_OVERRIDES
+       struct ieee80211_ht_capabilities htcaps;
+       struct ieee80211_ht_capabilities htcaps_mask;
+#endif /* CONFIG_HT_OVERRIDES */
 
        os_memset(&params, 0, sizeof(params));
        params.bssid = bssid;
@@ -378,6 +382,13 @@ void sme_associate(struct wpa_supplicant *wpa_s, enum wpas_mode mode,
        params.wpa_ie_len = wpa_s->sme.assoc_req_ie_len;
        params.pairwise_suite = cipher_suite2driver(wpa_s->pairwise_cipher);
        params.group_suite = cipher_suite2driver(wpa_s->group_cipher);
+#ifdef CONFIG_HT_OVERRIDES
+       os_memset(&htcaps, 0, sizeof(htcaps));
+       os_memset(&htcaps_mask, 0, sizeof(htcaps_mask));
+       params.htcaps = (u8 *) &htcaps;
+       params.htcaps_mask = (u8 *) &htcaps_mask;
+       wpa_supplicant_apply_ht_overrides(wpa_s, wpa_s->current_ssid, &params);
+#endif /* CONFIG_HT_OVERRIDES */
 #ifdef CONFIG_IEEE80211R
        if (auth_type == WLAN_AUTH_FT && wpa_s->sme.ft_ies) {
                params.wpa_ie = wpa_s->sme.ft_ies;
@@ -504,6 +515,7 @@ void sme_event_auth_timed_out(struct wpa_supplicant *wpa_s,
 {
        wpa_dbg(wpa_s, MSG_DEBUG, "SME: Authentication timed out");
        wpas_connection_failed(wpa_s, wpa_s->pending_bssid);
+       wpa_supplicant_mark_disassoc(wpa_s);
 }