wpa_supplicant: Apply VHT_OVERRIDES to wpas_start_assoc_cb()
authorPaul Stewart <pstew@chromium.org>
Fri, 14 Mar 2014 04:33:43 +0000 (21:33 -0700)
committerJouni Malinen <j@w1.fi>
Fri, 14 Mar 2014 19:50:58 +0000 (21:50 +0200)
A previous patch "Support VHT capability overrides" missed one
place where HT overrides were being applied and where it would
also be useful to apply VHT overrides.

Signed-hostap: Paul Stewart <pstew@chromium.org>

wpa_supplicant/wpa_supplicant.c

index 6a04e5a..bde038e 100644 (file)
@@ -1438,6 +1438,10 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit)
        struct ieee80211_ht_capabilities htcaps;
        struct ieee80211_ht_capabilities htcaps_mask;
 #endif /* CONFIG_HT_OVERRIDES */
+#ifdef CONFIG_VHT_OVERRIDES
+       struct ieee80211_vht_capabilities vhtcaps;
+       struct ieee80211_vht_capabilities vhtcaps_mask;
+#endif /* CONFIG_VHT_OVERRIDES */
 
        if (deinit) {
                if (work->started) {
@@ -1785,6 +1789,13 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit)
        params.htcaps_mask = (u8 *) &htcaps_mask;
        wpa_supplicant_apply_ht_overrides(wpa_s, ssid, &params);
 #endif /* CONFIG_HT_OVERRIDES */
+#ifdef CONFIG_VHT_OVERRIDES
+       os_memset(&vhtcaps, 0, sizeof(vhtcaps));
+       os_memset(&vhtcaps_mask, 0, sizeof(vhtcaps_mask));
+       params.vhtcaps = &vhtcaps;
+       params.vhtcaps_mask = &vhtcaps_mask;
+       wpa_supplicant_apply_vht_overrides(wpa_s, wpa_s->current_ssid, &params);
+#endif /* CONFIG_VHT_OVERRIDES */
 
 #ifdef CONFIG_P2P
        /*