diff options
| author | Kapil Gupta <kapgupta@codeaurora.org> | 2016-10-03 13:07:20 +0530 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2016-10-07 12:54:41 -0700 |
| commit | 4b2efbbb0c2bb185f929771b07501974538fee04 (patch) | |
| tree | 1a0529ba8cd070a258d7838fb3ee55748ce883d9 /core/mac/src | |
| parent | 022892105c574e1487110443baa69ec46f5bffea (diff) | |
qcacld-3.0: Add support for 2.4G VHT Interop in SAP
qcacld-2.0 to qcacld-3.0 propagation
In 2.4GHz some stations advertise VHT capability IE in Assoc Req frame.
Add support to detect the VHT capability in vendor specific IE in
Assoc Req frame and establish the connection with VHT mode to
improve performance.
Change-Id: I08dbcb3ce1895aa2108924d7a672e5d9be514e3d
CRs-Fixed: 924814
Diffstat (limited to 'core/mac/src')
| -rw-r--r-- | core/mac/src/cfg/cfgUtil/dot11f.frms | 18 | ||||
| -rw-r--r-- | core/mac/src/include/dot11f.h | 40 | ||||
| -rw-r--r-- | core/mac/src/include/parser_api.h | 5 | ||||
| -rw-r--r-- | core/mac/src/pe/include/lim_session.h | 1 | ||||
| -rw-r--r-- | core/mac/src/pe/lim/lim_assoc_utils.c | 48 | ||||
| -rw-r--r-- | core/mac/src/pe/lim/lim_process_assoc_req_frame.c | 39 | ||||
| -rw-r--r-- | core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c | 4 | ||||
| -rw-r--r-- | core/mac/src/pe/lim/lim_process_sme_req_messages.c | 2 | ||||
| -rw-r--r-- | core/mac/src/pe/lim/lim_prop_exts_utils.c | 2 | ||||
| -rw-r--r-- | core/mac/src/pe/lim/lim_send_frames_host_roam.c | 10 | ||||
| -rw-r--r-- | core/mac/src/pe/lim/lim_send_management_frames.c | 29 | ||||
| -rw-r--r-- | core/mac/src/sys/legacy/src/utils/src/dot11f.c | 137 | ||||
| -rw-r--r-- | core/mac/src/sys/legacy/src/utils/src/parser_api.c | 105 |
13 files changed, 253 insertions, 187 deletions
diff --git a/core/mac/src/cfg/cfgUtil/dot11f.frms b/core/mac/src/cfg/cfgUtil/dot11f.frms index 80509932738c..01568e477771 100644 --- a/core/mac/src/cfg/cfgUtil/dot11f.frms +++ b/core/mac/src/cfg/cfgUtil/dot11f.frms @@ -2894,7 +2894,7 @@ MULTIIE P2PDisAssoc ( EID_VENDOR_SPECIFIC ) OUI( 0x50, 0x6F, 0x9A, 0x09 ) MANDATORYTLV MinorReasonCode; } -IE vendor2_ie (EID_VENDOR_SPECIFIC) OUI (0x00, 0x90, 0x4c) +IE vendor_vht_ie (EID_VENDOR_SPECIFIC) OUI (0x00, 0x90, 0x4c) { type, 1; sub_type, 1; @@ -2957,7 +2957,7 @@ FRAME Beacon // C.f. Sec. 7.2.3.1 OPTIE WiderBWChanSwitchAnn; OPTIE OBSSScanParameters; OPTIE Vendor1IE; - OPTIE vendor2_ie; + OPTIE vendor_vht_ie; OPTIE Vendor3IE; OPTIE hs20vendor_ie; OPTIE ChannelSwitchWrapper; @@ -3046,7 +3046,7 @@ FRAME Beacon2 OPTIE WiderBWChanSwitchAnn; OPTIE OBSSScanParameters; OPTIE Vendor1IE; - OPTIE vendor2_ie; + OPTIE vendor_vht_ie; OPTIE Vendor3IE; OPTIE hs20vendor_ie; OPTIE ChannelSwitchWrapper; @@ -3111,7 +3111,7 @@ FRAME BeaconIEs OPTIE WiderBWChanSwitchAnn; OPTIE OBSSScanParameters; OPTIE Vendor1IE; - OPTIE vendor2_ie; + OPTIE vendor_vht_ie; OPTIE Vendor3IE; OPTIE hs20vendor_ie; OPTIE ChannelSwitchWrapper; @@ -3153,7 +3153,7 @@ FRAME AssocRequest // 7.2.3.4 OPTIE ExtCap; OPTIE OperatingMode; OPTIE QosMapSet; - OPTIE vendor2_ie; + OPTIE vendor_vht_ie; OPTIE hs20vendor_ie; } // End frame AssocRequest. @@ -3188,7 +3188,7 @@ FRAME AssocResponse // 7.2.3.5 OPTIE ExtCap; OPTIE OBSSScanParameters; OPTIE QosMapSet; - OPTIE vendor2_ie; + OPTIE vendor_vht_ie; } // End frame AssocResponse. FRAME ReAssocRequest // 7.2.3.6 @@ -3225,7 +3225,7 @@ FRAME ReAssocRequest // 7.2.3.6 OPTIE ExtCap; OPTIE OperatingMode; OPTIE QosMapSet; - OPTIE vendor2_ie; + OPTIE vendor_vht_ie; OPTIE hs20vendor_ie; } // End frame ReAssocRequest. @@ -3261,7 +3261,7 @@ FRAME ReAssocResponse // 7.2.3.7 OPTIE ExtCap; OPTIE OBSSScanParameters; OPTIE QosMapSet; - OPTIE vendor2_ie; + OPTIE vendor_vht_ie; } // End frame ReAssocResponse. FRAME ProbeRequest // 7.2.3.8 @@ -3328,7 +3328,7 @@ FRAME ProbeResponse // 7.2.3.9 OPTIE ExtCap; OPTIE OBSSScanParameters; OPTIE Vendor1IE; - OPTIE vendor2_ie; + OPTIE vendor_vht_ie; OPTIE Vendor3IE; OPTIE hs20vendor_ie; OPTIE ChannelSwitchWrapper; diff --git a/core/mac/src/include/dot11f.h b/core/mac/src/include/dot11f.h index 006fd880785d..7d52f2508ba6 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' - * Mon Sep 19 14:42:34 2016 from the following file(s): + * Mon Oct 3 12:40:25 2016 from the following file(s): * * dot11f.frms * @@ -7612,40 +7612,40 @@ uint32_t dot11f_get_packed_ie_sec_chan_offset_ele( #endif /* C++ */ /* EID 221 (0xdd) {OUI 0x00, 0x90, 0x4c} */ -typedef struct sDot11fIEvendor2_ie { +typedef struct sDot11fIEvendor_vht_ie { uint8_t present; uint8_t type; uint8_t sub_type; tDot11fIEVHTCaps VHTCaps; tDot11fIEVHTOperation VHTOperation; -} tDot11fIEvendor2_ie; +} tDot11fIEvendor_vht_ie; -#define DOT11F_EID_VENDOR2_IE (221) +#define DOT11F_EID_VENDOR_VHT_IE (221) /* N.B. These #defines do *not* include the EID & length */ -#define DOT11F_IE_VENDOR2_IE_MIN_LEN (5) +#define DOT11F_IE_VENDOR_VHT_IE_MIN_LEN (5) -#define DOT11F_IE_VENDOR2_IE_MAX_LEN (26) +#define DOT11F_IE_VENDOR_VHT_IE_MAX_LEN (26) #ifdef __cplusplus extern "C" { #endif /* C++ */ -uint32_t dot11f_unpack_ie_vendor2_ie( +uint32_t dot11f_unpack_ie_vendor_vht_ie( tpAniSirGlobal, uint8_t *, uint8_t, - tDot11fIEvendor2_ie*); + tDot11fIEvendor_vht_ie*); -uint32_t dot11f_pack_ie_vendor2_ie( +uint32_t dot11f_pack_ie_vendor_vht_ie( tpAniSirGlobal, - tDot11fIEvendor2_ie *, + tDot11fIEvendor_vht_ie *, uint8_t *, uint32_t, uint32_t*); -uint32_t dot11f_get_packed_ie_vendor2_ie( +uint32_t dot11f_get_packed_ie_vendor_vht_ie( tpAniSirGlobal, - tDot11fIEvendor2_ie *, + tDot11fIEvendor_vht_ie *, uint32_t*); #ifdef __cplusplus @@ -7757,7 +7757,7 @@ typedef struct sDot11fAssocRequest{ tDot11fIEExtCap ExtCap; tDot11fIEOperatingMode OperatingMode; tDot11fIEQosMapSet QosMapSet; - tDot11fIEvendor2_ie vendor2_ie; + tDot11fIEvendor_vht_ie vendor_vht_ie; tDot11fIEhs20vendor_ie hs20vendor_ie; } tDot11fAssocRequest; @@ -7813,7 +7813,7 @@ typedef struct sDot11fAssocResponse{ tDot11fIEExtCap ExtCap; tDot11fIEOBSSScanParameters OBSSScanParameters; tDot11fIEQosMapSet QosMapSet; - tDot11fIEvendor2_ie vendor2_ie; + tDot11fIEvendor_vht_ie vendor_vht_ie; } tDot11fAssocResponse; #define DOT11F_ASSOCRESPONSE (4) @@ -7919,7 +7919,7 @@ typedef struct sDot11fBeacon{ tDot11fIEWiderBWChanSwitchAnn WiderBWChanSwitchAnn; tDot11fIEOBSSScanParameters OBSSScanParameters; tDot11fIEVendor1IE Vendor1IE; - tDot11fIEvendor2_ie vendor2_ie; + tDot11fIEvendor_vht_ie vendor_vht_ie; tDot11fIEVendor3IE Vendor3IE; tDot11fIEhs20vendor_ie hs20vendor_ie; tDot11fIEChannelSwitchWrapper ChannelSwitchWrapper; @@ -8014,7 +8014,7 @@ typedef struct sDot11fBeacon2{ tDot11fIEWiderBWChanSwitchAnn WiderBWChanSwitchAnn; tDot11fIEOBSSScanParameters OBSSScanParameters; tDot11fIEVendor1IE Vendor1IE; - tDot11fIEvendor2_ie vendor2_ie; + tDot11fIEvendor_vht_ie vendor_vht_ie; tDot11fIEVendor3IE Vendor3IE; tDot11fIEhs20vendor_ie hs20vendor_ie; tDot11fIEChannelSwitchWrapper ChannelSwitchWrapper; @@ -8090,7 +8090,7 @@ typedef struct sDot11fBeaconIEs{ tDot11fIEWiderBWChanSwitchAnn WiderBWChanSwitchAnn; tDot11fIEOBSSScanParameters OBSSScanParameters; tDot11fIEVendor1IE Vendor1IE; - tDot11fIEvendor2_ie vendor2_ie; + tDot11fIEvendor_vht_ie vendor_vht_ie; tDot11fIEVendor3IE Vendor3IE; tDot11fIEhs20vendor_ie hs20vendor_ie; tDot11fIEChannelSwitchWrapper ChannelSwitchWrapper; @@ -8501,7 +8501,7 @@ typedef struct sDot11fProbeResponse{ tDot11fIEExtCap ExtCap; tDot11fIEOBSSScanParameters OBSSScanParameters; tDot11fIEVendor1IE Vendor1IE; - tDot11fIEvendor2_ie vendor2_ie; + tDot11fIEvendor_vht_ie vendor_vht_ie; tDot11fIEVendor3IE Vendor3IE; tDot11fIEhs20vendor_ie hs20vendor_ie; tDot11fIEChannelSwitchWrapper ChannelSwitchWrapper; @@ -8648,7 +8648,7 @@ typedef struct sDot11fReAssocRequest{ tDot11fIEExtCap ExtCap; tDot11fIEOperatingMode OperatingMode; tDot11fIEQosMapSet QosMapSet; - tDot11fIEvendor2_ie vendor2_ie; + tDot11fIEvendor_vht_ie vendor_vht_ie; tDot11fIEhs20vendor_ie hs20vendor_ie; } tDot11fReAssocRequest; @@ -8705,7 +8705,7 @@ typedef struct sDot11fReAssocResponse{ tDot11fIEExtCap ExtCap; tDot11fIEOBSSScanParameters OBSSScanParameters; tDot11fIEQosMapSet QosMapSet; - tDot11fIEvendor2_ie vendor2_ie; + tDot11fIEvendor_vht_ie vendor_vht_ie; } tDot11fReAssocResponse; #define DOT11F_REASSOCRESPONSE (27) diff --git a/core/mac/src/include/parser_api.h b/core/mac/src/include/parser_api.h index da8c3bc36840..bede0ad11946 100644 --- a/core/mac/src/include/parser_api.h +++ b/core/mac/src/include/parser_api.h @@ -164,7 +164,7 @@ typedef struct sSirProbeRespBeacon { uint8_t WiderBWChanSwitchAnnPresent; tDot11fIEWiderBWChanSwitchAnn WiderBWChanSwitchAnn; uint8_t Vendor1IEPresent; - tDot11fIEvendor2_ie vendor2_ie; + tDot11fIEvendor_vht_ie vendor_vht_ie; uint8_t Vendor3IEPresent; tDot11fIEhs20vendor_ie hs20vendor_ie; tDot11fIEIBSSParams IBSSParams; @@ -245,6 +245,7 @@ typedef struct sSirAssocReq { tDot11fIEVHTCaps VHTCaps; tDot11fIEOperatingMode operMode; tDot11fIEExtCap ExtCap; + tDot11fIEvendor_vht_ie vendor_vht_ie; tDot11fIEhs20vendor_ie hs20vendor_ie; } tSirAssocReq, *tpSirAssocReq; @@ -294,7 +295,7 @@ typedef struct sSirAssocRsp { #ifdef WLAN_FEATURE_11W tDot11fIETimeoutInterval TimeoutInterval; #endif - tDot11fIEvendor2_ie vendor2_ie; + tDot11fIEvendor_vht_ie vendor_vht_ie; tDot11fIEOBSSScanParameters obss_scanparams; } tSirAssocRsp, *tpSirAssocRsp; diff --git a/core/mac/src/pe/include/lim_session.h b/core/mac/src/pe/include/lim_session.h index f12cc19a7619..b8b34a98fb79 100644 --- a/core/mac/src/pe/include/lim_session.h +++ b/core/mac/src/pe/include/lim_session.h @@ -464,6 +464,7 @@ typedef struct sPESession /* Added to Support BT-AMP */ bool is_vendor_specific_vhtcaps; uint8_t vendor_specific_vht_ie_type; uint8_t vendor_specific_vht_ie_sub_type; + bool vendor_vht_sap; /* HS 2.0 Indication */ tDot11fIEhs20vendor_ie hs20vendor_ie; /* flag to indicate country code in beacon */ diff --git a/core/mac/src/pe/lim/lim_assoc_utils.c b/core/mac/src/pe/lim/lim_assoc_utils.c index 31818d187df1..4aae611d0787 100644 --- a/core/mac/src/pe/lim/lim_assoc_utils.c +++ b/core/mac/src/pe/lim/lim_assoc_utils.c @@ -3224,12 +3224,12 @@ lim_check_and_announce_join_success(tpAniSirGlobal mac_ctx, wlan_cfg_get_int(mac_ctx, WNI_CFG_DOT11_MODE, &selfStaDot11Mode); if ((IS_DOT11_MODE_VHT(selfStaDot11Mode)) && - beacon_probe_rsp->vendor2_ie.VHTCaps.present) { + beacon_probe_rsp->vendor_vht_ie.VHTCaps.present) { session_entry->is_vendor_specific_vhtcaps = true; session_entry->vendor_specific_vht_ie_type = - beacon_probe_rsp->vendor2_ie.type; + beacon_probe_rsp->vendor_vht_ie.type; session_entry->vendor_specific_vht_ie_sub_type = - beacon_probe_rsp->vendor2_ie.sub_type; + beacon_probe_rsp->vendor_vht_ie.sub_type; lim_log(mac_ctx, LOG1, FL( "VHT caps are present in vendor specific IE")); } @@ -3678,13 +3678,13 @@ tSirRetStatus lim_sta_send_add_bss(tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp, vht_caps = &pAssocRsp->VHTCaps; vht_oper = &pAssocRsp->VHTOperation; } else if (psessionEntry->vhtCapability && - pAssocRsp->vendor2_ie.VHTCaps.present){ + pAssocRsp->vendor_vht_ie.VHTCaps.present){ pAddBssParams->vhtCapable = - pAssocRsp->vendor2_ie.VHTCaps.present; + pAssocRsp->vendor_vht_ie.VHTCaps.present; lim_log(pMac, LOG1, FL("VHT Caps and Operation are present in vendor Specfic IE")); - vht_caps = &pAssocRsp->vendor2_ie.VHTCaps; - vht_oper = &pAssocRsp->vendor2_ie.VHTOperation; + vht_caps = &pAssocRsp->vendor_vht_ie.VHTCaps; + vht_oper = &pAssocRsp->vendor_vht_ie.VHTOperation; } else { pAddBssParams->vhtCapable = 0; } @@ -3757,15 +3757,15 @@ tSirRetStatus lim_sta_send_add_bss(tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp, pAddBssParams->staContext.lsigTxopProtection); if (psessionEntry->vhtCapability && (IS_BSS_VHT_CAPABLE(pBeaconStruct->VHTCaps) || - IS_BSS_VHT_CAPABLE( - pBeaconStruct->vendor2_ie.VHTCaps))) { + IS_BSS_VHT_CAPABLE(pBeaconStruct-> + vendor_vht_ie.VHTCaps))) { pAddBssParams->staContext.vhtCapable = 1; pAddBssParams->staContext.vhtSupportedRxNss = pStaDs->vhtSupportedRxNss; if (pAssocRsp->VHTCaps.present) vht_caps = &pAssocRsp->VHTCaps; - else if (pAssocRsp->vendor2_ie.VHTCaps.present) { - vht_caps = &pAssocRsp->vendor2_ie.VHTCaps; + else if (pAssocRsp->vendor_vht_ie.VHTCaps.present) { + vht_caps = &pAssocRsp->vendor_vht_ie.VHTCaps; lim_log(pMac, LOG1, FL( "VHT Caps are in vendor Specfic IE")); } @@ -3790,8 +3790,9 @@ tSirRetStatus lim_sta_send_add_bss(tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp, pAssocRsp->HTInfo.recommendedTxWidthSet; if (pAssocRsp->VHTCaps.present) vht_oper = &pAssocRsp->VHTOperation; - else if (pAssocRsp->vendor2_ie.VHTCaps.present) { - vht_oper = &pAssocRsp->vendor2_ie.VHTOperation; + else if (pAssocRsp->vendor_vht_ie.VHTCaps.present) { + vht_oper = &pAssocRsp-> + vendor_vht_ie.VHTOperation; lim_log(pMac, LOG1, FL( "VHT Op IE is in vendor Specfic IE")); } @@ -3874,8 +3875,8 @@ tSirRetStatus lim_sta_send_add_bss(tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp, if (pAssocRsp->VHTCaps.present) vht_caps = &pAssocRsp->VHTCaps; - else if (pAssocRsp->vendor2_ie.VHTCaps.present) { - vht_caps = &pAssocRsp->vendor2_ie.VHTCaps; + else if (pAssocRsp->vendor_vht_ie.VHTCaps.present) { + vht_caps = &pAssocRsp->vendor_vht_ie.VHTCaps; lim_log(pMac, LOG1, FL( "VHT Caps is in vendor Specfic IE")); } @@ -4218,13 +4219,13 @@ tSirRetStatus lim_sta_send_add_bss_pre_assoc(tpAniSirGlobal pMac, uint8_t update pAddBssParams->currentOperChannel); if (psessionEntry->vhtCapability && (IS_BSS_VHT_CAPABLE(pBeaconStruct->VHTCaps) || - IS_BSS_VHT_CAPABLE(pBeaconStruct->vendor2_ie.VHTCaps))) { + IS_BSS_VHT_CAPABLE(pBeaconStruct->vendor_vht_ie.VHTCaps))) { pAddBssParams->vhtCapable = 1; if (pBeaconStruct->VHTOperation.present) vht_oper = &pBeaconStruct->VHTOperation; - else if (pBeaconStruct->vendor2_ie.VHTOperation.present) { - vht_oper = &pBeaconStruct->vendor2_ie.VHTOperation; + else if (pBeaconStruct->vendor_vht_ie.VHTOperation.present) { + vht_oper = &pBeaconStruct->vendor_vht_ie.VHTOperation; lim_log(pMac, LOG1, FL("VHT Operation is present in vendor Specfic IE")); } @@ -4301,12 +4302,13 @@ tSirRetStatus lim_sta_send_add_bss_pre_assoc(tpAniSirGlobal pMac, uint8_t update if (psessionEntry->vhtCapability && (IS_BSS_VHT_CAPABLE(pBeaconStruct->VHTCaps) || IS_BSS_VHT_CAPABLE( - pBeaconStruct->vendor2_ie.VHTCaps))) { + pBeaconStruct->vendor_vht_ie.VHTCaps))) { pAddBssParams->staContext.vhtCapable = 1; if (pBeaconStruct->VHTCaps.present) vht_caps = &pBeaconStruct->VHTCaps; - else if (pBeaconStruct->vendor2_ie.VHTCaps.present) - vht_caps = &pBeaconStruct->vendor2_ie.VHTCaps; + else if (pBeaconStruct->vendor_vht_ie.VHTCaps.present) + vht_caps = &pBeaconStruct-> + vendor_vht_ie.VHTCaps; if ((vht_caps != NULL) && (vht_caps->suBeamFormerCap || vht_caps->muBeamformerCap) && @@ -4389,9 +4391,9 @@ tSirRetStatus lim_sta_send_add_bss_pre_assoc(tpAniSirGlobal pMac, uint8_t update if (pBeaconStruct->VHTCaps.present) vht_caps = &pBeaconStruct->VHTCaps; - else if (pBeaconStruct->vendor2_ie.VHTCaps.present) { + else if (pBeaconStruct->vendor_vht_ie.VHTCaps.present) { vht_caps = - &pBeaconStruct->vendor2_ie.VHTCaps; + &pBeaconStruct->vendor_vht_ie.VHTCaps; lim_log(pMac, LOG1, FL( "VHT Caps are in vendor Specfic IE")); } diff --git a/core/mac/src/pe/lim/lim_process_assoc_req_frame.c b/core/mac/src/pe/lim/lim_process_assoc_req_frame.c index f60e43231eed..c1d77bfb5f9c 100644 --- a/core/mac/src/pe/lim/lim_process_assoc_req_frame.c +++ b/core/mac/src/pe/lim/lim_process_assoc_req_frame.c @@ -504,9 +504,19 @@ static bool lim_chk_11ac_only(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr, tpPESession session, tpSirAssocReq assoc_req, uint8_t sub_type) { + tDot11fIEVHTCaps *vht_caps; + + if (assoc_req->VHTCaps.present) + vht_caps = &assoc_req->VHTCaps; + else if (assoc_req->vendor_vht_ie.VHTCaps.present && + session->vendor_vht_sap) + vht_caps = &assoc_req->vendor_vht_ie.VHTCaps; + else + vht_caps = NULL; + if (LIM_IS_AP_ROLE(session) && (session->dot11mode == WNI_CFG_DOT11_MODE_11AC_ONLY) && - (!assoc_req->VHTCaps.present)) { + ((vht_caps != NULL) && (!vht_caps->present))) { lim_send_assoc_rsp_mgmt_frame(mac_ctx, eSIR_MAC_CAPABILITIES_NOT_SUPPORTED_STATUS, 1, hdr->sa, sub_type, 0, session); @@ -1231,6 +1241,16 @@ static bool lim_update_sta_ds(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr, tPmfSaQueryTimerId timer_id; uint32_t retry_interval; #endif + tDot11fIEVHTCaps *vht_caps; + + if (assoc_req->VHTCaps.present) + vht_caps = &assoc_req->VHTCaps; + else if (assoc_req->vendor_vht_ie.VHTCaps.present && + session->vendor_vht_sap) + vht_caps = &assoc_req->vendor_vht_ie.VHTCaps; + else + vht_caps = NULL; + /* * check here if the parsedAssocReq already pointing to the assoc_req * and free it before assigning this new assoc_req @@ -1252,7 +1272,10 @@ static bool lim_update_sta_ds(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr, } sta_ds->mlmStaContext.htCapability = assoc_req->HTCaps.present; - sta_ds->mlmStaContext.vhtCapability = assoc_req->VHTCaps.present; + if ((vht_caps != NULL) && vht_caps->present) + sta_ds->mlmStaContext.vhtCapability = vht_caps->present; + else + sta_ds->mlmStaContext.vhtCapability = false; sta_ds->qos.addtsPresent = (assoc_req->addtsPresent == 0) ? false : true; sta_ds->qos.addts = assoc_req->addtsReq; @@ -1348,7 +1371,7 @@ static bool lim_update_sta_ds(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr, (uint8_t) (assoc_req->operMode.chanWidth ? eHT_CHANNEL_WIDTH_40MHZ : eHT_CHANNEL_WIDTH_20MHZ); - } else if (assoc_req->VHTCaps.present) { + } else if ((vht_caps != NULL) && vht_caps->present) { /* * Check if STA has enabled it's channel bonding mode. * If channel bonding mode is enabled, we decide based @@ -1360,7 +1383,7 @@ static bool lim_update_sta_ds(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr, WNI_CFG_VHT_CHANNEL_WIDTH_20_40MHZ : session->ch_width - 1); sta_ds->htMaxRxAMpduFactor = - assoc_req->VHTCaps.maxAMPDULenExp; + vht_caps->maxAMPDULenExp; } /* Lesser among the AP and STA bandwidth of operation. */ sta_ds->htSupportedChannelWidthSet = @@ -1373,9 +1396,10 @@ static bool lim_update_sta_ds(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr, (uint8_t) assoc_req->HTCaps.advCodingCap; } - if (assoc_req->VHTCaps.present && assoc_req->wmeInfoPresent) { + if ((vht_caps != NULL) && vht_caps->present && + assoc_req->wmeInfoPresent) { sta_ds->vhtLdpcCapable = - (uint8_t) assoc_req->VHTCaps.ldpcCodingCap; + (uint8_t) vht_caps->ldpcCodingCap; } if (!assoc_req->wmeInfoPresent) { @@ -1398,8 +1422,7 @@ static bool lim_update_sta_ds(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr, &(assoc_req->supportedRates), &(assoc_req->extendedRates), assoc_req->HTCaps.supportedMCSSet, - session, &assoc_req->VHTCaps) != eSIR_SUCCESS) - { + session, vht_caps) != eSIR_SUCCESS) { /* Could not update hash table entry at DPH with rateset */ lim_log(mac_ctx, LOGE, FL("Couldn't update hash entry for aid=%d, MacAddr: " diff --git a/core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c b/core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c index 8e267663c73d..81f8714bfab8 100644 --- a/core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c +++ b/core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c @@ -172,8 +172,8 @@ void lim_update_assoc_sta_datas(tpAniSirGlobal mac_ctx, if (assoc_rsp->VHTCaps.present) vht_caps = &assoc_rsp->VHTCaps; - else if (assoc_rsp->vendor2_ie.VHTCaps.present) - vht_caps = &assoc_rsp->vendor2_ie.VHTCaps; + else if (assoc_rsp->vendor_vht_ie.VHTCaps.present) + vht_caps = &assoc_rsp->vendor_vht_ie.VHTCaps; if (IS_DOT11_MODE_VHT(session_entry->dot11mode)) { if ((vht_caps != NULL) && vht_caps->present) { diff --git a/core/mac/src/pe/lim/lim_process_sme_req_messages.c b/core/mac/src/pe/lim/lim_process_sme_req_messages.c index 347198956135..df4cd348ad20 100644 --- a/core/mac/src/pe/lim/lim_process_sme_req_messages.c +++ b/core/mac/src/pe/lim/lim_process_sme_req_messages.c @@ -610,6 +610,8 @@ lim_configure_ap_start_bss_session(tpAniSirGlobal mac_ctx, tpPESession session, session->ssidHidden = sme_start_bss_req->ssidHidden; session->wps_state = sme_start_bss_req->wps_state; session->sap_dot11mc = sme_start_bss_req->sap_dot11mc; + session->vendor_vht_sap = + sme_start_bss_req->vendor_vht_sap; lim_get_short_slot_from_phy_mode(mac_ctx, session, session->gLimPhyMode, &session->shortSlotTimeSupported); session->isCoalesingInIBSSAllowed = diff --git a/core/mac/src/pe/lim/lim_prop_exts_utils.c b/core/mac/src/pe/lim/lim_prop_exts_utils.c index 26aa7ca55e9f..1f367b75a469 100644 --- a/core/mac/src/pe/lim/lim_prop_exts_utils.c +++ b/core/mac/src/pe/lim/lim_prop_exts_utils.c @@ -167,7 +167,7 @@ lim_extract_ap_capability(tpAniSirGlobal mac_ctx, uint8_t *p_ie, session->vhtCapability) { session->vhtCapabilityPresentInBeacon = 1; if (((beacon_struct->Vendor1IEPresent && - beacon_struct->vendor2_ie.present && + beacon_struct->vendor_vht_ie.present && beacon_struct->Vendor3IEPresent)) && (((beacon_struct->VHTCaps.txMCSMap & VHT_MCS_3x3_MASK) == VHT_MCS_3x3_MASK) && 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 5594dfc78843..50c86a6ff657 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 @@ -304,14 +304,14 @@ void lim_send_reassoc_req_with_ft_ies_mgmt_frame(tpAniSirGlobal mac_ctx, pe_session->is_vendor_specific_vhtcaps) { lim_log(mac_ctx, LOG1, FL("Populate Vendor VHT IEs in Re-Assoc Request")); - frm.vendor2_ie.present = 1; - frm.vendor2_ie.type = + frm.vendor_vht_ie.present = 1; + frm.vendor_vht_ie.type = pe_session->vendor_specific_vht_ie_type; - frm.vendor2_ie.sub_type = + frm.vendor_vht_ie.sub_type = pe_session->vendor_specific_vht_ie_sub_type; - frm.vendor2_ie.VHTCaps.present = 1; + frm.vendor_vht_ie.VHTCaps.present = 1; populate_dot11f_vht_caps(mac_ctx, pe_session, - &frm.vendor2_ie.VHTCaps); + &frm.vendor_vht_ie.VHTCaps); vht_enabled = true; } status = dot11f_get_packed_re_assoc_request_size(mac_ctx, &frm, 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 93408fc9f590..b10e5847a4aa 100644 --- a/core/mac/src/pe/lim/lim_send_management_frames.c +++ b/core/mac/src/pe/lim/lim_send_management_frames.c @@ -1243,7 +1243,24 @@ lim_send_assoc_rsp_mgmt_frame(tpAniSirGlobal mac_ctx, populate_dot11f_vht_caps(mac_ctx, pe_session, &frm.VHTCaps); populate_dot11f_vht_operation(mac_ctx, pe_session, - &frm.VHTOperation); + &frm.VHTOperation); + is_vht = true; + } + if (pe_session->vhtCapability && + pe_session->vendor_vht_sap && + (assoc_req != NULL) && + assoc_req->vendor_vht_ie.VHTCaps.present) { + lim_log(mac_ctx, LOG1, + FL("Populate Vendor VHT IEs in Assoc Rsponse")); + frm.vendor_vht_ie.present = 1; + frm.vendor_vht_ie.type = + pe_session->vendor_specific_vht_ie_type; + 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); is_vht = true; } populate_dot11f_ext_cap(mac_ctx, is_vht, &frm.ExtCap, @@ -1812,15 +1829,15 @@ lim_send_assoc_req_mgmt_frame(tpAniSirGlobal mac_ctx, pe_session->is_vendor_specific_vhtcaps) { lim_log(mac_ctx, LOG1, FL("Populate Vendor VHT IEs in Assoc Request")); - frm->vendor2_ie.present = 1; - frm->vendor2_ie.type = + frm->vendor_vht_ie.present = 1; + frm->vendor_vht_ie.type = pe_session->vendor_specific_vht_ie_type; - frm->vendor2_ie.sub_type = + frm->vendor_vht_ie.sub_type = pe_session->vendor_specific_vht_ie_sub_type; - frm->vendor2_ie.VHTCaps.present = 1; + frm->vendor_vht_ie.VHTCaps.present = 1; populate_dot11f_vht_caps(mac_ctx, pe_session, - &frm->vendor2_ie.VHTCaps); + &frm->vendor_vht_ie.VHTCaps); vht_enabled = true; } if (pe_session->is_ext_caps_present) 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 d5068aae9b91..458e073c088d 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' - * Mon Sep 19 14:42:34 2016 from the following file(s): + * Mon Oct 3 12:40:25 2016 from the following file(s): * * dot11f.frms * @@ -5949,25 +5949,25 @@ uint32_t dot11f_unpack_ie_sec_chan_offset_ele(tpAniSirGlobal pCtx, #define SigIesec_chan_offset_ele (0x007f) -static const tFFDefn FFS_vendor2_ie[] = { +static const tFFDefn FFS_vendor_vht_ie[] = { { NULL, 0, 0, 0,}, }; -static const tIEDefn IES_vendor2_ie[] = { - { offsetof(tDot11fIEvendor2_ie, VHTCaps), offsetof(tDot11fIEVHTCaps, +static const tIEDefn IES_vendor_vht_ie[] = { + { offsetof(tDot11fIEvendor_vht_ie, VHTCaps), offsetof(tDot11fIEVHTCaps, present), 0, "VHTCaps", 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTCAPS, 0, }, - { offsetof(tDot11fIEvendor2_ie, VHTOperation), + { offsetof(tDot11fIEvendor_vht_ie, VHTOperation), offsetof(tDot11fIEVHTOperation, present), 0, "VHTOperation", 0, 7, 7, SigIeVHTOperation, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTOPERATION, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; -uint32_t dot11f_unpack_ie_vendor2_ie(tpAniSirGlobal pCtx, - uint8_t *pBuf, - uint8_t ielen, - tDot11fIEvendor2_ie *pDst) +uint32_t dot11f_unpack_ie_vendor_vht_ie(tpAniSirGlobal pCtx, + uint8_t *pBuf, + uint8_t ielen, + tDot11fIEvendor_vht_ie *pDst) { uint32_t status = DOT11F_PARSE_SUCCESS; (void) pBuf; (void)ielen; /* Shutup the compiler */ @@ -5984,14 +5984,14 @@ uint32_t dot11f_unpack_ie_vendor2_ie(tpAniSirGlobal pCtx, status |= unpack_core(pCtx, pBuf, ielen, - FFS_vendor2_ie, - IES_vendor2_ie, + FFS_vendor_vht_ie, + IES_vendor_vht_ie, (uint8_t *)pDst, sizeof(*pDst)); return status; -} /* End dot11f_unpack_ie_vendor2_ie. */ +} /* End dot11f_unpack_ie_vendor_vht_ie. */ -#define SigIevendor2_ie (0x0080) +#define SigIevendor_vht_ie (0x0080) static const tFFDefn FFS_AddTSRequest[] = { @@ -6208,10 +6208,10 @@ static const tIEDefn IES_AssocRequest[] = { { offsetof(tDot11fAssocRequest, QosMapSet), offsetof(tDot11fIEQosMapSet, present), 0, "QosMapSet", 0, 2, 62, SigIeQosMapSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSMAPSET, 0, }, - { offsetof(tDot11fAssocRequest, vendor2_ie), - offsetof(tDot11fIEvendor2_ie, present), 0, "vendor2_ie", - 0, 7, 28, SigIevendor2_ie, {0, 144, 76, 0, 0}, - 3, DOT11F_EID_VENDOR2_IE, 0, }, + { offsetof(tDot11fAssocRequest, vendor_vht_ie), + offsetof(tDot11fIEvendor_vht_ie, present), 0, "vendor_vht_ie", + 0, 7, 28, SigIevendor_vht_ie, {0, 144, 76, 0, 0}, + 3, DOT11F_EID_VENDOR_VHT_IE, 0, }, { offsetof(tDot11fAssocRequest, hs20vendor_ie), offsetof(tDot11fIEhs20vendor_ie, present), 0, "hs20vendor_ie", 0, 7, 9, SigIehs20vendor_ie, {80, 111, 154, 16, 0}, @@ -6336,10 +6336,10 @@ static const tIEDefn IES_AssocResponse[] = { { offsetof(tDot11fAssocResponse, QosMapSet), offsetof(tDot11fIEQosMapSet, present), 0, "QosMapSet", 0, 2, 62, SigIeQosMapSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSMAPSET, 0, }, - { offsetof(tDot11fAssocResponse, vendor2_ie), - offsetof(tDot11fIEvendor2_ie, present), 0, "vendor2_ie", - 0, 7, 28, SigIevendor2_ie, {0, 144, 76, 0, 0}, - 3, DOT11F_EID_VENDOR2_IE, 0, }, + { offsetof(tDot11fAssocResponse, vendor_vht_ie), + offsetof(tDot11fIEvendor_vht_ie, present), 0, "vendor_vht_ie", + 0, 7, 28, SigIevendor_vht_ie, {0, 144, 76, 0, 0}, + 3, DOT11F_EID_VENDOR_VHT_IE, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; uint32_t dot11f_unpack_assoc_response(tpAniSirGlobal pCtx, @@ -6567,9 +6567,10 @@ static const tIEDefn IES_Beacon[] = { { offsetof(tDot11fBeacon, Vendor1IE), offsetof(tDot11fIEVendor1IE, present), 0, "Vendor1IE", 0, 5, 5, SigIeVendor1IE, {0, 16, 24, 0, 0}, 3, DOT11F_EID_VENDOR1IE, 0, }, - { offsetof(tDot11fBeacon, vendor2_ie), offsetof(tDot11fIEvendor2_ie, - present), 0, "vendor2_ie", 0, 7, 28, SigIevendor2_ie, {0, 144, 76, 0, 0}, - 3, DOT11F_EID_VENDOR2_IE, 0, }, + { offsetof(tDot11fBeacon, vendor_vht_ie), + offsetof(tDot11fIEvendor_vht_ie, present), 0, "vendor_vht_ie", + 0, 7, 28, SigIevendor_vht_ie, {0, 144, 76, 0, 0}, + 3, DOT11F_EID_VENDOR_VHT_IE, 0, }, { offsetof(tDot11fBeacon, Vendor3IE), offsetof(tDot11fIEVendor3IE, present), 0, "Vendor3IE", 0, 5, 5, SigIeVendor3IE, {0, 22, 50, 0, 0}, 3, DOT11F_EID_VENDOR3IE, 0, }, @@ -6768,9 +6769,10 @@ static const tIEDefn IES_Beacon2[] = { { offsetof(tDot11fBeacon2, Vendor1IE), offsetof(tDot11fIEVendor1IE, present), 0, "Vendor1IE", 0, 5, 5, SigIeVendor1IE, {0, 16, 24, 0, 0}, 3, DOT11F_EID_VENDOR1IE, 0, }, - { offsetof(tDot11fBeacon2, vendor2_ie), offsetof(tDot11fIEvendor2_ie, - present), 0, "vendor2_ie", 0, 7, 28, SigIevendor2_ie, {0, 144, 76, 0, 0}, - 3, DOT11F_EID_VENDOR2_IE, 0, }, + { offsetof(tDot11fBeacon2, vendor_vht_ie), + offsetof(tDot11fIEvendor_vht_ie, present), 0, "vendor_vht_ie", + 0, 7, 28, SigIevendor_vht_ie, {0, 144, 76, 0, 0}, + 3, DOT11F_EID_VENDOR_VHT_IE, 0, }, { offsetof(tDot11fBeacon2, Vendor3IE), offsetof(tDot11fIEVendor3IE, present), 0, "Vendor3IE", 0, 5, 5, SigIeVendor3IE, {0, 22, 50, 0, 0}, 3, DOT11F_EID_VENDOR3IE, 0, }, @@ -6965,9 +6967,10 @@ static const tIEDefn IES_BeaconIEs[] = { { offsetof(tDot11fBeaconIEs, Vendor1IE), offsetof(tDot11fIEVendor1IE, present), 0, "Vendor1IE", 0, 5, 5, SigIeVendor1IE, {0, 16, 24, 0, 0}, 3, DOT11F_EID_VENDOR1IE, 0, }, - { offsetof(tDot11fBeaconIEs, vendor2_ie), offsetof(tDot11fIEvendor2_ie, - present), 0, "vendor2_ie", 0, 7, 28, SigIevendor2_ie, {0, 144, 76, 0, 0}, - 3, DOT11F_EID_VENDOR2_IE, 0, }, + { offsetof(tDot11fBeaconIEs, vendor_vht_ie), + offsetof(tDot11fIEvendor_vht_ie, present), 0, "vendor_vht_ie", + 0, 7, 28, SigIevendor_vht_ie, {0, 144, 76, 0, 0}, + 3, DOT11F_EID_VENDOR_VHT_IE, 0, }, { offsetof(tDot11fBeaconIEs, Vendor3IE), offsetof(tDot11fIEVendor3IE, present), 0, "Vendor3IE", 0, 5, 5, SigIeVendor3IE, {0, 22, 50, 0, 0}, 3, DOT11F_EID_VENDOR3IE, 0, }, @@ -7573,10 +7576,10 @@ static const tIEDefn IES_ProbeResponse[] = { { offsetof(tDot11fProbeResponse, Vendor1IE), offsetof(tDot11fIEVendor1IE, present), 0, "Vendor1IE", 0, 5, 5, SigIeVendor1IE, {0, 16, 24, 0, 0}, 3, DOT11F_EID_VENDOR1IE, 0, }, - { offsetof(tDot11fProbeResponse, vendor2_ie), - offsetof(tDot11fIEvendor2_ie, present), 0, "vendor2_ie", - 0, 7, 28, SigIevendor2_ie, {0, 144, 76, 0, 0}, - 3, DOT11F_EID_VENDOR2_IE, 0, }, + { offsetof(tDot11fProbeResponse, vendor_vht_ie), + offsetof(tDot11fIEvendor_vht_ie, present), 0, "vendor_vht_ie", + 0, 7, 28, SigIevendor_vht_ie, {0, 144, 76, 0, 0}, + 3, DOT11F_EID_VENDOR_VHT_IE, 0, }, { offsetof(tDot11fProbeResponse, Vendor3IE), offsetof(tDot11fIEVendor3IE, present), 0, "Vendor3IE", 0, 5, 5, SigIeVendor3IE, {0, 22, 50, 0, 0}, 3, DOT11F_EID_VENDOR3IE, 0, }, @@ -7831,10 +7834,10 @@ static const tIEDefn IES_ReAssocRequest[] = { { offsetof(tDot11fReAssocRequest, QosMapSet), offsetof(tDot11fIEQosMapSet, present), 0, "QosMapSet", 0, 2, 62, SigIeQosMapSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSMAPSET, 0, }, - { offsetof(tDot11fReAssocRequest, vendor2_ie), - offsetof(tDot11fIEvendor2_ie, present), 0, "vendor2_ie", - 0, 7, 28, SigIevendor2_ie, {0, 144, 76, 0, 0}, - 3, DOT11F_EID_VENDOR2_IE, 0, }, + { offsetof(tDot11fReAssocRequest, vendor_vht_ie), + offsetof(tDot11fIEvendor_vht_ie, present), 0, "vendor_vht_ie", + 0, 7, 28, SigIevendor_vht_ie, {0, 144, 76, 0, 0}, + 3, DOT11F_EID_VENDOR_VHT_IE, 0, }, { offsetof(tDot11fReAssocRequest, hs20vendor_ie), offsetof(tDot11fIEhs20vendor_ie, present), 0, "hs20vendor_ie", 0, 7, 9, SigIehs20vendor_ie, {80, 111, 154, 16, 0}, @@ -7965,10 +7968,10 @@ static const tIEDefn IES_ReAssocResponse[] = { { offsetof(tDot11fReAssocResponse, QosMapSet), offsetof(tDot11fIEQosMapSet, present), 0, "QosMapSet", 0, 2, 62, SigIeQosMapSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSMAPSET, 0, }, - { offsetof(tDot11fReAssocResponse, vendor2_ie), - offsetof(tDot11fIEvendor2_ie, present), 0, "vendor2_ie", - 0, 7, 28, SigIevendor2_ie, {0, 144, 76, 0, 0}, - 3, DOT11F_EID_VENDOR2_IE, 0, }, + { offsetof(tDot11fReAssocResponse, vendor_vht_ie), + offsetof(tDot11fIEvendor_vht_ie, present), 0, "vendor_vht_ie", + 0, 7, 28, SigIevendor_vht_ie, {0, 144, 76, 0, 0}, + 3, DOT11F_EID_VENDOR_VHT_IE, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; uint32_t dot11f_unpack_re_assoc_response(tpAniSirGlobal pCtx, @@ -10274,13 +10277,13 @@ static uint32_t unpack_core(tpAniSirGlobal pCtx, sizeof(tDot11fIEsec_chan_offset_ele) * countOffset)); break; - case SigIevendor2_ie: + case SigIevendor_vht_ie: status |= - dot11f_unpack_ie_vendor2_ie( + dot11f_unpack_ie_vendor_vht_ie( pCtx, pBufRemaining, len, - (tDot11fIEvendor2_ie *) + (tDot11fIEvendor_vht_ie *) (pFrm + pIe->offset + - sizeof(tDot11fIEvendor2_ie) * + sizeof(tDot11fIEvendor_vht_ie) * countOffset)); break; default: @@ -11453,8 +11456,8 @@ uint32_t dot11f_get_packed_ie_hs20vendor_ie(tpAniSirGlobal pCtx, return status; } /* End dot11f_get_packed_ie_hs20vendor_ie. */ -uint32_t dot11f_get_packed_ie_vendor2_ie(tpAniSirGlobal pCtx, - tDot11fIEvendor2_ie *pIe, uint32_t *pnNeeded) +uint32_t dot11f_get_packed_ie_vendor_vht_ie(tpAniSirGlobal pCtx, + tDot11fIEvendor_vht_ie *pIe, uint32_t *pnNeeded) { uint32_t status = DOT11F_PARSE_SUCCESS; (void)pCtx; @@ -11462,11 +11465,11 @@ uint32_t dot11f_get_packed_ie_vendor2_ie(tpAniSirGlobal pCtx, *pnNeeded += 1; *pnNeeded += 1; status = get_packed_size_core(pCtx, (uint8_t *)pIe, pnNeeded, - IES_vendor2_ie); + IES_vendor_vht_ie); break; } return status; -} /* End dot11f_get_packed_ie_vendor2_ie. */ +} /* End dot11f_get_packed_ie_vendor_vht_ie. */ uint32_t dot11f_get_packed_add_ts_request_size(tpAniSirGlobal pCtx, tDot11fAddTSRequest *pFrm, uint32_t *pnNeeded) @@ -12949,11 +12952,11 @@ static uint32_t get_packed_size_core(tpAniSirGlobal pCtx, (pFrm + pIe->offset + offset * i))-> present; break; - case SigIevendor2_ie: - offset = sizeof(tDot11fIEvendor2_ie); + case SigIevendor_vht_ie: + offset = sizeof(tDot11fIEvendor_vht_ie); status |= - dot11f_get_packed_ie_vendor2_ie( - pCtx, (tDot11fIEvendor2_ie *) + dot11f_get_packed_ie_vendor_vht_ie( + pCtx, (tDot11fIEvendor_vht_ie *) (pFrm + pIe->offset + offset * i), pnNeeded); break; @@ -20413,17 +20416,17 @@ uint32_t dot11f_pack_ie_sec_chan_offset_ele(tpAniSirGlobal pCtx, return DOT11F_PARSE_SUCCESS; } /* End dot11f_pack_ie_sec_chan_offset_ele. */ -uint32_t dot11f_pack_ie_vendor2_ie(tpAniSirGlobal pCtx, - tDot11fIEvendor2_ie *pSrc, - uint8_t *pBuf, - uint32_t nBuf, - uint32_t *pnConsumed) +uint32_t dot11f_pack_ie_vendor_vht_ie(tpAniSirGlobal pCtx, + tDot11fIEvendor_vht_ie *pSrc, + uint8_t *pBuf, + uint32_t nBuf, + uint32_t *pnConsumed) { uint8_t *pIeLen = 0; uint32_t nConsumedOnEntry = *pnConsumed; uint32_t nNeeded = 0U; uint32_t status = DOT11F_PARSE_SUCCESS; - status = dot11f_get_packed_ie_vendor2_ie(pCtx, pSrc, &nNeeded); + status = dot11f_get_packed_ie_vendor_vht_ie(pCtx, pSrc, &nNeeded); if (!DOT11F_SUCCEEDED(status)) return status; while (pSrc->present) { @@ -20450,8 +20453,8 @@ uint32_t dot11f_pack_ie_vendor2_ie(tpAniSirGlobal pCtx, pBuf, nBuf, pnConsumed, - FFS_vendor2_ie, - IES_vendor2_ie); + FFS_vendor_vht_ie, + IES_vendor_vht_ie); break; } (void)pCtx; @@ -20459,7 +20462,7 @@ uint32_t dot11f_pack_ie_vendor2_ie(tpAniSirGlobal pCtx, *pIeLen = *pnConsumed - nConsumedOnEntry - 2; } return status; -} /* End dot11f_pack_ie_vendor2_ie. */ +} /* End dot11f_pack_ie_vendor_vht_ie. */ uint32_t dot11f_pack_add_ts_request(tpAniSirGlobal pCtx, tDot11fAddTSRequest *pFrm, @@ -22402,12 +22405,12 @@ static uint32_t pack_core(tpAniSirGlobal pCtx, sizeof(tDot11fIEsec_chan_offset_ele) * i), pBufRemaining, nBufRemaining, &len); break; - case SigIevendor2_ie: + case SigIevendor_vht_ie: status |= - dot11f_pack_ie_vendor2_ie( - pCtx, (tDot11fIEvendor2_ie *) + dot11f_pack_ie_vendor_vht_ie( + pCtx, (tDot11fIEvendor_vht_ie *) (pSrc + pIe->offset + - sizeof(tDot11fIEvendor2_ie) * i), + sizeof(tDot11fIEvendor_vht_ie) * i), pBufRemaining, nBufRemaining, &len); break; default: 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 360c76a1df92..4cfb1fff3c6f 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 @@ -2561,19 +2561,19 @@ tSirRetStatus sir_convert_probe_frame2_struct(tpAniSirGlobal pMac, pProbeResp->Vendor1IEPresent = pr->Vendor1IE.present; pProbeResp->Vendor3IEPresent = pr->Vendor3IE.present; - pProbeResp->vendor2_ie.present = pr->vendor2_ie.present; - if (pr->vendor2_ie.present) { - pProbeResp->vendor2_ie.type = pr->vendor2_ie.type; - pProbeResp->vendor2_ie.sub_type = pr->vendor2_ie.sub_type; - } - if (pr->vendor2_ie.VHTCaps.present) { - qdf_mem_copy(&pProbeResp->vendor2_ie.VHTCaps, - &pr->vendor2_ie.VHTCaps, + pProbeResp->vendor_vht_ie.present = pr->vendor_vht_ie.present; + if (pr->vendor_vht_ie.present) { + pProbeResp->vendor_vht_ie.type = pr->vendor_vht_ie.type; + 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, sizeof(tDot11fIEVHTCaps)); } - if (pr->vendor2_ie.VHTOperation.present) { - qdf_mem_copy(&pProbeResp->vendor2_ie.VHTOperation, - &pr->vendor2_ie.VHTOperation, + if (pr->vendor_vht_ie.VHTOperation.present) { + qdf_mem_copy(&pProbeResp->vendor_vht_ie.VHTOperation, + &pr->vendor_vht_ie.VHTOperation, sizeof(tDot11fIEVHTOperation)); } /* Update HS 2.0 Information Element */ @@ -2798,6 +2798,22 @@ sir_convert_assoc_req_frame2_struct(tpAniSirGlobal pMac, ext_cap->timing_meas, ext_cap->fine_time_meas_initiator, ext_cap->fine_time_meas_responder); } + + pAssocReq->vendor_vht_ie.present = ar->vendor_vht_ie.present; + if (ar->vendor_vht_ie.present) { + pAssocReq->vendor_vht_ie.type = ar->vendor_vht_ie.type; + 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, + sizeof(tDot11fIEVHTCaps)); + lim_log(pMac, LOG1, + FL("Received Assoc Request with Vendor specific VHT Cap")); + lim_log_vht_cap(pMac, &pAssocReq->VHTCaps); + } + } + qdf_mem_free(ar); return eSIR_SUCCESS; @@ -2998,27 +3014,27 @@ sir_convert_assoc_resp_frame2_struct(tpAniSirGlobal pMac, lim_log_qos_map_set(pMac, &pAssocRsp->QosMapSet); } - pAssocRsp->vendor2_ie.present = ar.vendor2_ie.present; - if (ar.vendor2_ie.present) { - pAssocRsp->vendor2_ie.type = ar.vendor2_ie.type; - pAssocRsp->vendor2_ie.sub_type = ar.vendor2_ie.sub_type; + pAssocRsp->vendor_vht_ie.present = ar.vendor_vht_ie.present; + if (ar.vendor_vht_ie.present) { + pAssocRsp->vendor_vht_ie.type = ar.vendor_vht_ie.type; + pAssocRsp->vendor_vht_ie.sub_type = ar.vendor_vht_ie.sub_type; } if (ar.OBSSScanParameters.present) { qdf_mem_copy(&pAssocRsp->obss_scanparams, &ar.OBSSScanParameters, sizeof(struct sDot11fIEOBSSScanParameters)); } - if (ar.vendor2_ie.VHTCaps.present) { - qdf_mem_copy(&pAssocRsp->vendor2_ie.VHTCaps, - &ar.vendor2_ie.VHTCaps, + if (ar.vendor_vht_ie.VHTCaps.present) { + qdf_mem_copy(&pAssocRsp->vendor_vht_ie.VHTCaps, + &ar.vendor_vht_ie.VHTCaps, sizeof(tDot11fIEVHTCaps)); lim_log(pMac, LOG1, FL("Received Assoc Response with Vendor specific VHT Cap")); lim_log_vht_cap(pMac, &pAssocRsp->VHTCaps); } - if (ar.vendor2_ie.VHTOperation.present) { - qdf_mem_copy(&pAssocRsp->vendor2_ie.VHTOperation, - &ar.vendor2_ie.VHTOperation, + if (ar.vendor_vht_ie.VHTOperation.present) { + qdf_mem_copy(&pAssocRsp->vendor_vht_ie.VHTOperation, + &ar.vendor_vht_ie.VHTOperation, sizeof(tDot11fIEVHTOperation)); lim_log(pMac, LOG1, FL("Received Assoc Response with Vendor specific VHT Oper")); @@ -3733,22 +3749,23 @@ sir_parse_beacon_ie(tpAniSirGlobal pMac, pBeaconStruct->Vendor1IEPresent = pBies->Vendor1IE.present; pBeaconStruct->Vendor3IEPresent = pBies->Vendor3IE.present; - pBeaconStruct->vendor2_ie.present = pBies->vendor2_ie.present; - if (pBies->vendor2_ie.present) { - pBeaconStruct->vendor2_ie.type = pBies->vendor2_ie.type; - pBeaconStruct->vendor2_ie.sub_type = pBies->vendor2_ie.sub_type; + pBeaconStruct->vendor_vht_ie.present = pBies->vendor_vht_ie.present; + if (pBies->vendor_vht_ie.present) { + pBeaconStruct->vendor_vht_ie.type = pBies->vendor_vht_ie.type; + pBeaconStruct->vendor_vht_ie.sub_type = + pBies->vendor_vht_ie.sub_type; } - if (pBies->vendor2_ie.VHTCaps.present) { - pBeaconStruct->vendor2_ie.VHTCaps.present = 1; - qdf_mem_copy(&pBeaconStruct->vendor2_ie.VHTCaps, - &pBies->vendor2_ie.VHTCaps, + if (pBies->vendor_vht_ie.VHTCaps.present) { + pBeaconStruct->vendor_vht_ie.VHTCaps.present = 1; + qdf_mem_copy(&pBeaconStruct->vendor_vht_ie.VHTCaps, + &pBies->vendor_vht_ie.VHTCaps, sizeof(tDot11fIEVHTCaps)); } - if (pBies->vendor2_ie.VHTOperation.present) { - pBeaconStruct->vendor2_ie.VHTOperation.present = 1; - qdf_mem_copy(&pBeaconStruct->vendor2_ie.VHTOperation, - &pBies->vendor2_ie.VHTOperation, + if (pBies->vendor_vht_ie.VHTOperation.present) { + pBeaconStruct->vendor_vht_ie.VHTOperation.present = 1; + qdf_mem_copy(&pBeaconStruct->vendor_vht_ie.VHTOperation, + &pBies->vendor_vht_ie.VHTOperation, sizeof(tDot11fIEVHTOperation)); } if (pBies->ExtCap.present) { @@ -4090,24 +4107,24 @@ sir_convert_beacon_frame2_struct(tpAniSirGlobal pMac, pBeaconStruct->Vendor1IEPresent = pBeacon->Vendor1IE.present; pBeaconStruct->Vendor3IEPresent = pBeacon->Vendor3IE.present; - pBeaconStruct->vendor2_ie.present = pBeacon->vendor2_ie.present; - if (pBeacon->vendor2_ie.present) { - pBeaconStruct->vendor2_ie.type = pBeacon->vendor2_ie.type; - pBeaconStruct->vendor2_ie.sub_type = - pBeacon->vendor2_ie.sub_type; + pBeaconStruct->vendor_vht_ie.present = pBeacon->vendor_vht_ie.present; + if (pBeacon->vendor_vht_ie.present) { + pBeaconStruct->vendor_vht_ie.type = pBeacon->vendor_vht_ie.type; + pBeaconStruct->vendor_vht_ie.sub_type = + pBeacon->vendor_vht_ie.sub_type; } - if (pBeacon->vendor2_ie.present) { + if (pBeacon->vendor_vht_ie.present) { PELOG1(lim_log(pMac, LOG1, FL("Vendor Specific VHT caps present in Beacon Frame!")); ) } - if (pBeacon->vendor2_ie.VHTCaps.present) { - qdf_mem_copy(&pBeaconStruct->vendor2_ie.VHTCaps, - &pBeacon->vendor2_ie.VHTCaps, + if (pBeacon->vendor_vht_ie.VHTCaps.present) { + qdf_mem_copy(&pBeaconStruct->vendor_vht_ie.VHTCaps, + &pBeacon->vendor_vht_ie.VHTCaps, sizeof(tDot11fIEVHTCaps)); } - if (pBeacon->vendor2_ie.VHTOperation.present) { - qdf_mem_copy(&pBeaconStruct->vendor2_ie.VHTOperation, + if (pBeacon->vendor_vht_ie.VHTOperation.present) { + qdf_mem_copy(&pBeaconStruct->vendor_vht_ie.VHTOperation, &pBeacon->VHTOperation, sizeof(tDot11fIEVHTOperation)); } |
