qcacld-3.0: Use htcap_cmn_ie as in structure sSirTdlsAddStaReq
Currently, in struct sSirTdlsAddStaReq, unpacked member sSirHtCap is used. But, in the similar TDLS component structure tdls_add_sta_req, packed struct htcap_cmn_ie is used. While typecasting there is possibility of padding of some bytes which results in wrong values. Change-Id: Ic7a561d82640dac72c3c973e51ba97b90e211fa5 CRs-Fixed: 2343375
This commit is contained in:
@@ -3033,7 +3033,7 @@ typedef struct sSirTdlsAddStaReq {
|
|||||||
uint8_t supported_rates_length;
|
uint8_t supported_rates_length;
|
||||||
uint8_t supported_rates[SIR_MAC_MAX_SUPP_RATES];
|
uint8_t supported_rates[SIR_MAC_MAX_SUPP_RATES];
|
||||||
uint8_t htcap_present;
|
uint8_t htcap_present;
|
||||||
tSirHTCap htCap;
|
struct htcap_cmn_ie htCap;
|
||||||
uint8_t vhtcap_present;
|
uint8_t vhtcap_present;
|
||||||
tSirVHTCap vhtCap;
|
tSirVHTCap vhtCap;
|
||||||
uint8_t uapsd_queues;
|
uint8_t uapsd_queues;
|
||||||
|
@@ -2037,7 +2037,7 @@ static QDF_STATUS lim_tdls_populate_dot11f_ht_caps(tpAniSirGlobal mac,
|
|||||||
tSirMacTxBFCapabilityInfo *pTxBFCapabilityInfo;
|
tSirMacTxBFCapabilityInfo *pTxBFCapabilityInfo;
|
||||||
tSirMacASCapabilityInfo *pASCapabilityInfo;
|
tSirMacASCapabilityInfo *pASCapabilityInfo;
|
||||||
|
|
||||||
nCfgValue = pTdlsAddStaReq->htCap.capInfo;
|
nCfgValue = pTdlsAddStaReq->htCap.hc_cap;
|
||||||
|
|
||||||
uHTCapabilityInfo.nCfgValue16 = nCfgValue & 0xFFFF;
|
uHTCapabilityInfo.nCfgValue16 = nCfgValue & 0xFFFF;
|
||||||
|
|
||||||
@@ -2086,7 +2086,7 @@ static QDF_STATUS lim_tdls_populate_dot11f_ht_caps(tpAniSirGlobal mac,
|
|||||||
pDot11f->shortGI40MHz,
|
pDot11f->shortGI40MHz,
|
||||||
pDot11f->dsssCckMode40MHz);
|
pDot11f->dsssCckMode40MHz);
|
||||||
|
|
||||||
nCfgValue = pTdlsAddStaReq->htCap.ampduParamsInfo;
|
nCfgValue = pTdlsAddStaReq->htCap.ampdu_param;
|
||||||
|
|
||||||
nCfgValue8 = (uint8_t) nCfgValue;
|
nCfgValue8 = (uint8_t) nCfgValue;
|
||||||
pHTParametersInfo = (tSirMacHTParametersInfo *) &nCfgValue8;
|
pHTParametersInfo = (tSirMacHTParametersInfo *) &nCfgValue8;
|
||||||
@@ -2096,11 +2096,10 @@ static QDF_STATUS lim_tdls_populate_dot11f_ht_caps(tpAniSirGlobal mac,
|
|||||||
pDot11f->reserved1 = pHTParametersInfo->reserved;
|
pDot11f->reserved1 = pHTParametersInfo->reserved;
|
||||||
|
|
||||||
pe_debug("AMPDU Param: %x", nCfgValue);
|
pe_debug("AMPDU Param: %x", nCfgValue);
|
||||||
|
qdf_mem_copy(pDot11f->supportedMCSSet, pTdlsAddStaReq->htCap.mcsset,
|
||||||
qdf_mem_copy(pDot11f->supportedMCSSet, pTdlsAddStaReq->htCap.suppMcsSet,
|
|
||||||
SIZE_OF_SUPPORTED_MCS_SET);
|
SIZE_OF_SUPPORTED_MCS_SET);
|
||||||
|
|
||||||
nCfgValue = pTdlsAddStaReq->htCap.extendedHtCapInfo;
|
nCfgValue = pTdlsAddStaReq->htCap.extcap;
|
||||||
|
|
||||||
uHTCapabilityInfo.nCfgValue16 = nCfgValue & 0xFFFF;
|
uHTCapabilityInfo.nCfgValue16 = nCfgValue & 0xFFFF;
|
||||||
|
|
||||||
@@ -2108,7 +2107,7 @@ static QDF_STATUS lim_tdls_populate_dot11f_ht_caps(tpAniSirGlobal mac,
|
|||||||
pDot11f->transitionTime = uHTCapabilityInfo.extHtCapInfo.transitionTime;
|
pDot11f->transitionTime = uHTCapabilityInfo.extHtCapInfo.transitionTime;
|
||||||
pDot11f->mcsFeedback = uHTCapabilityInfo.extHtCapInfo.mcsFeedback;
|
pDot11f->mcsFeedback = uHTCapabilityInfo.extHtCapInfo.mcsFeedback;
|
||||||
|
|
||||||
nCfgValue = pTdlsAddStaReq->htCap.txBFCapInfo;
|
nCfgValue = pTdlsAddStaReq->htCap.txbf_cap;
|
||||||
|
|
||||||
pTxBFCapabilityInfo = (tSirMacTxBFCapabilityInfo *) &nCfgValue;
|
pTxBFCapabilityInfo = (tSirMacTxBFCapabilityInfo *) &nCfgValue;
|
||||||
pDot11f->txBF = pTxBFCapabilityInfo->txBF;
|
pDot11f->txBF = pTxBFCapabilityInfo->txBF;
|
||||||
@@ -2133,7 +2132,7 @@ static QDF_STATUS lim_tdls_populate_dot11f_ht_caps(tpAniSirGlobal mac,
|
|||||||
pDot11f->compressedSteeringMatrixBFAntennae =
|
pDot11f->compressedSteeringMatrixBFAntennae =
|
||||||
pTxBFCapabilityInfo->compressedSteeringMatrixBFAntennae;
|
pTxBFCapabilityInfo->compressedSteeringMatrixBFAntennae;
|
||||||
|
|
||||||
nCfgValue = pTdlsAddStaReq->htCap.antennaSelectionInfo;
|
nCfgValue = pTdlsAddStaReq->htCap.antenna;
|
||||||
|
|
||||||
nCfgValue8 = (uint8_t) nCfgValue;
|
nCfgValue8 = (uint8_t) nCfgValue;
|
||||||
|
|
||||||
@@ -2475,7 +2474,7 @@ static void lim_tdls_update_hash_node_info(tpAniSirGlobal mac,
|
|||||||
htCaps->supportedMCSSet);
|
htCaps->supportedMCSSet);
|
||||||
pStaDs->baPolicyFlag = 0xFF;
|
pStaDs->baPolicyFlag = 0xFF;
|
||||||
mac->lim.gLimTdlsLinkMode = TDLS_LINK_MODE_N;
|
mac->lim.gLimTdlsLinkMode = TDLS_LINK_MODE_N;
|
||||||
pStaDs->ht_caps = pTdlsAddStaReq->htCap.capInfo;
|
pStaDs->ht_caps = pTdlsAddStaReq->htCap.hc_cap;
|
||||||
} else {
|
} else {
|
||||||
pStaDs->mlmStaContext.htCapability = 0;
|
pStaDs->mlmStaContext.htCapability = 0;
|
||||||
mac->lim.gLimTdlsLinkMode = TDLS_LINK_MODE_BG;
|
mac->lim.gLimTdlsLinkMode = TDLS_LINK_MODE_BG;
|
||||||
@@ -2548,9 +2547,11 @@ static void lim_tdls_update_hash_node_info(tpAniSirGlobal mac,
|
|||||||
*/
|
*/
|
||||||
lim_tdls_populate_matching_rate_set(mac, pStaDs,
|
lim_tdls_populate_matching_rate_set(mac, pStaDs,
|
||||||
pTdlsAddStaReq->supported_rates,
|
pTdlsAddStaReq->supported_rates,
|
||||||
pTdlsAddStaReq->supported_rates_length,
|
pTdlsAddStaReq->
|
||||||
(uint8_t *) pTdlsAddStaReq->htCap.
|
supported_rates_length,
|
||||||
suppMcsSet, psessionEntry, pVhtCaps);
|
(uint8_t *)pTdlsAddStaReq->
|
||||||
|
htCap.mcsset,
|
||||||
|
psessionEntry, pVhtCaps);
|
||||||
|
|
||||||
/* TDLS Dummy AddSTA does not have right capability , is it OK ??
|
/* TDLS Dummy AddSTA does not have right capability , is it OK ??
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user