diff options
| author | Krunal Soni <ksoni@codeaurora.org> | 2017-02-14 11:24:38 -0800 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2017-02-15 20:17:01 -0800 |
| commit | 0802a973faab289350344dc4d76419577b5e28f5 (patch) | |
| tree | c72f36caa4cc48197a3207ad804f9bf978ec8a2b | |
| parent | 99697b0c979f79e97b9078f2311343ce2509e7d9 (diff) | |
qcacld-3.0: Fix IE order in association request frame
Current driver is packing IEs associated with association request
out of order which is violating 80211 spec.
Fix the order in association request based on element ID.
Change-Id: Ie7a69ce2999d5a5d8ba88bac1e988f0a41dd10a6
CRs-Fixed: 2006920
| -rw-r--r-- | core/mac/src/cfg/cfgUtil/dot11f.frms | 21 | ||||
| -rw-r--r-- | core/mac/src/include/dot11f.h | 69 | ||||
| -rw-r--r-- | core/mac/src/sys/legacy/src/utils/src/dot11f.c | 76 |
3 files changed, 86 insertions, 80 deletions
diff --git a/core/mac/src/cfg/cfgUtil/dot11f.frms b/core/mac/src/cfg/cfgUtil/dot11f.frms index 6c07eb2950a5..36d8bd781da0 100644 --- a/core/mac/src/cfg/cfgUtil/dot11f.frms +++ b/core/mac/src/cfg/cfgUtil/dot11f.frms @@ -3141,28 +3141,29 @@ FRAME AssocRequest // 7.2.3.4 FF ListenInterval; MANDIE SSID; MANDIE SuppRates; - OPTIE ExtSuppRates; + OPTIE OperatingMode; OPTIE PowerCaps; OPTIE SuppChannels; - OPTIE RSNOpaque; + OPTIE HTCaps; OPTIE QOSCapsStation; - OPTIE RRMEnabledCap; + OPTIE RSNOpaque; + OPTIE ExtSuppRates; OPTIE MobilityDomain; + OPTIE SuppOperatingClasses; + OPTIE WAPIOpaque; + OPTIE WAPI; + OPTIE RRMEnabledCap; + OPTIE QosMapSet; + OPTIE ExtCap; + OPTIE VHTCaps; OPTIE WPAOpaque; - OPTIE HTCaps; OPTIE WMMCaps; OPTIE WMMInfoStation; OPTIE WscIEOpaque; - OPTIE WAPIOpaque; - OPTIE WAPI; OPTIE ESERadMgmtCap; OPTIE ESEVersion; OPTIE P2PIEOpaque; OPTIE WFDIEOpaque; - OPTIE VHTCaps; - OPTIE ExtCap; - OPTIE OperatingMode; - OPTIE QosMapSet; OPTIE vendor_vht_ie; OPTIE hs20vendor_ie; } // End frame AssocRequest. diff --git a/core/mac/src/include/dot11f.h b/core/mac/src/include/dot11f.h index d36c2c4230a2..6ad6f17bb3ca 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 Jan 23 14:07:41 2017 from the following file(s): + * Tue Feb 14 11:22:39 2017 from the following file(s): * * dot11f.frms * @@ -593,7 +593,7 @@ void dot11f_unpack_ff_p2p_action_subtype(tpAniSirGlobal, uint8_t *, void dot11f_pack_ff_p2p_action_subtype(tpAniSirGlobal, tDot11fFfp2p_action_subtype *, - uint8_t *); + uint8_t *); /********************************************************************* @@ -7757,34 +7757,35 @@ uint32_t dot11f_get_packed_add_ts_response_size(tpAniSirGlobal pCtx, #endif /* C++ */ typedef struct sDot11fAssocRequest{ - tDot11fFfCapabilities Capabilities; - tDot11fFfListenInterval ListenInterval; - tDot11fIESSID SSID; - tDot11fIESuppRates SuppRates; - tDot11fIEExtSuppRates ExtSuppRates; - tDot11fIEPowerCaps PowerCaps; - tDot11fIESuppChannels SuppChannels; - tDot11fIERSNOpaque RSNOpaque; - tDot11fIEQOSCapsStation QOSCapsStation; - tDot11fIERRMEnabledCap RRMEnabledCap; - tDot11fIEMobilityDomain MobilityDomain; - tDot11fIEWPAOpaque WPAOpaque; - tDot11fIEHTCaps HTCaps; - tDot11fIEWMMCaps WMMCaps; - tDot11fIEWMMInfoStation WMMInfoStation; - tDot11fIEWscIEOpaque WscIEOpaque; - tDot11fIEWAPIOpaque WAPIOpaque; - tDot11fIEWAPI WAPI; - tDot11fIEESERadMgmtCap ESERadMgmtCap; - tDot11fIEESEVersion ESEVersion; - tDot11fIEP2PIEOpaque P2PIEOpaque; - tDot11fIEWFDIEOpaque WFDIEOpaque; - tDot11fIEVHTCaps VHTCaps; - tDot11fIEExtCap ExtCap; - tDot11fIEOperatingMode OperatingMode; - tDot11fIEQosMapSet QosMapSet; - tDot11fIEvendor_vht_ie vendor_vht_ie; - tDot11fIEhs20vendor_ie hs20vendor_ie; + tDot11fFfCapabilities Capabilities; + tDot11fFfListenInterval ListenInterval; + tDot11fIESSID SSID; + tDot11fIESuppRates SuppRates; + tDot11fIEOperatingMode OperatingMode; + tDot11fIEPowerCaps PowerCaps; + tDot11fIESuppChannels SuppChannels; + tDot11fIEHTCaps HTCaps; + tDot11fIEQOSCapsStation QOSCapsStation; + tDot11fIERSNOpaque RSNOpaque; + tDot11fIEExtSuppRates ExtSuppRates; + tDot11fIEMobilityDomain MobilityDomain; + tDot11fIESuppOperatingClasses SuppOperatingClasses; + tDot11fIEWAPIOpaque WAPIOpaque; + tDot11fIEWAPI WAPI; + tDot11fIERRMEnabledCap RRMEnabledCap; + tDot11fIEQosMapSet QosMapSet; + tDot11fIEExtCap ExtCap; + tDot11fIEVHTCaps VHTCaps; + tDot11fIEWPAOpaque WPAOpaque; + tDot11fIEWMMCaps WMMCaps; + tDot11fIEWMMInfoStation WMMInfoStation; + tDot11fIEWscIEOpaque WscIEOpaque; + tDot11fIEESERadMgmtCap ESERadMgmtCap; + tDot11fIEESEVersion ESEVersion; + tDot11fIEP2PIEOpaque P2PIEOpaque; + tDot11fIEWFDIEOpaque WFDIEOpaque; + tDot11fIEvendor_vht_ie vendor_vht_ie; + tDot11fIEhs20vendor_ie hs20vendor_ie; } tDot11fAssocRequest; #define DOT11F_ASSOCREQUEST (3) @@ -9361,13 +9362,13 @@ uint32_t dot11f_get_packed_ht2040_bss_coexistence_mgmt_action_frameSize(tpAniSir #endif /* C++ */ typedef struct sDot11fp2p_oper_chan_change_confirm{ - tDot11fFfCategory Category; + tDot11fFfCategory Category; tDot11fFfp2p_action_oui p2p_action_oui; tDot11fFfp2p_action_subtype p2p_action_subtype; tDot11fFfDialogToken DialogToken; - tDot11fIEHTCaps HTCaps; - tDot11fIEVHTCaps VHTCaps; - tDot11fIEOperatingMode OperatingMode; + tDot11fIEHTCaps HTCaps; + tDot11fIEVHTCaps VHTCaps; + tDot11fIEOperatingMode OperatingMode; } tDot11fp2p_oper_chan_change_confirm; #define DOT11F_P2P_OPER_CHAN_CHANGE_CONFIRM (48) 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 e6657e4ea02d..5fde4056c83a 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 Jan 23 14:07:41 2017 from the following file(s): + * Tue Feb 14 11:22:39 2017 from the following file(s): * * dot11f.frms * @@ -793,7 +793,7 @@ void dot11f_unpack_ff_p2p_action_oui(tpAniSirGlobal pCtx, #define SigFfp2p_action_oui (0x0020) void dot11f_unpack_ff_p2p_action_subtype(tpAniSirGlobal pCtx, - uint8_t *pBuf, + uint8_t *pBuf, tDot11fFfp2p_action_subtype *pDst) { pDst->subtype = *pBuf; @@ -6150,10 +6150,10 @@ static const tIEDefn IES_AssocRequest[] = { { offsetof(tDot11fAssocRequest, SuppRates), offsetof(tDot11fIESuppRates, present), 0, "SuppRates", 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPRATES, 1, }, - { offsetof(tDot11fAssocRequest, ExtSuppRates), - offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates", - 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, - 0, DOT11F_EID_EXTSUPPRATES, 0, }, + { offsetof(tDot11fAssocRequest, OperatingMode), + offsetof(tDot11fIEOperatingMode, present), 0, "OperatingMode", + 0, 3, 3, SigIeOperatingMode, {0, 0, 0, 0, 0}, + 0, DOT11F_EID_OPERATINGMODE, 0, }, { offsetof(tDot11fAssocRequest, PowerCaps), offsetof(tDot11fIEPowerCaps, present), 0, "PowerCaps", 0, 4, 4, SigIePowerCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_POWERCAPS, 0, }, @@ -6161,27 +6161,50 @@ static const tIEDefn IES_AssocRequest[] = { offsetof(tDot11fIESuppChannels, present), 0, "SuppChannels", 0, 4, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPCHANNELS, 0, }, - { offsetof(tDot11fAssocRequest, RSNOpaque), offsetof(tDot11fIERSNOpaque, - present), 0, "RSNOpaque", 0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0}, - 0, DOT11F_EID_RSNOPAQUE, 0, }, + { offsetof(tDot11fAssocRequest, HTCaps), offsetof(tDot11fIEHTCaps, + present), 0, "HTCaps", 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, + 0, DOT11F_EID_HTCAPS, 0, }, { offsetof(tDot11fAssocRequest, QOSCapsStation), offsetof(tDot11fIEQOSCapsStation, present), 0, "QOSCapsStation", 0, 3, 3, SigIeQOSCapsStation, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSCAPSSTATION, 0, }, - { offsetof(tDot11fAssocRequest, RRMEnabledCap), - offsetof(tDot11fIERRMEnabledCap, present), 0, "RRMEnabledCap", - 0, 7, 7, SigIeRRMEnabledCap, {0, 0, 0, 0, 0}, - 0, DOT11F_EID_RRMENABLEDCAP, 0, }, + { offsetof(tDot11fAssocRequest, RSNOpaque), offsetof(tDot11fIERSNOpaque, + present), 0, "RSNOpaque", 0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0}, + 0, DOT11F_EID_RSNOPAQUE, 0, }, + { offsetof(tDot11fAssocRequest, ExtSuppRates), + offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates", + 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, + 0, DOT11F_EID_EXTSUPPRATES, 0, }, { offsetof(tDot11fAssocRequest, MobilityDomain), offsetof(tDot11fIEMobilityDomain, present), 0, "MobilityDomain", 0, 5, 5, SigIeMobilityDomain, {0, 0, 0, 0, 0}, 0, DOT11F_EID_MOBILITYDOMAIN, 0, }, + { offsetof(tDot11fAssocRequest, SuppOperatingClasses), + offsetof(tDot11fIESuppOperatingClasses, present), 0, + "SuppOperatingClasses", 0, 3, 34, SigIeSuppOperatingClasses, + {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPOPERATINGCLASSES, 0, }, + { offsetof(tDot11fAssocRequest, WAPIOpaque), + offsetof(tDot11fIEWAPIOpaque, present), 0, "WAPIOpaque", + 0, 8, 255, SigIeWAPIOpaque, {0, 0, 0, 0, 0}, + 0, DOT11F_EID_WAPIOPAQUE, 0, }, + { offsetof(tDot11fAssocRequest, WAPI), offsetof(tDot11fIEWAPI, present), 0, + "WAPI", 0, 14, 112, SigIeWAPI, {0, 0, 0, 0, 0}, 0, DOT11F_EID_WAPI, 0, }, + { offsetof(tDot11fAssocRequest, RRMEnabledCap), + offsetof(tDot11fIERRMEnabledCap, present), 0, "RRMEnabledCap", + 0, 7, 7, SigIeRRMEnabledCap, {0, 0, 0, 0, 0}, + 0, DOT11F_EID_RRMENABLEDCAP, 0, }, + { offsetof(tDot11fAssocRequest, QosMapSet), offsetof(tDot11fIEQosMapSet, + present), 0, "QosMapSet", 0, 2, 62, SigIeQosMapSet, {0, 0, 0, 0, 0}, + 0, DOT11F_EID_QOSMAPSET, 0, }, + { offsetof(tDot11fAssocRequest, ExtCap), offsetof(tDot11fIEExtCap, + present), 0, "ExtCap", 0, 3, 11, SigIeExtCap, {0, 0, 0, 0, 0}, + 0, DOT11F_EID_EXTCAP, 0, }, + { offsetof(tDot11fAssocRequest, VHTCaps), offsetof(tDot11fIEVHTCaps, + present), 0, "VHTCaps", 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, + 0, DOT11F_EID_VHTCAPS, 0, }, { offsetof(tDot11fAssocRequest, WPAOpaque), offsetof(tDot11fIEWPAOpaque, present), 0, "WPAOpaque", 0, 8, 255, SigIeWPAOpaque, {0, 80, 242, 1, 0}, 4, DOT11F_EID_WPAOPAQUE, 0, }, - { offsetof(tDot11fAssocRequest, HTCaps), offsetof(tDot11fIEHTCaps, - present), 0, "HTCaps", 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, - 0, DOT11F_EID_HTCAPS, 0, }, { offsetof(tDot11fAssocRequest, WMMCaps), offsetof(tDot11fIEWMMCaps, present), 0, "WMMCaps", 0, 9, 9, SigIeWMMCaps, {0, 80, 242, 2, 5}, 5, DOT11F_EID_WMMCAPS, 0, }, @@ -6193,12 +6216,6 @@ static const tIEDefn IES_AssocRequest[] = { offsetof(tDot11fIEWscIEOpaque, present), 0, "WscIEOpaque", 0, 8, 255, SigIeWscIEOpaque, {0, 80, 242, 4, 0}, 4, DOT11F_EID_WSCIEOPAQUE, 0, }, - { offsetof(tDot11fAssocRequest, WAPIOpaque), - offsetof(tDot11fIEWAPIOpaque, present), 0, "WAPIOpaque", - 0, 8, 255, SigIeWAPIOpaque, {0, 0, 0, 0, 0}, - 0, DOT11F_EID_WAPIOPAQUE, 0, }, - { offsetof(tDot11fAssocRequest, WAPI), offsetof(tDot11fIEWAPI, present), 0, - "WAPI", 0, 14, 112, SigIeWAPI, {0, 0, 0, 0, 0}, 0, DOT11F_EID_WAPI, 0, }, { offsetof(tDot11fAssocRequest, ESERadMgmtCap), offsetof(tDot11fIEESERadMgmtCap, present), 0, "ESERadMgmtCap", 0, 8, 8, SigIeESERadMgmtCap, {0, 64, 150, 1, 0}, @@ -6215,19 +6232,6 @@ static const tIEDefn IES_AssocRequest[] = { offsetof(tDot11fIEWFDIEOpaque, present), 0, "WFDIEOpaque", 0, 8, 255, SigIeWFDIEOpaque, {80, 111, 154, 10, 0}, 4, DOT11F_EID_WFDIEOPAQUE, 0, }, - { offsetof(tDot11fAssocRequest, VHTCaps), offsetof(tDot11fIEVHTCaps, - present), 0, "VHTCaps", 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, - 0, DOT11F_EID_VHTCAPS, 0, }, - { offsetof(tDot11fAssocRequest, ExtCap), offsetof(tDot11fIEExtCap, - present), 0, "ExtCap", 0, 3, 11, SigIeExtCap, {0, 0, 0, 0, 0}, - 0, DOT11F_EID_EXTCAP, 0, }, - { offsetof(tDot11fAssocRequest, OperatingMode), - offsetof(tDot11fIEOperatingMode, present), 0, "OperatingMode", - 0, 3, 3, SigIeOperatingMode, {0, 0, 0, 0, 0}, - 0, DOT11F_EID_OPERATINGMODE, 0, }, - { offsetof(tDot11fAssocRequest, QosMapSet), offsetof(tDot11fIEQosMapSet, - present), 0, "QosMapSet", 0, 2, 62, SigIeQosMapSet, {0, 0, 0, 0, 0}, - 0, DOT11F_EID_QOSMAPSET, 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}, @@ -13586,7 +13590,7 @@ void dot11f_pack_ff_p2p_action_oui(tpAniSirGlobal pCtx, void dot11f_pack_ff_p2p_action_subtype(tpAniSirGlobal pCtx, tDot11fFfp2p_action_subtype *pSrc, - uint8_t *pBuf) + uint8_t *pBuf) { *pBuf = pSrc->subtype; (void)pCtx; |
