diff options
| author | Ravi Joshi <ravij@qca.qualcomm.com> | 2016-07-07 13:55:02 -0700 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2016-07-18 11:52:53 +0530 |
| commit | 1d292d761555c35a89586bf8d3adc8bdb6589ade (patch) | |
| tree | 36bf3d8cbcf528efbb49acc2787b38e33d62eebd | |
| parent | 70b8870064ea75060ddf8289c72a7aacfc5a7144 (diff) | |
qcacld-2.0: Configure multicast filters for nan data interface
Configure multicast filters for the nan data interface.
Request to configure multicast filters is not honored for the
NAN data interface in the current implementation.
CRs-Fixed: 962367
Change-Id: I48a4a30fd9f6369fe398254184d0016a35c0a6b3
| -rw-r--r-- | CORE/SME/inc/csrInternal.h | 1 | ||||
| -rw-r--r-- | CORE/SME/src/csr/csrUtil.c | 17 | ||||
| -rw-r--r-- | CORE/SME/src/sme_common/sme_Api.c | 16 |
3 files changed, 26 insertions, 8 deletions
diff --git a/CORE/SME/inc/csrInternal.h b/CORE/SME/inc/csrInternal.h index 2c69f5fd8b65..587c3d78529c 100644 --- a/CORE/SME/inc/csrInternal.h +++ b/CORE/SME/inc/csrInternal.h @@ -1296,6 +1296,7 @@ eHalStatus csrIsBTAMPAllowed( tpAniSirGlobal pMac, tANI_U32 chnId ); tANI_BOOLEAN csrIsValidMcConcurrentSession(tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDescription *pBssDesc); tANI_BOOLEAN csrIsConnStateConnectedInfraAp( tpAniSirGlobal pMac, tANI_U32 sessionId ); +bool csr_is_ndi_started(tpAniSirGlobal mac_ctx, uint32_t session_id); /*---------------------------------------------------------------------------- \fn csrRoamRegisterLinkQualityIndCallback diff --git a/CORE/SME/src/csr/csrUtil.c b/CORE/SME/src/csr/csrUtil.c index 00fc0df624ec..c30aadde62a9 100644 --- a/CORE/SME/src/csr/csrUtil.c +++ b/CORE/SME/src/csr/csrUtil.c @@ -636,6 +636,23 @@ tANI_BOOLEAN csrIsAnySessionInConnectState( tpAniSirGlobal pMac ) return ( fRc ); } +/** + * csr_is_ndi_started() - function to check if NDI is started + * @mac_ctx: handle to mac context + * @session_id: session identifier + * + * returns: true if NDI is started, false otherwise + */ +bool csr_is_ndi_started(tpAniSirGlobal mac_ctx, uint32_t session_id) +{ + tCsrRoamSession *session = CSR_GET_SESSION(mac_ctx, session_id); + + if (!session) + return false; + + return (eCSR_CONNECT_STATE_TYPE_NDI_STARTED == session->connectState); +} + tANI_S8 csrGetInfraSessionId( tpAniSirGlobal pMac ) { tANI_U8 i; diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c index e8d4fd300495..871ffbd913bc 100644 --- a/CORE/SME/src/sme_common/sme_Api.c +++ b/CORE/SME/src/sme_common/sme_Api.c @@ -9231,8 +9231,8 @@ eHalStatus sme_8023MulticastList (tHalHandle hHal, tANI_U8 sessionId, tpSirRcvFl *Find the connected Infra / P2P_client connected session */ if (CSR_IS_SESSION_VALID(pMac, sessionId) && - csrIsConnStateInfra(pMac, sessionId)) - { + (csrIsConnStateInfra(pMac, sessionId) || + csr_is_ndi_started(pMac, sessionId))) { pSession = CSR_GET_SESSION( pMac, sessionId ); } @@ -9242,17 +9242,17 @@ eHalStatus sme_8023MulticastList (tHalHandle hHal, tANI_U8 sessionId, tpSirRcvFl } pRequestBuf = vos_mem_malloc(sizeof(tSirRcvFltMcAddrList)); - if (NULL == pRequestBuf) - { + if (NULL == pRequestBuf) { VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, "%s: Not able to " "allocate memory for 8023 Multicast List request", __func__); return eHAL_STATUS_FAILED_ALLOC; } - if( !csrIsConnStateConnectedInfra (pMac, sessionId )) - { - VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, "%s: Ignoring the " - "indication as we are not connected", __func__); + if (!csrIsConnStateConnectedInfra(pMac, sessionId) && + !csr_is_ndi_started(pMac, sessionId)) { + VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, + "%s: Request ignored, session %d is not connected or started", + __func__, sessionId); vos_mem_free(pRequestBuf); return eHAL_STATUS_FAILURE; } |
