diff mbox

wpa_supplicant: Apply VHT_OVERRIDES to wpas_start_assoc_cb

Message ID 20140314043757.D4F7120067B@clearcreek.mtv.corp.google.com
State Accepted
Headers show

Commit Message

Paul Stewart March 14, 2014, 4:33 a.m. UTC
A previous patch "Support VHT capability overrides" missed one
place where HT overrides were being applied and where it would
also be useful to appy VHT overrides.

Signed-hostap: Paul Stewart <pstew@chromium.org>
---
 wpa_supplicant/wpa_supplicant.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Jouni Malinen March 14, 2014, 10:23 p.m. UTC | #1
On Thu, Mar 13, 2014 at 09:33:43PM -0700, Paul Stewart wrote:
> A previous patch "Support VHT capability overrides" missed one
> place where HT overrides were being applied and where it would
> also be useful to appy VHT overrides.

Thanks, applied.
diff mbox

Patch

diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 6a04e5a..bde038e 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -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
 	/*