diff options
| author | Kanchanapally, Vidyullatha <vkanchan@qti.qualcomm.com> | 2014-02-05 00:54:48 -0800 |
|---|---|---|
| committer | Prakash Dhavali <pdhavali@qca.qualcomm.com> | 2014-02-05 21:06:50 -0800 |
| commit | eac911608e929ac65a44b22263ab926eb1d99342 (patch) | |
| tree | 121d6ba43c468838c3b9002b8b25a4f01baea7e2 | |
| parent | eb6693d3af3d85a150e5be0099214dc6b6a24b9f (diff) | |
wlan: To remove extra action frame sent in beacon report
Changes have been made in the driver such that the driver
will now not send an extra action frame when there are no
reports on the last channel measured. Instead a frame with
zeroed tagged parameters is only sent when there are no
scan results found on all the channels measured.
Also changes have been made in function
rrmProcessBeaconReportReq to copy measurement duration
and mode correctly when AP channel report is present.
CRs-Fixed: 607062
Change-Id: I56de0b117baa26632b8c3250106b32d96b94cd55
| -rw-r--r-- | CORE/MAC/src/pe/include/rrmGlobal.h | 5 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/rrm/rrmApi.c | 237 |
2 files changed, 126 insertions, 116 deletions
diff --git a/CORE/MAC/src/pe/include/rrmGlobal.h b/CORE/MAC/src/pe/include/rrmGlobal.h index c06e70811e28..dc9b34c9d337 100644 --- a/CORE/MAC/src/pe/include/rrmGlobal.h +++ b/CORE/MAC/src/pe/include/rrmGlobal.h @@ -24,8 +24,6 @@ * under proprietary terms before Copyright ownership was assigned * to the Linux Foundation. */ -/* - * */ #if !defined( __RRMGLOBAL_H ) #define __RRMGLOBAL_H @@ -73,7 +71,7 @@ typedef struct sSirBeaconReportXmitInd tANI_U16 messageType; // eWNI_SME_BEACON_REPORT_RESP_XMIT_IND tANI_U16 length; tSirMacAddr bssId; - tANI_U16 uDialogToken; + tANI_U16 uDialogToken; tANI_U8 fMeasureDone; tANI_U16 duration; tANI_U8 regClass; @@ -165,6 +163,7 @@ typedef struct sRRMReq tRRMBeaconReportRequestedIes reqIes; }Beacon; }request; + tANI_U8 sendEmptyBcnRpt; }tRRMReq, *tpRRMReq; typedef struct sRRMCaps diff --git a/CORE/MAC/src/pe/rrm/rrmApi.c b/CORE/MAC/src/pe/rrm/rrmApi.c index 5e8f760f7dcf..590e92125215 100644 --- a/CORE/MAC/src/pe/rrm/rrmApi.c +++ b/CORE/MAC/src/pe/rrm/rrmApi.c @@ -539,6 +539,7 @@ rrmProcessBeaconReportReq( tpAniSirGlobal pMac, tANI_U16 measDuration, maxMeasduration; tANI_S8 maxDuration; tANI_U8 sign; + tANI_U16 index; if( pBeaconReq->measurement_request.Beacon.BeaconReporting.present && (pBeaconReq->measurement_request.Beacon.BeaconReporting.reportingCondition != 0) ) @@ -657,6 +658,7 @@ rrmProcessBeaconReportReq( tpAniSirGlobal pMac, if( pBeaconReq->measurement_request.Beacon.num_APChannelReport ) { tANI_U8 *pChanList = pSmeBcnReportReq->channelList.channelNumber; + tANI_U16 index2 = 0; for( num_APChanReport = 0 ; num_APChanReport < pBeaconReq->measurement_request.Beacon.num_APChannelReport ; num_APChanReport++ ) { vos_mem_copy(pChanList, @@ -664,8 +666,11 @@ rrmProcessBeaconReportReq( tpAniSirGlobal pMac, pBeaconReq->measurement_request.Beacon.APChannelReport[num_APChanReport].num_channelList); pChanList += pBeaconReq->measurement_request.Beacon.APChannelReport[num_APChanReport].num_channelList; - pSmeBcnReportReq->measurementDuration[num_APChanReport] = SYS_TU_TO_MS(measDuration /*pBeaconReq->measurement_request.Beacon.meas_duration*/); - pSmeBcnReportReq->fMeasurementtype[num_APChanReport] = pBeaconReq->measurement_request.Beacon.meas_mode; + for( index = 0; index < (pBeaconReq->measurement_request.Beacon.APChannelReport[num_APChanReport].num_channelList); index++ ) + { + pSmeBcnReportReq->measurementDuration[index2] = SYS_TU_TO_MS(measDuration); + pSmeBcnReportReq->fMeasurementtype[index2++] = pBeaconReq->measurement_request.Beacon.meas_mode; + } } } else @@ -785,7 +790,7 @@ rrmProcessBeaconReportXmit( tpAniSirGlobal pMac, tpSirBeaconReportXmitInd pBcnReport) { tSirRetStatus status = eSIR_SUCCESS; - tSirMacRadioMeasureReport *pReport; + tSirMacRadioMeasureReport *pReport = NULL; tpRRMReq pCurrentReq = pMac->rrm.rrmPEContext.pCurrentReq; tpPESession pSessionEntry ; tANI_U8 sessionId; @@ -803,9 +808,6 @@ rrmProcessBeaconReportXmit( tpAniSirGlobal pMac, return eSIR_FAILURE; } - pBcnReport->numBssDesc = (pBcnReport->numBssDesc == RRM_BCN_RPT_NO_BSS_INFO)? - RRM_BCN_RPT_MIN_RPT : pBcnReport->numBssDesc; - if (NULL == pCurrentReq) { PELOGE(limLog( pMac, LOGE, @@ -813,137 +815,145 @@ rrmProcessBeaconReportXmit( tpAniSirGlobal pMac, return eSIR_FAILURE; } - if (NULL == (pSessionEntry = peFindSessionByBssid(pMac, - pBcnReport->bssId, - &sessionId))) + if( (pBcnReport->numBssDesc) || + (!pBcnReport->numBssDesc && pCurrentReq->sendEmptyBcnRpt) ) { - PELOGE(limLog(pMac, LOGE,FL("session does not exist for given bssId"));) - return eSIR_FAILURE; - } + pBcnReport->numBssDesc = (pBcnReport->numBssDesc == RRM_BCN_RPT_NO_BSS_INFO)? + RRM_BCN_RPT_MIN_RPT : pBcnReport->numBssDesc; + + if (NULL == (pSessionEntry = peFindSessionByBssid(pMac, + pBcnReport->bssId, + &sessionId))) + { + PELOGE(limLog(pMac, LOGE,FL("session does not exist for given bssId"));) + return eSIR_FAILURE; + } - pReport = vos_mem_malloc(pBcnReport->numBssDesc * - sizeof(tSirMacRadioMeasureReport)); + pReport = vos_mem_malloc(pBcnReport->numBssDesc * + sizeof(tSirMacRadioMeasureReport)); - if (NULL == pReport) - { - PELOGE(limLog(pMac, LOGE,FL("RRM Report is NULL, allocation failed"));) - return eSIR_FAILURE; - } + if (NULL == pReport) + { + PELOGE(limLog(pMac, LOGE,FL("RRM Report is NULL, allocation failed"));) + return eSIR_FAILURE; + } - vos_mem_zero( pReport, - pBcnReport->numBssDesc * sizeof(tSirMacRadioMeasureReport) ); + vos_mem_zero( pReport, + pBcnReport->numBssDesc * sizeof(tSirMacRadioMeasureReport) ); - for (bssDescCnt = 0; bssDescCnt < pBcnReport->numBssDesc; bssDescCnt++) - { - //Prepare the beacon report and send it to the peer. - pReport[bssDescCnt].token = pBcnReport->uDialogToken; - pReport[bssDescCnt].refused = 0; - pReport[bssDescCnt].incapable = 0; - pReport[bssDescCnt].type = SIR_MAC_RRM_BEACON_TYPE; - - //If the scan result is NULL then send report request with - //option subelement as NULL.. - if ( NULL != pBcnReport->pBssDescription[bssDescCnt] ) - { - flagBSSPresent = TRUE; - } - - //Valid response is included if the size of beacon xmit - //is == size of beacon xmit ind + ies - if ( pBcnReport->length >= sizeof( tSirBeaconReportXmitInd ) ) - { - pReport[bssDescCnt].report.beaconReport.regClass = pBcnReport->regClass; - if ( flagBSSPresent ) - { - pReport[bssDescCnt].report.beaconReport.channel = - pBcnReport->pBssDescription[bssDescCnt]->channelId; - vos_mem_copy( pReport[bssDescCnt].report.beaconReport.measStartTime, - pBcnReport->pBssDescription[bssDescCnt]->startTSF, - sizeof( pBcnReport->pBssDescription[bssDescCnt]->startTSF) ); - pReport[bssDescCnt].report.beaconReport.measDuration = - SYS_MS_TO_TU(pBcnReport->duration); - pReport[bssDescCnt].report.beaconReport.phyType = - pBcnReport->pBssDescription[bssDescCnt]->nwType; - pReport[bssDescCnt].report.beaconReport.bcnProbeRsp = 1; - pReport[bssDescCnt].report.beaconReport.rsni = - pBcnReport->pBssDescription[bssDescCnt]->sinr; - pReport[bssDescCnt].report.beaconReport.rcpi = - pBcnReport->pBssDescription[bssDescCnt]->rssi; - - pReport[bssDescCnt].report.beaconReport.antennaId = 0; - pReport[bssDescCnt].report.beaconReport.parentTSF = - pBcnReport->pBssDescription[bssDescCnt]->parentTSF; - vos_mem_copy( pReport[bssDescCnt].report.beaconReport.bssid, - pBcnReport->pBssDescription[bssDescCnt]->bssId, - sizeof(tSirMacAddr)); - } - - switch ( pCurrentReq->request.Beacon.reportingDetail ) - { - case BEACON_REPORTING_DETAIL_NO_FF_IE: - //0 No need to include any elements. + for (bssDescCnt = 0; bssDescCnt < pBcnReport->numBssDesc; bssDescCnt++) + { + //Prepare the beacon report and send it to the peer. + pReport[bssDescCnt].token = pBcnReport->uDialogToken; + pReport[bssDescCnt].refused = 0; + pReport[bssDescCnt].incapable = 0; + pReport[bssDescCnt].type = SIR_MAC_RRM_BEACON_TYPE; + + //If the scan result is NULL then send report request with + //option subelement as NULL.. + if ( NULL != pBcnReport->pBssDescription[bssDescCnt] ) + { + flagBSSPresent = TRUE; + } + + //Valid response is included if the size of beacon xmit + //is == size of beacon xmit ind + ies + if ( pBcnReport->length >= sizeof( tSirBeaconReportXmitInd ) ) + { + pReport[bssDescCnt].report.beaconReport.regClass = pBcnReport->regClass; + if ( flagBSSPresent ) + { + pReport[bssDescCnt].report.beaconReport.channel = + pBcnReport->pBssDescription[bssDescCnt]->channelId; + vos_mem_copy( pReport[bssDescCnt].report.beaconReport.measStartTime, + pBcnReport->pBssDescription[bssDescCnt]->startTSF, + sizeof( pBcnReport->pBssDescription[bssDescCnt]->startTSF) ); + pReport[bssDescCnt].report.beaconReport.measDuration = + SYS_MS_TO_TU(pBcnReport->duration); + pReport[bssDescCnt].report.beaconReport.phyType = + pBcnReport->pBssDescription[bssDescCnt]->nwType; + pReport[bssDescCnt].report.beaconReport.bcnProbeRsp = 1; + pReport[bssDescCnt].report.beaconReport.rsni = + pBcnReport->pBssDescription[bssDescCnt]->sinr; + pReport[bssDescCnt].report.beaconReport.rcpi = + pBcnReport->pBssDescription[bssDescCnt]->rssi; + + pReport[bssDescCnt].report.beaconReport.antennaId = 0; + pReport[bssDescCnt].report.beaconReport.parentTSF = + pBcnReport->pBssDescription[bssDescCnt]->parentTSF; + vos_mem_copy( pReport[bssDescCnt].report.beaconReport.bssid, + pBcnReport->pBssDescription[bssDescCnt]->bssId, + sizeof(tSirMacAddr)); + } + + switch ( pCurrentReq->request.Beacon.reportingDetail ) + { + case BEACON_REPORTING_DETAIL_NO_FF_IE: + //0 No need to include any elements. #if defined WLAN_VOWIFI_DEBUG - PELOGE(limLog(pMac, LOGE, "No reporting detail requested");) + PELOGE(limLog(pMac, LOGE, "No reporting detail requested");) #endif - break; - case BEACON_REPORTING_DETAIL_ALL_FF_REQ_IE: - //1: Include all FFs and Requested Ies. + break; + case BEACON_REPORTING_DETAIL_ALL_FF_REQ_IE: + //1: Include all FFs and Requested Ies. #if defined WLAN_VOWIFI_DEBUG - PELOGE(limLog(pMac, LOGE, - "Only requested IEs in reporting detail requested");) + PELOGE(limLog(pMac, LOGE, + "Only requested IEs in reporting detail requested");) #endif - if ( flagBSSPresent ) - { - rrmFillBeaconIes( pMac, - (tANI_U8*) &pReport[bssDescCnt].report.beaconReport.Ies[0], - (tANI_U8*) &pReport[bssDescCnt].report.beaconReport.numIes, - BEACON_REPORT_MAX_IES, - pCurrentReq->request.Beacon.reqIes.pElementIds, - pCurrentReq->request.Beacon.reqIes.num, - pBcnReport->pBssDescription[bssDescCnt] ); - } + if ( flagBSSPresent ) + { + rrmFillBeaconIes( pMac, + (tANI_U8*) &pReport[bssDescCnt].report.beaconReport.Ies[0], + (tANI_U8*) &pReport[bssDescCnt].report.beaconReport.numIes, + BEACON_REPORT_MAX_IES, + pCurrentReq->request.Beacon.reqIes.pElementIds, + pCurrentReq->request.Beacon.reqIes.num, + pBcnReport->pBssDescription[bssDescCnt] ); + } - break; - case BEACON_REPORTING_DETAIL_ALL_FF_IE: - //2 / default - Include all FFs and all Ies. - default: + break; + case BEACON_REPORTING_DETAIL_ALL_FF_IE: + //2 / default - Include all FFs and all Ies. + default: #if defined WLAN_VOWIFI_DEBUG - PELOGE(limLog(pMac, LOGE, "Default all IEs and FFs");) + PELOGE(limLog(pMac, LOGE, "Default all IEs and FFs");) #endif - if ( flagBSSPresent ) - { - rrmFillBeaconIes( pMac, - (tANI_U8*) &pReport[bssDescCnt].report.beaconReport.Ies[0], - (tANI_U8*) &pReport[bssDescCnt].report.beaconReport.numIes, - BEACON_REPORT_MAX_IES, - NULL, 0, - pBcnReport->pBssDescription[bssDescCnt] ); - } - break; + if ( flagBSSPresent ) + { + rrmFillBeaconIes( pMac, + (tANI_U8*) &pReport[bssDescCnt].report.beaconReport.Ies[0], + (tANI_U8*) &pReport[bssDescCnt].report.beaconReport.numIes, + BEACON_REPORT_MAX_IES, + NULL, 0, + pBcnReport->pBssDescription[bssDescCnt] ); + } + break; + } } - } - } + } #if defined WLAN_VOWIFI_DEBUG - PELOGE(limLog( pMac, LOGE, "Sending Action frame ");) + PELOGE(limLog( pMac, LOGE, "Sending Action frame ");) #endif - limSendRadioMeasureReportActionFrame( pMac, - pCurrentReq->dialog_token, - bssDescCnt, - pReport, - pBcnReport->bssId, - pSessionEntry ); - + limSendRadioMeasureReportActionFrame( pMac, + pCurrentReq->dialog_token, + bssDescCnt, + pReport, + pBcnReport->bssId, + pSessionEntry ); + + pCurrentReq->sendEmptyBcnRpt = false; + } if( pBcnReport->fMeasureDone ) { PELOGE(limLog( pMac, LOGE, "Measurement done....cleanup the context");) - rrmCleanup(pMac); } - vos_mem_free(pReport); + if( NULL != pReport) + vos_mem_free(pReport); return status; } @@ -1116,6 +1126,7 @@ rrmProcessRadioMeasurementRequest( tpAniSirGlobal pMac, vos_mem_set(pCurrentReq, sizeof( *pCurrentReq ), 0); pCurrentReq->dialog_token = pRRMReq->DialogToken.token; pCurrentReq->token = pRRMReq->MeasurementRequest[i].measurement_token; + pCurrentReq->sendEmptyBcnRpt = true; pMac->rrm.rrmPEContext.pCurrentReq = pCurrentReq; rrmStatus = rrmProcessBeaconReportReq( pMac, pCurrentReq, &pRRMReq->MeasurementRequest[i], pSessionEntry ); if (eRRM_SUCCESS != rrmStatus) |
