From 7813a3d4e0035e27c42c0ece754ae290dddce5d4 Mon Sep 17 00:00:00 2001 From: Vignesh Viswanathan Date: Mon, 27 Aug 2018 19:09:00 +0530 Subject: [PATCH] qcacld-3.0: Set the minsize of SuppChannels IE to 2 qcacld-2.0 to qcacld-3.0 propagation. Some stations send association request with zero length of SuppChannels IE then currently dot11f decodes it to an invalid value. To fix this, set the minsize of SuppChannels IE to 2. Change-Id: If44807d2f2b8a62e5a137ca3d17af2e2654f72f2 CRs-Fixed: 2303702 --- core/mac/src/cfg/cfgUtil/dot11f.frms | 2 +- core/mac/src/include/dot11f.h | 4 ++-- core/mac/src/sys/legacy/src/utils/src/dot11f.c | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/core/mac/src/cfg/cfgUtil/dot11f.frms b/core/mac/src/cfg/cfgUtil/dot11f.frms index 694d38d64e59..27f37004b843 100644 --- a/core/mac/src/cfg/cfgUtil/dot11f.frms +++ b/core/mac/src/cfg/cfgUtil/dot11f.frms @@ -1378,7 +1378,7 @@ IE TPCReport (EID_TPC_REPORT) // 7.3.2.18 IE SuppChannels (EID_SUPPORTED_CHANNELS) // 7.2.3.19 { - bands[2][1..48]; + bands[2][0..48]; } IE SuppOperatingClasses (EID_SUPPORTED_OPER_CLASSES) diff --git a/core/mac/src/include/dot11f.h b/core/mac/src/include/dot11f.h index c48dc42411f2..0a8bc6c554f8 100644 --- a/core/mac/src/include/dot11f.h +++ b/core/mac/src/include/dot11f.h @@ -26,7 +26,7 @@ * * * This file was automatically generated by 'framesc' - * Wed Aug 22 00:52:30 2018 from the following file(s): + * Mon Aug 27 19:08:28 2018 from the following file(s): * * dot11f.frms * @@ -6849,7 +6849,7 @@ typedef struct sDot11fIESuppChannels { #define DOT11F_EID_SUPPCHANNELS (36) /* N.B. These #defines do *not* include the EID & length */ -#define DOT11F_IE_SUPPCHANNELS_MIN_LEN (2) +#define DOT11F_IE_SUPPCHANNELS_MIN_LEN (0) #define DOT11F_IE_SUPPCHANNELS_MAX_LEN (96) diff --git a/core/mac/src/sys/legacy/src/utils/src/dot11f.c b/core/mac/src/sys/legacy/src/utils/src/dot11f.c index be4b07bf4d75..c312aaf8e68d 100644 --- a/core/mac/src/sys/legacy/src/utils/src/dot11f.c +++ b/core/mac/src/sys/legacy/src/utils/src/dot11f.c @@ -24,7 +24,7 @@ * * * This file was automatically generated by 'framesc' - * Wed Aug 22 00:52:30 2018 from the following file(s): + * Mon Aug 27 19:08:28 2018 from the following file(s): * * dot11f.frms * @@ -9484,7 +9484,7 @@ static const tIEDefn IES_AssocRequest[] = { 0, DOT11F_EID_POWERCAPS, 0, 0, }, { offsetof(tDot11fAssocRequest, SuppChannels), offsetof(tDot11fIESuppChannels, present), 0, "SuppChannels", - 0, 4, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, + 0, 2, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPCHANNELS, 0, 0, }, { offsetof(tDot11fAssocRequest, HTCaps), offsetof(tDot11fIEHTCaps, present), 0, "HTCaps", 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, @@ -11304,7 +11304,7 @@ static const tIEDefn IES_ReAssocRequest[] = { 0, DOT11F_EID_POWERCAPS, 0, 0, }, { offsetof(tDot11fReAssocRequest, SuppChannels), offsetof(tDot11fIESuppChannels, present), 0, "SuppChannels", - 0, 4, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, + 0, 2, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPCHANNELS, 0, 0, }, { offsetof(tDot11fReAssocRequest, RSNOpaque), offsetof(tDot11fIERSNOpaque, present), 0, "RSNOpaque", @@ -11713,7 +11713,7 @@ static const tIEDefn IES_TDLSDisRsp[] = { 0, DOT11F_EID_EXTSUPPRATES, 0, 0, }, { offsetof(tDot11fTDLSDisRsp, SuppChannels), offsetof(tDot11fIESuppChannels, present), 0, "SuppChannels", - 0, 4, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, + 0, 2, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPCHANNELS, 0, 0, }, { offsetof(tDot11fTDLSDisRsp, SuppOperatingClasses), offsetof(tDot11fIESuppOperatingClasses, present), 0, @@ -11923,7 +11923,7 @@ static const tIEDefn IES_TDLSSetupReq[] = { 0, DOT11F_EID_EXTSUPPRATES, 0, 0, }, { offsetof(tDot11fTDLSSetupReq, SuppChannels), offsetof(tDot11fIESuppChannels, present), 0, "SuppChannels", - 0, 4, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, + 0, 2, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPCHANNELS, 0, 0, }, { offsetof(tDot11fTDLSSetupReq, RSN), offsetof(tDot11fIERSN, present), 0, "RSN", 0, 4, 132, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, 0, }, @@ -12012,7 +12012,7 @@ static const tIEDefn IES_TDLSSetupRsp[] = { 0, DOT11F_EID_EXTSUPPRATES, 0, 0, }, { offsetof(tDot11fTDLSSetupRsp, SuppChannels), offsetof(tDot11fIESuppChannels, present), 0, "SuppChannels", - 0, 4, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, + 0, 2, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPCHANNELS, 0, 0, }, { offsetof(tDot11fTDLSSetupRsp, RSN), offsetof(tDot11fIERSN, present), 0, "RSN", 0, 4, 132, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, 0, },