diff options
| author | Xiaochang Duan <xduan@qca.qualcomm.com> | 2014-01-13 11:43:36 -0800 |
|---|---|---|
| committer | Prakash Dhavali <pdhavali@qca.qualcomm.com> | 2014-01-26 00:53:51 -0800 |
| commit | 87f9430f62ff783a1bf946bbc7d7c3fbba81370a (patch) | |
| tree | aaffc335054301093ffbbeefd644f461ef76d63b | |
| parent | 6ca04dffef970f837c39d5a156a31e2a5dcd1f86 (diff) | |
wlan: Pass proper vht_caps & etc parameter values for ADD_STA in IBSS
Pass proper ht_caps, vht_caps and etc. parameter values for ADD_STA
operation in IBSS mode, in which case no assoc process is used.
Change-Id: I8a45dae4f752c925d4977a291a5bfe793c4b64c1
CRs-Fixed: 600349
| -rw-r--r-- | CORE/MAC/inc/sirMacProtDef.h | 19 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/include/limGlobal.h | 2 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limAssocUtils.c | 66 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limIbssPeerMgmt.c | 26 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limIbssPeerMgmt.h | 1 |
5 files changed, 114 insertions, 0 deletions
diff --git a/CORE/MAC/inc/sirMacProtDef.h b/CORE/MAC/inc/sirMacProtDef.h index cdbd77fc1aef..79e9a8ec7c89 100644 --- a/CORE/MAC/inc/sirMacProtDef.h +++ b/CORE/MAC/inc/sirMacProtDef.h @@ -2863,4 +2863,23 @@ typedef __ani_attr_pre_packed struct sSirPhy11aHdr #define SIR_MAC_VHT_CAP_TX_ANTENNA_PATTERN 29 #define SIR_MAC_VHT_CAP_RESERVED2 30 +#define SIR_MAC_HT_CAP_ADVCODING_S 0 +#define SIR_MAC_HT_CAP_CHWIDTH40_S 1 +#define SIR_MAC_HT_CAP_SMPOWERSAVE_DYNAMIC_S 2 +#define SIR_MAC_HT_CAP_SM_RESERVED_S 3 +#define SIR_MAC_HT_CAP_GREENFIELD_S 4 +#define SIR_MAC_HT_CAP_SHORTGI20MHZ_S 5 +#define SIR_MAC_HT_CAP_SHORTGI40MHZ_S 6 +#define SIR_MAC_HT_CAP_TXSTBC_S 7 +#define SIR_MAC_HT_CAP_RXSTBC_S 8 +#define SIR_MAC_HT_CAP_DELAYEDBLKACK_S 10 +#define SIR_MAC_HT_CAP_MAXAMSDUSIZE_S 11 +#define SIR_MAC_HT_CAP_DSSSCCK40_S 12 +#define SIR_MAC_HT_CAP_PSMP_S 13 +#define SIR_MAC_HT_CAP_INTOLERANT40_S 14 +#define SIR_MAC_HT_CAP_LSIGTXOPPROT_S 15 + +#define SIR_MAC_TXSTBC 1 +#define SIR_MAC_RXSTBC 1 + #endif /* __MAC_PROT_DEFS_H */ diff --git a/CORE/MAC/src/pe/include/limGlobal.h b/CORE/MAC/src/pe/include/limGlobal.h index d3f134597e20..7b890fa243f4 100644 --- a/CORE/MAC/src/pe/include/limGlobal.h +++ b/CORE/MAC/src/pe/include/limGlobal.h @@ -548,6 +548,8 @@ struct tLimIbssPeerNode // tANI_U8 htSupportedChannelWidthSet; + tANI_U8 htLdpcCapable; + tANI_U8 beaconHBCount; tANI_U8 heartbeatFailure; diff --git a/CORE/MAC/src/pe/lim/limAssocUtils.c b/CORE/MAC/src/pe/lim/limAssocUtils.c index 4f64bd1fe5a0..12bee18d0ce6 100644 --- a/CORE/MAC/src/pe/lim/limAssocUtils.c +++ b/CORE/MAC/src/pe/lim/limAssocUtils.c @@ -2284,6 +2284,8 @@ limAddSta( tSirMacAddr staMac, *pStaAddr; tANI_U8 i; tpSirAssocReq pAssocReq; + tLimIbssPeerNode *pPeerNode; /* for IBSS mode */ + tDot11fIEVHTCaps vht_caps; /* for IBSS mode */ tANI_U8 *p2pIe = NULL; #if 0 retCode = wlan_cfgGetStr(pMac, WNI_CFG_STA_ID, staMac, &cfg); @@ -2503,6 +2505,70 @@ limAddSta( (pAssocReq->VHTCaps.reserved1 << SIR_MAC_VHT_CAP_RESERVED2)); } } + else if (limGetSystemRole(psessionEntry) == eLIM_STA_IN_IBSS_ROLE) { + + /* in IBSS mode, use peer node as the source of ht_caps and vht_caps */ + pPeerNode = limIbssPeerFind(pMac, *pStaAddr); + if (!pPeerNode) { + limLog( pMac, LOGP, FL("Can't find IBSS peer node for ADD_STA")); + return eSIR_HAL_STA_DOES_NOT_EXIST; + } + + pAddStaParams->ht_caps = + ( pPeerNode->htSupportedChannelWidthSet << + SIR_MAC_HT_CAP_CHWIDTH40_S ) | + ( pPeerNode->htGreenfield << + SIR_MAC_HT_CAP_GREENFIELD_S ) | + ( pPeerNode->htShortGI20Mhz << + SIR_MAC_HT_CAP_SHORTGI20MHZ_S ) | + ( pPeerNode->htShortGI40Mhz << + SIR_MAC_HT_CAP_SHORTGI40MHZ_S ) | + ( SIR_MAC_TXSTBC << + SIR_MAC_HT_CAP_TXSTBC_S ) | + ( SIR_MAC_RXSTBC << + SIR_MAC_HT_CAP_RXSTBC_S ) | + ( pPeerNode->htMaxAmsduLength << + SIR_MAC_HT_CAP_MAXAMSDUSIZE_S ) | + ( pPeerNode->htDsssCckRate40MHzSupport << + SIR_MAC_HT_CAP_DSSSCCK40_S ); + + vht_caps = pPeerNode->VHTCaps; + pAddStaParams->vht_caps = + ((vht_caps.maxMPDULen << SIR_MAC_VHT_CAP_MAX_MPDU_LEN) | + (vht_caps.supportedChannelWidthSet << + SIR_MAC_VHT_CAP_SUPP_CH_WIDTH_SET) | + (vht_caps.ldpcCodingCap << + SIR_MAC_VHT_CAP_LDPC_CODING_CAP) | + (vht_caps.shortGI80MHz << + SIR_MAC_VHT_CAP_SHORTGI_80MHZ) | + (vht_caps.shortGI160and80plus80MHz << + SIR_MAC_VHT_CAP_SHORTGI_160_80_80MHZ) | + (vht_caps.txSTBC << SIR_MAC_VHT_CAP_TXSTBC) | + (vht_caps.rxSTBC << SIR_MAC_VHT_CAP_RXSTBC) | + (vht_caps.suBeamFormerCap << + SIR_MAC_VHT_CAP_SU_BEAMFORMER_CAP) | + (vht_caps.suBeamformeeCap << + SIR_MAC_VHT_CAP_SU_BEAMFORMEE_CAP) | + (vht_caps.csnofBeamformerAntSup << + SIR_MAC_VHT_CAP_CSN_BEAMORMER_ANT_SUP) | + (vht_caps.numSoundingDim << + SIR_MAC_VHT_CAP_NUM_SOUNDING_DIM) | + (vht_caps.muBeamformerCap << + SIR_MAC_VHT_CAP_NUM_BEAM_FORMER_CAP)| + (vht_caps.muBeamformeeCap << + SIR_MAC_VHT_CAP_NUM_BEAM_FORMEE_CAP) | + (vht_caps.vhtTXOPPS << SIR_MAC_VHT_CAP_TXOPPS) | + (vht_caps.htcVHTCap << SIR_MAC_VHT_CAP_HTC_CAP) | + (vht_caps.maxAMPDULenExp << + SIR_MAC_VHT_CAP_MAX_AMDU_LEN_EXPO) | + (vht_caps.vhtLinkAdaptCap << + SIR_MAC_VHT_CAP_LINK_ADAPT_CAP) | + (vht_caps.rxAntPattern << + SIR_MAC_VHT_CAP_RX_ANTENNA_PATTERN) | + (vht_caps.txAntPattern << + SIR_MAC_VHT_CAP_TX_ANTENNA_PATTERN) | + (vht_caps.reserved1 << SIR_MAC_VHT_CAP_RESERVED2)); + } //Disable BA. It will be set as part of ADDBA negotiation. for( i = 0; i < STACFG_MAX_TC; i++ ) diff --git a/CORE/MAC/src/pe/lim/limIbssPeerMgmt.c b/CORE/MAC/src/pe/lim/limIbssPeerMgmt.c index d17c9c288e32..7606064a1355 100644 --- a/CORE/MAC/src/pe/lim/limIbssPeerMgmt.c +++ b/CORE/MAC/src/pe/lim/limIbssPeerMgmt.c @@ -197,6 +197,7 @@ ibss_peer_collect( pPeer->htShortGI40Mhz = (tANI_U8)pBeacon->HTCaps.shortGI40MHz; pPeer->htMaxRxAMpduFactor = pBeacon->HTCaps.maxRxAMPDUFactor; pPeer->htSecondaryChannelOffset = pBeacon->HTInfo.secondaryChannelOffset; + pPeer->htLdpcCapable = (tANI_U8)pBeacon->HTCaps.advCodingCap; } /* Collect peer VHT capabilities based on the received beacon from the peer */ @@ -265,6 +266,7 @@ ibss_sta_caps_update( // In the future, may need to check for "delayedBA" // For now, it is IMMEDIATE BA only on ALL TID's pStaDs->baPolicyFlag = 0xFF; + pStaDs->htLdpcCapable = pPeerNode->htLdpcCapable; } } #ifdef WLAN_FEATURE_11AC @@ -278,6 +280,7 @@ ibss_sta_caps_update( // If in 11AC mode and if session requires 11AC mode, consider peer's // max AMPDU length factor pStaDs->htMaxRxAMpduFactor = pPeerNode->VHTCaps.maxAMPDULenExp; + pStaDs->vhtLdpcCapable = (tANI_U8)pPeerNode->VHTCaps.ldpcCodingCap; } } #endif @@ -1044,6 +1047,29 @@ limIbssDecideProtection(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpUpdateBeaco return; } +/** + * limIbssPeerFind() + * + *FUNCTION: + * This function is called while adding a context at + * DPH & Polaris for a peer in IBSS. + * If peer is found in the list, capabilities from the + * returned BSS description are used at DPH node & Polaris. + * + *LOGIC: + * + *ASSUMPTIONS: + * + *NOTE: + * + * @param macAddr - MAC address of the peer + * + * @return Pointer to peer node if found, else NULL + */ +tLimIbssPeerNode* limIbssPeerFind(tpAniSirGlobal pMac, tSirMacAddr macAddr) +{ + return ibss_peer_find(pMac, macAddr); +} /** * limIbssStaAdd() diff --git a/CORE/MAC/src/pe/lim/limIbssPeerMgmt.h b/CORE/MAC/src/pe/lim/limIbssPeerMgmt.h index a88f3dbfc825..da0070517b32 100644 --- a/CORE/MAC/src/pe/lim/limIbssPeerMgmt.h +++ b/CORE/MAC/src/pe/lim/limIbssPeerMgmt.h @@ -45,6 +45,7 @@ void limIbssDelete(tpAniSirGlobal,tpPESession psessionEntry); tSirRetStatus limIbssCoalesce(tpAniSirGlobal, tpSirMacMgmtHdr, tpSchBeaconStruct, tANI_U8*,tANI_U32, tANI_U16,tpPESession); tSirRetStatus limIbssStaAdd(tpAniSirGlobal, void *,tpPESession); tSirRetStatus limIbssAddStaRsp( tpAniSirGlobal, void *,tpPESession); +tLimIbssPeerNode* limIbssPeerFind(tpAniSirGlobal pMac, tSirMacAddr macAddr); void limIbssDelBssRsp( tpAniSirGlobal, void *,tpPESession); void limIbssDelBssRspWhenCoalescing(tpAniSirGlobal, void *,tpPESession); void limIbssAddBssRspWhenCoalescing(tpAniSirGlobal pMac, void * msg, tpPESession pSessionEntry); |
