From 5e1da9c8fdcadb0171d5448fa09960f976804155 Mon Sep 17 00:00:00 2001 From: Ahmad Kholaif Date: Wed, 28 Oct 2015 14:14:10 -0700 Subject: [PATCH] P2P: Define operating classes for VHT 80+80 and 160 This adds definitions for the global operating classes 129 and 130 for VHT 80+80 MHz and 160 MHz use cases. Signed-off-by: Jouni Malinen --- src/p2p/p2p.h | 2 +- src/p2p/p2p_go_neg.c | 2 +- wpa_supplicant/p2p_supplicant.c | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/p2p/p2p.h b/src/p2p/p2p.h index 1839357af..fe7f53b15 100644 --- a/src/p2p/p2p.h +++ b/src/p2p/p2p.h @@ -31,7 +31,7 @@ /** * P2P_MAX_REG_CLASSES - Maximum number of regulatory classes */ -#define P2P_MAX_REG_CLASSES 10 +#define P2P_MAX_REG_CLASSES 15 /** * P2P_MAX_REG_CLASS_CHANNELS - Maximum number of channels per regulatory class diff --git a/src/p2p/p2p_go_neg.c b/src/p2p/p2p_go_neg.c index 096ccd60a..049ce6e93 100644 --- a/src/p2p/p2p_go_neg.c +++ b/src/p2p/p2p_go_neg.c @@ -384,7 +384,7 @@ void p2p_reselect_channel(struct p2p_data *p2p, unsigned int i; const int op_classes_5ghz[] = { 124, 125, 115, 0 }; const int op_classes_ht40[] = { 126, 127, 116, 117, 0 }; - const int op_classes_vht[] = { 128, 0 }; + const int op_classes_vht[] = { 128, 129, 130, 0 }; if (p2p->own_freq_preference > 0 && p2p_freq_to_channel(p2p->own_freq_preference, diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index ea4bd0e26..bf0336fb6 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -3323,7 +3323,7 @@ struct p2p_oper_class_map { u8 min_chan; u8 max_chan; u8 inc; - enum { BW20, BW40PLUS, BW40MINUS, BW80, BW2160 } bw; + enum { BW20, BW40PLUS, BW40MINUS, BW80, BW2160, BW160, BW80P80 } bw; }; static const struct p2p_oper_class_map op_class[] = { @@ -3349,6 +3349,8 @@ static const struct p2p_oper_class_map op_class[] = { * removing invalid channels. */ { HOSTAPD_MODE_IEEE80211A, 128, 36, 161, 4, BW80 }, + { HOSTAPD_MODE_IEEE80211A, 130, 36, 161, 4, BW80P80 }, + { HOSTAPD_MODE_IEEE80211A, 129, 50, 114, 16, BW160 }, { HOSTAPD_MODE_IEEE80211AD, 180, 1, 4, 1, BW2160 }, { -1, 0, 0, 0, 0, BW20 } };