summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKiran Kumar Lokere <klokere@codeaurora.org>2017-09-26 12:11:43 -0700
committersnandini <snandini@codeaurora.org>2017-09-26 21:37:41 -0700
commita108db51fbb536e59252be2391f3ef8895e00f7e (patch)
treebe357cf3d4fbd3e76fea54f4416859f4e13fcbd0
parentbe203451db22ebe0aacc6a9c1855d99e6205eac7 (diff)
qcacld-3.0: Do not check sub type in vendor VHT IE parsing
Vendor VHT IE carries different sub type values from different devices hence vendor VHT IE parsing fails if sub type value is considered to check IE presence. Do not check for sub type value in vendor VHT IE parsing Change-Id: I50a8916214c17c1873fd90b65d29e48f1fa13994 CRs-Fixed: 2115113
-rw-r--r--core/mac/src/cfg/cfgUtil/dot11f.frms3
-rw-r--r--core/mac/src/include/dot11f.h5
-rw-r--r--core/mac/src/pe/include/lim_session.h1
-rw-r--r--core/mac/src/pe/lim/lim_assoc_utils.c2
-rw-r--r--core/mac/src/pe/lim/lim_send_frames_host_roam.c2
-rw-r--r--core/mac/src/pe/lim/lim_send_management_frames.c4
-rw-r--r--core/mac/src/sys/legacy/src/utils/src/dot11f.c43
-rw-r--r--core/mac/src/sys/legacy/src/utils/src/parser_api.c13
8 files changed, 50 insertions, 23 deletions
diff --git a/core/mac/src/cfg/cfgUtil/dot11f.frms b/core/mac/src/cfg/cfgUtil/dot11f.frms
index 74ba932edc3e..e01f2285928d 100644
--- a/core/mac/src/cfg/cfgUtil/dot11f.frms
+++ b/core/mac/src/cfg/cfgUtil/dot11f.frms
@@ -3106,8 +3106,9 @@ MULTIIE MBO_IE (EID_VENDOR_SPECIFIC) OUI ( 0x50, 0x6F, 0x9A, 0x16 )
OPTIONALTLV reduced_wan_metrics;
}
-IE vendor_vht_ie (EID_VENDOR_SPECIFIC) OUI (0x00, 0x90, 0x4c, 0x04, 0x08)
+IE vendor_vht_ie (EID_VENDOR_SPECIFIC) OUI (0x00, 0x90, 0x4c, 0x04)
{
+ sub_type, 1;
OPTIE IE VHTCaps;
OPTIE IE VHTOperation;
}
diff --git a/core/mac/src/include/dot11f.h b/core/mac/src/include/dot11f.h
index 850221cebd26..219010e27877 100644
--- a/core/mac/src/include/dot11f.h
+++ b/core/mac/src/include/dot11f.h
@@ -35,7 +35,7 @@
*
*
* This file was automatically generated by 'framesc'
- * Thu Aug 3 18:27:10 2017 from the following file(s):
+ * Tue Sep 26 10:47:40 2017 from the following file(s):
*
* dot11f.frms
*
@@ -8726,9 +8726,10 @@ uint32_t dot11f_get_packed_ie_sec_chan_offset_ele(
}; /* End extern "C". */
#endif /* C++ */
-/* EID 221 (0xdd) {OUI 0x00, 0x90, 0x4c, 0x04, 0x08} */
+/* EID 221 (0xdd) {OUI 0x00, 0x90, 0x4c, 0x04} */
typedef struct sDot11fIEvendor_vht_ie {
uint8_t present;
+ uint8_t sub_type;
tDot11fIEVHTCaps VHTCaps;
tDot11fIEVHTOperation VHTOperation;
} tDot11fIEvendor_vht_ie;
diff --git a/core/mac/src/pe/include/lim_session.h b/core/mac/src/pe/include/lim_session.h
index 4568292365db..e5e13e3912eb 100644
--- a/core/mac/src/pe/include/lim_session.h
+++ b/core/mac/src/pe/include/lim_session.h
@@ -472,6 +472,7 @@ typedef struct sPESession /* Added to Support BT-AMP */
#endif
uint8_t sap_dot11mc;
bool is_vendor_specific_vhtcaps;
+ uint8_t vendor_specific_vht_ie_sub_type;
bool vendor_vht_sap;
/* HS 2.0 Indication */
tDot11fIEhs20vendor_ie hs20vendor_ie;
diff --git a/core/mac/src/pe/lim/lim_assoc_utils.c b/core/mac/src/pe/lim/lim_assoc_utils.c
index 4de7c282d714..a1d1dc5d88dd 100644
--- a/core/mac/src/pe/lim/lim_assoc_utils.c
+++ b/core/mac/src/pe/lim/lim_assoc_utils.c
@@ -3219,6 +3219,8 @@ lim_check_and_announce_join_success(tpAniSirGlobal mac_ctx,
if ((IS_DOT11_MODE_VHT(session_entry->dot11mode)) &&
beacon_probe_rsp->vendor_vht_ie.VHTCaps.present) {
session_entry->is_vendor_specific_vhtcaps = true;
+ session_entry->vendor_specific_vht_ie_sub_type =
+ beacon_probe_rsp->vendor_vht_ie.sub_type;
pe_debug("VHT caps are present in vendor specific IE");
}
diff --git a/core/mac/src/pe/lim/lim_send_frames_host_roam.c b/core/mac/src/pe/lim/lim_send_frames_host_roam.c
index e8a39163bcc3..edf9421c03f1 100644
--- a/core/mac/src/pe/lim/lim_send_frames_host_roam.c
+++ b/core/mac/src/pe/lim/lim_send_frames_host_roam.c
@@ -303,6 +303,8 @@ void lim_send_reassoc_req_with_ft_ies_mgmt_frame(tpAniSirGlobal mac_ctx,
pe_session->is_vendor_specific_vhtcaps) {
pe_debug("Populate Vendor VHT IEs in Re-Assoc Request");
frm.vendor_vht_ie.present = 1;
+ frm.vendor_vht_ie.sub_type =
+ pe_session->vendor_specific_vht_ie_sub_type;
frm.vendor_vht_ie.VHTCaps.present = 1;
populate_dot11f_vht_caps(mac_ctx, pe_session,
&frm.vendor_vht_ie.VHTCaps);
diff --git a/core/mac/src/pe/lim/lim_send_management_frames.c b/core/mac/src/pe/lim/lim_send_management_frames.c
index 091e36dd537f..fc80cfac242d 100644
--- a/core/mac/src/pe/lim/lim_send_management_frames.c
+++ b/core/mac/src/pe/lim/lim_send_management_frames.c
@@ -1230,6 +1230,8 @@ lim_send_assoc_rsp_mgmt_frame(tpAniSirGlobal mac_ctx,
assoc_req->vendor_vht_ie.VHTCaps.present) {
pe_debug("Populate Vendor VHT IEs in Assoc Rsponse");
frm.vendor_vht_ie.present = 1;
+ frm.vendor_vht_ie.sub_type =
+ pe_session->vendor_specific_vht_ie_sub_type;
frm.vendor_vht_ie.VHTCaps.present = 1;
populate_dot11f_vht_caps(mac_ctx, pe_session,
&frm.vendor_vht_ie.VHTCaps);
@@ -1819,6 +1821,8 @@ lim_send_assoc_req_mgmt_frame(tpAniSirGlobal mac_ctx,
pe_session->is_vendor_specific_vhtcaps) {
pe_debug("Populate Vendor VHT IEs in Assoc Request");
frm->vendor_vht_ie.present = 1;
+ frm->vendor_vht_ie.sub_type =
+ pe_session->vendor_specific_vht_ie_sub_type;
frm->vendor_vht_ie.VHTCaps.present = 1;
populate_dot11f_vht_caps(mac_ctx, pe_session,
&frm->vendor_vht_ie.VHTCaps);
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 d801eacc3ad7..c0352c3ba897 100644
--- a/core/mac/src/sys/legacy/src/utils/src/dot11f.c
+++ b/core/mac/src/sys/legacy/src/utils/src/dot11f.c
@@ -33,7 +33,7 @@
*
*
* This file was automatically generated by 'framesc'
- * Tue Aug 22 17:42:59 2017 from the following file(s):
+ * Tue Sep 26 10:47:40 2017 from the following file(s):
*
* dot11f.frms
*
@@ -6564,6 +6564,9 @@ uint32_t dot11f_unpack_ie_vendor_vht_ie(tpAniSirGlobal pCtx,
if (pDst->present)
status = DOT11F_DUPLICATE_IE;
pDst->present = 1;
+ pDst->sub_type = *pBuf;
+ pBuf += 1;
+ ielen -= (uint8_t)1;
(void)pCtx;
status |= unpack_core(pCtx,
pBuf,
@@ -6820,8 +6823,8 @@ static const tIEDefn IES_AssocRequest[] = {
4, DOT11F_EID_WFDIEOPAQUE, 0, 0, },
{ offsetof(tDot11fAssocRequest, vendor_vht_ie),
offsetof(tDot11fIEvendor_vht_ie, present), 0, "vendor_vht_ie",
- 0, 7, 28, SigIevendor_vht_ie, {0, 144, 76, 4, 8},
- 5, DOT11F_EID_VENDOR_VHT_IE, 0, 0, },
+ 0, 7, 28, SigIevendor_vht_ie, {0, 144, 76, 4, 0},
+ 4, DOT11F_EID_VENDOR_VHT_IE, 0, 0, },
{ offsetof(tDot11fAssocRequest, hs20vendor_ie),
offsetof(tDot11fIEhs20vendor_ie, present), 0, "hs20vendor_ie",
0, 7, 9, SigIehs20vendor_ie, {80, 111, 154, 16, 0},
@@ -6980,8 +6983,8 @@ static const tIEDefn IES_AssocResponse[] = {
0, DOT11F_EID_FILS_KDE, 7, 0, },
{ offsetof(tDot11fAssocResponse, vendor_vht_ie),
offsetof(tDot11fIEvendor_vht_ie, present), 0, "vendor_vht_ie",
- 0, 7, 28, SigIevendor_vht_ie, {0, 144, 76, 4, 8},
- 5, DOT11F_EID_VENDOR_VHT_IE, 0, 0, },
+ 0, 7, 28, SigIevendor_vht_ie, {0, 144, 76, 4, 0},
+ 4, DOT11F_EID_VENDOR_VHT_IE, 0, 0, },
{ offsetof(tDot11fAssocResponse, MBO_IE), offsetof(tDot11fIEMBO_IE,
present), 0, "MBO_IE", 0, 6, 295, SigIeMBO_IE, {80, 111, 154, 22, 0},
4, DOT11F_EID_MBO_IE, 0, 0, },
@@ -7239,8 +7242,8 @@ static const tIEDefn IES_Beacon[] = {
3, DOT11F_EID_VENDOR1IE, 0, 0, },
{ offsetof(tDot11fBeacon, vendor_vht_ie),
offsetof(tDot11fIEvendor_vht_ie, present), 0, "vendor_vht_ie",
- 0, 7, 28, SigIevendor_vht_ie, {0, 144, 76, 4, 8},
- 5, DOT11F_EID_VENDOR_VHT_IE, 0, 0, },
+ 0, 7, 28, SigIevendor_vht_ie, {0, 144, 76, 4, 0},
+ 4, DOT11F_EID_VENDOR_VHT_IE, 0, 0, },
{ offsetof(tDot11fBeacon, Vendor3IE), offsetof(tDot11fIEVendor3IE,
present), 0, "Vendor3IE", 0, 5, 5, SigIeVendor3IE, {0, 22, 50, 0, 0},
3, DOT11F_EID_VENDOR3IE, 0, 0, },
@@ -7454,8 +7457,8 @@ static const tIEDefn IES_Beacon2[] = {
3, DOT11F_EID_VENDOR1IE, 0, 0, },
{ offsetof(tDot11fBeacon2, vendor_vht_ie),
offsetof(tDot11fIEvendor_vht_ie, present), 0, "vendor_vht_ie",
- 0, 7, 28, SigIevendor_vht_ie, {0, 144, 76, 4, 8},
- 5, DOT11F_EID_VENDOR_VHT_IE, 0, 0, },
+ 0, 7, 28, SigIevendor_vht_ie, {0, 144, 76, 4, 0},
+ 4, DOT11F_EID_VENDOR_VHT_IE, 0, 0, },
{ offsetof(tDot11fBeacon2, Vendor3IE), offsetof(tDot11fIEVendor3IE,
present), 0, "Vendor3IE", 0, 5, 5, SigIeVendor3IE, {0, 22, 50, 0, 0},
3, DOT11F_EID_VENDOR3IE, 0, 0, },
@@ -7665,8 +7668,8 @@ static const tIEDefn IES_BeaconIEs[] = {
3, DOT11F_EID_VENDOR1IE, 0, 0, },
{ offsetof(tDot11fBeaconIEs, vendor_vht_ie),
offsetof(tDot11fIEvendor_vht_ie, present), 0, "vendor_vht_ie",
- 0, 7, 28, SigIevendor_vht_ie, {0, 144, 76, 4, 8},
- 5, DOT11F_EID_VENDOR_VHT_IE, 0, 0, },
+ 0, 7, 28, SigIevendor_vht_ie, {0, 144, 76, 4, 0},
+ 4, DOT11F_EID_VENDOR_VHT_IE, 0, 0, },
{ offsetof(tDot11fBeaconIEs, Vendor3IE), offsetof(tDot11fIEVendor3IE,
present), 0, "Vendor3IE", 0, 5, 5, SigIeVendor3IE, {0, 22, 50, 0, 0},
3, DOT11F_EID_VENDOR3IE, 0, 0, },
@@ -8289,8 +8292,8 @@ static const tIEDefn IES_ProbeResponse[] = {
3, DOT11F_EID_VENDOR1IE, 0, 0, },
{ offsetof(tDot11fProbeResponse, vendor_vht_ie),
offsetof(tDot11fIEvendor_vht_ie, present), 0, "vendor_vht_ie",
- 0, 7, 28, SigIevendor_vht_ie, {0, 144, 76, 4, 8},
- 5, DOT11F_EID_VENDOR_VHT_IE, 0, 0, },
+ 0, 7, 28, SigIevendor_vht_ie, {0, 144, 76, 4, 0},
+ 4, DOT11F_EID_VENDOR_VHT_IE, 0, 0, },
{ offsetof(tDot11fProbeResponse, Vendor3IE), offsetof(tDot11fIEVendor3IE,
present), 0, "Vendor3IE", 0, 5, 5, SigIeVendor3IE, {0, 22, 50, 0, 0},
3, DOT11F_EID_VENDOR3IE, 0, 0, },
@@ -8559,8 +8562,8 @@ static const tIEDefn IES_ReAssocRequest[] = {
0, DOT11F_EID_QOSMAPSET, 0, 0, },
{ offsetof(tDot11fReAssocRequest, vendor_vht_ie),
offsetof(tDot11fIEvendor_vht_ie, present), 0, "vendor_vht_ie",
- 0, 7, 28, SigIevendor_vht_ie, {0, 144, 76, 4, 8},
- 5, DOT11F_EID_VENDOR_VHT_IE, 0, 0, },
+ 0, 7, 28, SigIevendor_vht_ie, {0, 144, 76, 4, 0},
+ 4, DOT11F_EID_VENDOR_VHT_IE, 0, 0, },
{ offsetof(tDot11fReAssocRequest, hs20vendor_ie),
offsetof(tDot11fIEhs20vendor_ie, present), 0, "hs20vendor_ie",
0, 7, 9, SigIehs20vendor_ie, {80, 111, 154, 16, 0},
@@ -8696,8 +8699,8 @@ static const tIEDefn IES_ReAssocResponse[] = {
0, DOT11F_EID_QOSMAPSET, 0, 0, },
{ offsetof(tDot11fReAssocResponse, vendor_vht_ie),
offsetof(tDot11fIEvendor_vht_ie, present), 0, "vendor_vht_ie",
- 0, 7, 28, SigIevendor_vht_ie, {0, 144, 76, 4, 8},
- 5, DOT11F_EID_VENDOR_VHT_IE, 0, 0, },
+ 0, 7, 28, SigIevendor_vht_ie, {0, 144, 76, 4, 0},
+ 4, DOT11F_EID_VENDOR_VHT_IE, 0, 0, },
{ offsetof(tDot11fReAssocResponse, MBO_IE), offsetof(tDot11fIEMBO_IE,
present), 0, "MBO_IE", 0, 6, 295, SigIeMBO_IE, {80, 111, 154, 22, 0},
4, DOT11F_EID_MBO_IE, 0, 0, },
@@ -12613,6 +12616,7 @@ uint32_t dot11f_get_packed_ie_vendor_vht_ie(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void)pCtx;
while (pIe->present) {
+ *pnNeeded += 1;
status = get_packed_size_core(pCtx, (uint8_t *)pIe, pnNeeded,
IES_vendor_vht_ie);
break;
@@ -22568,8 +22572,9 @@ uint32_t dot11f_pack_ie_vendor_vht_ie(tpAniSirGlobal pCtx,
++pBuf; --nBuf; ++(*pnConsumed);
*pBuf = 0x4;
++pBuf; --nBuf; ++(*pnConsumed);
- *pBuf = 0x8;
- ++pBuf; --nBuf; ++(*pnConsumed);
+ *pBuf = pSrc->sub_type;
+ *pnConsumed += 1;
+ pBuf += 1;
status = pack_core(pCtx,
(uint8_t *)pSrc,
pBuf,
diff --git a/core/mac/src/sys/legacy/src/utils/src/parser_api.c b/core/mac/src/sys/legacy/src/utils/src/parser_api.c
index 6b3680f5686d..a8abf6f8b7e3 100644
--- a/core/mac/src/sys/legacy/src/utils/src/parser_api.c
+++ b/core/mac/src/sys/legacy/src/utils/src/parser_api.c
@@ -2668,6 +2668,8 @@ tSirRetStatus sir_convert_probe_frame2_struct(tpAniSirGlobal pMac,
pProbeResp->Vendor3IEPresent = pr->Vendor3IE.present;
pProbeResp->vendor_vht_ie.present = pr->vendor_vht_ie.present;
+ if (pr->vendor_vht_ie.present)
+ pProbeResp->vendor_vht_ie.sub_type = pr->vendor_vht_ie.sub_type;
if (pr->vendor_vht_ie.VHTCaps.present) {
qdf_mem_copy(&pProbeResp->vendor_vht_ie.VHTCaps,
&pr->vendor_vht_ie.VHTCaps,
@@ -2902,6 +2904,7 @@ sir_convert_assoc_req_frame2_struct(tpAniSirGlobal pMac,
pAssocReq->vendor_vht_ie.present = ar->vendor_vht_ie.present;
if (ar->vendor_vht_ie.present) {
+ pAssocReq->vendor_vht_ie.sub_type = ar->vendor_vht_ie.sub_type;
if (ar->vendor_vht_ie.VHTCaps.present) {
qdf_mem_copy(&pAssocReq->vendor_vht_ie.VHTCaps,
&ar->vendor_vht_ie.VHTCaps,
@@ -3210,6 +3213,8 @@ sir_convert_assoc_resp_frame2_struct(tpAniSirGlobal pMac,
}
pAssocRsp->vendor_vht_ie.present = ar->vendor_vht_ie.present;
+ if (ar->vendor_vht_ie.present)
+ pAssocRsp->vendor_vht_ie.sub_type = ar->vendor_vht_ie.sub_type;
if (ar->OBSSScanParameters.present) {
qdf_mem_copy(&pAssocRsp->obss_scanparams,
&ar->OBSSScanParameters,
@@ -3942,6 +3947,9 @@ sir_parse_beacon_ie(tpAniSirGlobal pMac,
pBeaconStruct->Vendor1IEPresent = pBies->Vendor1IE.present;
pBeaconStruct->Vendor3IEPresent = pBies->Vendor3IE.present;
pBeaconStruct->vendor_vht_ie.present = pBies->vendor_vht_ie.present;
+ if (pBies->vendor_vht_ie.present)
+ pBeaconStruct->vendor_vht_ie.sub_type =
+ pBies->vendor_vht_ie.sub_type;
if (pBies->vendor_vht_ie.VHTCaps.present) {
pBeaconStruct->vendor_vht_ie.VHTCaps.present = 1;
@@ -4330,8 +4338,11 @@ sir_convert_beacon_frame2_struct(tpAniSirGlobal pMac,
pBeaconStruct->Vendor3IEPresent = pBeacon->Vendor3IE.present;
pBeaconStruct->vendor_vht_ie.present = pBeacon->vendor_vht_ie.present;
- if (pBeacon->vendor_vht_ie.present)
+ if (pBeacon->vendor_vht_ie.present) {
+ pBeaconStruct->vendor_vht_ie.sub_type =
+ pBeacon->vendor_vht_ie.sub_type;
pe_debug("Vendor Specific VHT caps present in Beacon Frame!");
+ }
if (pBeacon->vendor_vht_ie.VHTCaps.present) {
qdf_mem_copy(&pBeaconStruct->vendor_vht_ie.VHTCaps,