diff options
| author | Hanumantha Reddy Pothula <c_hpothu@qti.qualcomm.com> | 2014-10-28 21:59:47 +0530 |
|---|---|---|
| committer | AnjaneeDevi Kapparapu <c_akappa@qti.qualcomm.com> | 2014-11-06 17:25:13 +0530 |
| commit | d4fd48e3023e202bbcdbd33f4760da5696eae19b (patch) | |
| tree | 09f561f748d82f74426d31600c3f29750ef2fa95 | |
| parent | 5235cf97475998d44721d05113cf174dfc4859ec (diff) | |
qcacld: sme changes to parse reason-code in del_sta.
del_station callback function in cfg80211 is enhanced to also include
the Deauthentication or Disassociation reason code which shall be
passed by the supplicant. To ensure the host driver interops with the
both versions of del_station implementation, a flag CFG80211_DEL_STA_V2
is defined in the kernel. Enhance the driver to rely on this flag and
thus use the respective del_station callback functionality.
If CFG80211_DEL_STA_V2 flag is defined, pass the reason-code received
from nl-layer to SME layer.
Change-Id: I6582f529afe544b907c405187880e2095f2aecb8
CRs-Fixed: 746952
| -rw-r--r-- | CORE/SME/inc/csrApi.h | 7 | ||||
| -rw-r--r-- | CORE/SME/inc/sme_Api.h | 4 | ||||
| -rw-r--r-- | CORE/SME/src/csr/csrApiRoam.c | 12 | ||||
| -rw-r--r-- | CORE/SME/src/csr/csrInsideApi.h | 6 | ||||
| -rw-r--r-- | CORE/SME/src/sme_common/sme_Api.c | 7 |
5 files changed, 20 insertions, 16 deletions
diff --git a/CORE/SME/inc/csrApi.h b/CORE/SME/inc/csrApi.h index 4f506ebd2ab6..5e324a2ccc47 100644 --- a/CORE/SME/inc/csrApi.h +++ b/CORE/SME/inc/csrApi.h @@ -1550,6 +1550,13 @@ typedef struct tagCsrEseBeaconReq } tCsrEseBeaconReq, *tpCsrEseBeaconReq; #endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */ +struct tagCsrDelStaParams +{ + tCsrBssid peerMacAddr; + u16 reason_code; + u8 subtype; +}; + ////////////////////////////////////////////Common SCAN starts //void *p2 -- the second context pass in for the caller diff --git a/CORE/SME/inc/sme_Api.h b/CORE/SME/inc/sme_Api.h index 2875078c7082..3aa79410e374 100644 --- a/CORE/SME/inc/sme_Api.h +++ b/CORE/SME/inc/sme_Api.h @@ -749,11 +749,11 @@ eHalStatus sme_RoamDisconnectSta(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pP \brief To disassociate a station. This is an asynchronous API. \param hHal - Global structure \param sessionId - sessionId of SoftAP - \param pPeerMacAddr - Caller allocated memory filled with peer MAC address (6 bytes) + \param pDelStaParams- Pointer to parameters of the station to deauthenticate \return eHalStatus SUCCESS Roam callback will be called to indicate actual results -------------------------------------------------------------------------------*/ eHalStatus sme_RoamDeauthSta(tHalHandle hHal, tANI_U8 sessionId, - tANI_U8 *pPeerMacAddr); + struct tagCsrDelStaParams *pDelStaParams); /* --------------------------------------------------------------------------- \fn sme_RoamTKIPCounterMeasures diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c index fd79024ebac1..438bf2829705 100644 --- a/CORE/SME/src/csr/csrApiRoam.c +++ b/CORE/SME/src/csr/csrApiRoam.c @@ -2911,14 +2911,12 @@ eHalStatus csrRoamIssueDisassociateStaCmd( tpAniSirGlobal pMac, \fn csrRoamIssueDeauthSta \brief csr function that HDD calls to delete a associated station \param sessionId - session Id for Soft AP - \param pPeerMacAddr - MAC of associated station to delete - \param reason - reason code, be one of the tSirMacReasonCodes + \param pDelStaParams- Pointer to parameters of the station to deauthenticate \return eHalStatus ---------------------------------------------------------------------------*/ eHalStatus csrRoamIssueDeauthStaCmd( tpAniSirGlobal pMac, tANI_U32 sessionId, - tANI_U8 *pPeerMacAddr, - tANI_U32 reason) + struct tagCsrDelStaParams *pDelStaParams) { eHalStatus status = eHAL_STATUS_SUCCESS; tSmeCmd *pCommand; @@ -2935,8 +2933,10 @@ eHalStatus csrRoamIssueDeauthStaCmd( tpAniSirGlobal pMac, pCommand->command = eSmeCommandRoam; pCommand->sessionId = (tANI_U8)sessionId; pCommand->u.roamCmd.roamReason = eCsrForcedDeauthSta; - vos_mem_copy(pCommand->u.roamCmd.peerMac, pPeerMacAddr, 6); - pCommand->u.roamCmd.reason = (tSirMacReasonCodes)reason; + vos_mem_copy(pCommand->u.roamCmd.peerMac, pDelStaParams->peerMacAddr, + sizeof(tSirMacAddr)); + pCommand->u.roamCmd.reason = + (tSirMacReasonCodes)pDelStaParams->reason_code; status = csrQueueSmeCommand(pMac, pCommand, eANI_BOOLEAN_FALSE); if( !HAL_STATUS_SUCCESS( status ) ) { diff --git a/CORE/SME/src/csr/csrInsideApi.h b/CORE/SME/src/csr/csrInsideApi.h index 72e02ca70d52..62186578a915 100644 --- a/CORE/SME/src/csr/csrInsideApi.h +++ b/CORE/SME/src/csr/csrInsideApi.h @@ -944,14 +944,12 @@ eHalStatus csrRoamIssueDisassociateStaCmd( tpAniSirGlobal pMac, \fn csrRoamIssueDeauthSta \brief csr function that HDD calls to delete a associated station \param sessionId - session Id for Soft AP - \param pPeerMacAddr - MAC of associated station to delete - \param reason - reason code, be one of the tSirMacReasonCodes + \param pDelStaParams- Pointer to parameters of the station to deauthenticate \return eHalStatus ---------------------------------------------------------------------------*/ eHalStatus csrRoamIssueDeauthStaCmd( tpAniSirGlobal pMac, tANI_U32 sessionId, - tANI_U8 *pPeerMacAddr, - tANI_U32 reason); + struct tagCsrDelStaParams *pDelStaParams); /* --------------------------------------------------------------------------- \fn csrRoamIssueTkipCounterMeasures diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c index 3340c3104ae7..401254fbdf21 100644 --- a/CORE/SME/src/sme_common/sme_Api.c +++ b/CORE/SME/src/sme_common/sme_Api.c @@ -3688,11 +3688,11 @@ eHalStatus sme_RoamDisconnectSta(tHalHandle hHal, tANI_U8 sessionId, \brief To disassociate a station. This is an asynchronous API. \param hHal - Global structure \param sessionId - sessionId of SoftAP - \param pPeerMacAddr - Caller allocated memory filled with peer MAC address (6 bytes) + \param pDelStaParams -Pointer to parameters of the station to deauthenticate \return eHalStatus SUCCESS Roam callback will be called to indicate actual results -------------------------------------------------------------------------------*/ eHalStatus sme_RoamDeauthSta(tHalHandle hHal, tANI_U8 sessionId, - tANI_U8 *pPeerMacAddr) + struct tagCsrDelStaParams *pDelStaParams) { eHalStatus status = eHAL_STATUS_FAILURE; tpAniSirGlobal pMac = PMAC_STRUCT( hHal ); @@ -3708,8 +3708,7 @@ eHalStatus sme_RoamDeauthSta(tHalHandle hHal, tANI_U8 sessionId, { if( CSR_IS_SESSION_VALID( pMac, sessionId ) ) { - status = csrRoamIssueDeauthStaCmd( pMac, sessionId, pPeerMacAddr, - eSIR_MAC_DEAUTH_LEAVING_BSS_REASON); + status = csrRoamIssueDeauthStaCmd( pMac, sessionId, pDelStaParams); } else { |
