From 21fdb454df8478f869053db41af39e7e9b291d27 Mon Sep 17 00:00:00 2001 From: Sreeramya Soratkal Date: Mon, 23 Nov 2020 13:21:53 +0530 Subject: [PATCH] P2P: Fix channel selection for operating class 129 The operating class 129 includes channels with a maximum bandwidth of 160 MHz with center frequency index 50 and 114. The previous definition of operating class 129 considered the center frequency index as actual channels resulting in incorrect channel setup for the operating class. Fix the definition of operating class 129 to consider channels with the center frequency index of 50 and 114. Also update the comment that describes the channel selection for operating 128, 129, and 130 which mentions wpas_p2p_allow_channel() verifies the channels while wpas_p2p_verify_channel() takes care of it. Signed-off-by: Sreeramya Soratkal --- src/common/ieee802_11_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/ieee802_11_common.c b/src/common/ieee802_11_common.c index c90e04ce7..764ece92a 100644 --- a/src/common/ieee802_11_common.c +++ b/src/common/ieee802_11_common.c @@ -1885,11 +1885,11 @@ const struct oper_class_map global_op_class[] = { * frequency index 42, 58, 106, 122, 138, 155 with channel spacing of * 80 MHz, but currently use the following definition for simplicity * (these center frequencies are not actual channels, which makes - * wpas_p2p_allow_channel() fail). wpas_p2p_verify_80mhz() should take + * wpas_p2p_verify_channel() fail). wpas_p2p_verify_80mhz() should take * care of removing invalid channels. */ { HOSTAPD_MODE_IEEE80211A, 128, 36, 161, 4, BW80, P2P_SUPP }, - { HOSTAPD_MODE_IEEE80211A, 129, 50, 114, 16, BW160, P2P_SUPP }, + { HOSTAPD_MODE_IEEE80211A, 129, 36, 128, 4, BW160, P2P_SUPP }, { HOSTAPD_MODE_IEEE80211A, 131, 1, 233, 4, BW20, NO_P2P_SUPP }, { HOSTAPD_MODE_IEEE80211A, 132, 1, 233, 8, BW40, NO_P2P_SUPP }, { HOSTAPD_MODE_IEEE80211A, 133, 1, 233, 16, BW80, NO_P2P_SUPP },