Lines Matching refs:pMeasurementSRV
67 measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
136 pMeasurementSRV->SMState = MSR_SRV_STATE_IDLE;
139 return fsm_Config( pMeasurementSRV->SM, (fsm_Matrix_t)smMatrix,
141 (fsm_eventActivation_t)measurementSRVSM_SMEvent, pMeasurementSRV->hOS );
183 measurementSRV_t *pMeasurementSRV = (measurementSRV_t *)hMeasurementSrv;
188 status = fsm_GetNextState( pMeasurementSRV->SM, (UINT8)*currentState, (UINT8)event, &nextState );
191 WLAN_REPORT_INFORMATION( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG,
198 WLAN_REPORT_INFORMATION( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG,
206 return fsm_Event( pMeasurementSRV->SM, (UINT8*)currentState, (UINT8)event, hMeasurementSrv );
220 measurementSRV_t *pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
226 whalCtrl_GetParam( pMeasurementSRV->hHalCtrl, ¶mInfo );
229 if ( paramInfo.content.halCtrlCurrentChannel == pMeasurementSRV->msrRequest.channel )
232 PSStatus = powerSrv_ReservePS( pMeasurementSRV->hPowerSaveSRV, POWER_SAVE_KEEP_CURRENT,
238 PSStatus = powerSrv_ReservePS( pMeasurementSRV->hPowerSaveSRV, POWER_SAVE_ON,
245 WLAN_REPORT_INFORMATION( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG,
248 return measurementSRVSM_SMEvent( hMeasurementSRV, &(pMeasurementSRV->SMState),
254 WLAN_REPORT_INFORMATION( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG,
259 WLAN_REPORT_ERROR( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG,
263 pMeasurementSRV->returnStatus = PSStatus;
266 measurementSRVSM_SMEvent( hMeasurementSRV, &(pMeasurementSRV->SMState),
285 measurementSRV_t *pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
288 UINT32 currentTime = os_timeStampMs( pMeasurementSRV->hOS );
291 if ( (pMeasurementSRV->requestRecptionTimeStampMs + pMeasurementSRV->timeToRequestExpiryMs)
296 WLAN_REPORT_ERROR( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG,
299 pMeasurementSRV->requestRecptionTimeStampMs + pMeasurementSRV->timeToRequestExpiryMs,
303 for ( i = 0; i < pMeasurementSRV->msrRequest.numberOfTypes; i++ )
305 pMeasurementSRV->msrReply.msrTypes[ i ].status = NOK;
309 measurementSRVSM_SMEvent( hMeasurementSRV, &(pMeasurementSRV->SMState),
315 pMeasurementCmd.channel = pMeasurementSRV->msrRequest.channel;
316 pMeasurementCmd.band = pMeasurementSRV->msrRequest.band;
326 whalCtrl_GetParam( pMeasurementSRV->hHalCtrl, ¶mInfo );
331 if ( paramInfo.content.halCtrlCurrentChannel == pMeasurementSRV->msrRequest.channel )
351 status = (TI_STATUS)whalCtrl_measurementCmd( pMeasurementSRV->hHalCtrl, &pMeasurementCmd,
353 pMeasurementSRV );
357 WLAN_REPORT_ERROR( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG,
362 pMeasurementSRV->returnStatus = status;
365 return measurementSRVSM_SMEvent( hMeasurementSRV, &(pMeasurementSRV->SMState),
369 WLAN_REPORT_INFORMATION( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG,
380 pMeasurementSRV->bStartStopTimerRunning = TRUE;
381 os_timerStart( pMeasurementSRV->hOS, pMeasurementSRV->hStartStopTimer, MSR_FW_GUARD_TIME, FALSE );
397 measurementSRV_t *pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
404 UINT32 currentTime = os_timeStampMs( pMeasurementSRV->hOS );
407 if ( (pMeasurementSRV->requestRecptionTimeStampMs + pMeasurementSRV->timeToRequestExpiryMs)
412 WLAN_REPORT_ERROR( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG,
415 pMeasurementSRV->requestRecptionTimeStampMs + pMeasurementSRV->timeToRequestExpiryMs,
419 for ( i = 0; i < pMeasurementSRV->msrRequest.numberOfTypes; i++ )
421 pMeasurementSRV->msrReply.msrTypes[ i ].status = MSR_REJECT_MAX_DELAY_PASSED;
425 measurementSRVSM_SMEvent( hMeasurementSRV, &(pMeasurementSRV->SMState),
433 for ( requestIndex = 0; requestIndex < pMeasurementSRV->msrRequest.numberOfTypes ; requestIndex++ )
435 switch (pMeasurementSRV->msrRequest.msrTypes[ requestIndex ].msrType)
443 (UINT8*)(&(pMeasurementSRV->mediumOccupancyResults));
444 status = whalCtrl_GetParam( pMeasurementSRV->hHalCtrl, &whalParam );
447 WLAN_REPORT_INFORMATION( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG,
451 os_timerStart( pMeasurementSRV->hOS, pMeasurementSRV->hRequestTimer[ requestIndex ],
452 pMeasurementSRV->msrRequest.msrTypes[ requestIndex ].duration, FALSE );
453 pMeasurementSRV->bRequestTimerRunning[ requestIndex ] = TRUE;
457 WLAN_REPORT_ERROR( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG,
467 os_memoryZero( pMeasurementSRV->hOS, &(pNoiseHistParams.ranges[0]), MEASUREMENT_NOISE_HISTOGRAM_NUM_OF_RANGES );
474 /* rangeUpperBound = whalCtrl_convertRSSIToRxLevel( pMeasurementSRV->hHalCtrl, -87); */
491 WLAN_REPORT_INFORMATION(pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG,
499 status = (TI_STATUS)whalCtrl_NoiseHistogramCmd( pMeasurementSRV->hHalCtrl, &pNoiseHistParams );
504 WLAN_REPORT_INFORMATION( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG,
509 os_timerStart( pMeasurementSRV->hOS, pMeasurementSRV->hRequestTimer[ requestIndex ],
510 pMeasurementSRV->msrRequest.msrTypes[ requestIndex ].duration, FALSE );
511 pMeasurementSRV->bRequestTimerRunning[ requestIndex ] = TRUE;
515 WLAN_REPORT_ERROR( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG,
522 pApDiscoveryParams.scanDuration = pMeasurementSRV->msrRequest.msrTypes[ requestIndex ].duration * 1000; /* TODO change this to an infinite value (was 0) */
527 pApDiscoveryParams.txPowerDbm = pMeasurementSRV->msrRequest.txPowerDbm;
532 if ( RADIO_BAND_5_0_GHZ == pMeasurementSRV->msrRequest.band )
537 if ( MSR_SCAN_MODE_PASSIVE == pMeasurementSRV->msrRequest.msrTypes[ requestIndex ].scanMode )
543 status = (TI_STATUS)whalCtrl_ApDiscoveryCmd( pMeasurementSRV->hHalCtrl, &pApDiscoveryParams );
547 WLAN_REPORT_INFORMATION( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG,
558 os_timerStart( pMeasurementSRV->hOS, pMeasurementSRV->hRequestTimer[ requestIndex ],
559 pMeasurementSRV->msrRequest.msrTypes[ requestIndex ].duration, FALSE);
560 pMeasurementSRV->bRequestTimerRunning[ requestIndex ] = TRUE;
564 WLAN_REPORT_ERROR( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG,
572 WLAN_REPORT_ERROR( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG,
574 __FUNCTION__, pMeasurementSRV->msrRequest.msrTypes[ requestIndex ].msrType) );
584 measurementSRVSM_SMEvent( hMeasurementSRV, &(pMeasurementSRV->SMState),
602 measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
607 if ( TRUE == pMeasurementSRV->bStartStopTimerRunning )
609 WLAN_REPORT_INFORMATION( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG, ("***** STOP TIMER 6 *****\n") );
610 os_timerStop( pMeasurementSRV->hOS, pMeasurementSRV->hStartStopTimer );
611 pMeasurementSRV->bStartStopTimerRunning = FALSE;
615 status = (TI_STATUS)whalCtrl_measurementStop( pMeasurementSRV->hHalCtrl,
616 (void *) pMeasurementSRV->commandResponseCBFunc,
617 pMeasurementSRV->commandResponseCBObj );
619 pMeasurementSRV->commandResponseCBFunc = NULL;
620 pMeasurementSRV->commandResponseCBObj = NULL;
624 WLAN_REPORT_ERROR( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG,
629 measurementSRVSM_SMEvent( hMeasurementSRV, &(pMeasurementSRV->SMState), MSR_SRV_EVENT_STOP_COMPLETE );
633 WLAN_REPORT_INFORMATION( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG,
637 pMeasurementSRV->bStartStopTimerRunning = TRUE;
638 os_timerStart( pMeasurementSRV->hOS, pMeasurementSRV->hStartStopTimer, MSR_FW_GUARD_TIME, FALSE );
654 measurementSRV_t *pMeasurementSRV = (measurementSRV_t *)hMeasurementSRV;
657 powerSrv_ReleasePS( pMeasurementSRV->hPowerSaveSRV, pMeasurementSRV->bSendNullDataWhenExitPs, NULL, NULL );
660 if ( NULL != pMeasurementSRV->commandResponseCBFunc )
662 pMeasurementSRV->commandResponseCBFunc( pMeasurementSRV->commandResponseCBObj, OK );
666 if ( NULL != pMeasurementSRV->measurmentCompleteCBFunc )
668 pMeasurementSRV->measurmentCompleteCBFunc( pMeasurementSRV->measurementCompleteCBObj,
669 &(pMeasurementSRV->msrReply) );
686 measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
689 powerSrv_ReleasePS( pMeasurementSRV->hPowerSaveSRV, pMeasurementSRV->bSendNullDataWhenExitPs, NULL, NULL );
692 if ( FALSE == pMeasurementSRV->bInRequest )
694 WLAN_REPORT_ERROR( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG,
699 if ( NULL != pMeasurementSRV->commandResponseCBFunc )
701 WLAN_REPORT_ERROR( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG,
703 pMeasurementSRV->commandResponseCBFunc( pMeasurementSRV->commandResponseCBObj, OK );
705 pMeasurementSRV->commandResponseCBFunc = NULL;
706 pMeasurementSRV->commandResponseCBObj = NULL;
709 if ( NULL != pMeasurementSRV->measurmentCompleteCBFunc )
715 pMeasurementSRV->msrReply.msrTypes[ i ].status = NOK;
718 pMeasurementSRV->measurmentCompleteCBFunc( pMeasurementSRV->measurementCompleteCBObj,
719 &(pMeasurementSRV->msrReply) );
723 WLAN_REPORT_ERROR( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG,
735 if ( NULL != pMeasurementSRV->commandResponseCBFunc )
739 WLAN_REPORT_ERROR( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG,
742 whalCtrl_measurementStop( pMeasurementSRV->hHalCtrl, (void *)pMeasurementSRV->commandResponseCBFunc,
743 pMeasurementSRV->commandResponseCBObj );
745 pMeasurementSRV->commandResponseCBFunc = NULL;
746 pMeasurementSRV->commandResponseCBObj = NULL;
748 if ( NULL != pMeasurementSRV->measurmentCompleteCBFunc )
755 pMeasurementSRV->msrReply.msrTypes[ i ].status = NOK;
758 pMeasurementSRV->measurmentCompleteCBFunc( pMeasurementSRV->measurementCompleteCBObj,
759 &(pMeasurementSRV->msrReply) );
778 measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
782 for ( i = 0; i < pMeasurementSRV->msrRequest.numberOfTypes; i++ )
784 pMeasurementSRV->msrReply.msrTypes[ i ].status = NOK;
805 measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
811 for ( i = 0; i < pMeasurementSRV->msrRequest.numberOfTypes; i++ )
813 if ( TRUE == pMeasurementSRV->bRequestTimerRunning[ i ] )
816 os_timerStop( pMeasurementSRV->hOS, pMeasurementSRV->hRequestTimer[ i ] );
817 pMeasurementSRV->bRequestTimerRunning[ i ] = FALSE;
820 switch ( pMeasurementSRV->msrRequest.msrTypes[ i ].msrType )
824 status = (TI_STATUS)whalCtrl_ApDiscoveryStop( pMeasurementSRV->hHalCtrl );
827 WLAN_REPORT_ERROR( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG,
836 os_memoryZero( pMeasurementSRV->hOS, &(pNoiseHistParams.ranges[ 0 ]), MEASUREMENT_NOISE_HISTOGRAM_NUM_OF_RANGES );
839 status = (TI_STATUS)whalCtrl_NoiseHistogramCmd( pMeasurementSRV->hHalCtrl, &pNoiseHistParams );
843 WLAN_REPORT_ERROR( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG,
854 WLAN_REPORT_ERROR( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG,
857 pMeasurementSRV->msrRequest.msrTypes[ i ].msrType) );
862 pMeasurementSRV->msrReply.msrTypes[ i ].status = NOK;
867 status = (TI_STATUS)whalCtrl_measurementStop( pMeasurementSRV->hHalCtrl,
868 (void *)pMeasurementSRV->commandResponseCBFunc,
869 pMeasurementSRV->commandResponseCBObj );
871 pMeasurementSRV->commandResponseCBFunc = NULL;
872 pMeasurementSRV->commandResponseCBObj = NULL;
876 WLAN_REPORT_ERROR( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG,
881 measurementSRVSM_SMEvent( hMeasurementSRV, &(pMeasurementSRV->SMState),
886 WLAN_REPORT_INFORMATION( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG,
890 pMeasurementSRV->bStartStopTimerRunning = TRUE;
891 os_timerStart( pMeasurementSRV->hOS, pMeasurementSRV->hStartStopTimer, MSR_FW_GUARD_TIME, FALSE );
907 measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
919 if ( FALSE == pMeasurementSRV->bInRequest )
922 if ( NULL != pMeasurementSRV->commandResponseCBFunc )
924 pMeasurementSRV->commandResponseCBFunc( pMeasurementSRV->commandResponseCBObj, NOK );
928 if ( NULL != pMeasurementSRV->measurmentCompleteCBFunc )
934 pMeasurementSRV->msrReply.msrTypes[ i ].status = NOK;
937 pMeasurementSRV->measurmentCompleteCBFunc( pMeasurementSRV->measurementCompleteCBObj,
938 &(pMeasurementSRV->msrReply) );
942 WLAN_REPORT_ERROR( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG,
962 measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
971 powerSrv_ReleasePS( pMeasurementSRV->hPowerSaveSRV, pMeasurementSRV->bSendNullDataWhenExitPs, NULL, NULL );
975 if ( FALSE == pMeasurementSRV->bInRequest )
978 if ( NULL != pMeasurementSRV->commandResponseCBFunc )
980 pMeasurementSRV->commandResponseCBFunc( pMeasurementSRV->commandResponseCBObj, NOK );
984 if ( NULL != pMeasurementSRV->measurmentCompleteCBFunc )
990 pMeasurementSRV->msrReply.msrTypes[ i ].status = NOK;
993 pMeasurementSRV->measurmentCompleteCBFunc( pMeasurementSRV->measurementCompleteCBObj,
994 &(pMeasurementSRV->msrReply) );
998 WLAN_REPORT_ERROR( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG,
1011 measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
1014 WLAN_REPORT_INFORMATION( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG,
1020 WLAN_REPORT_INFORMATION( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG,
1024 if ( NULL != pMeasurementSRV->commandResponseCBFunc )
1026 pMeasurementSRV->commandResponseCBFunc( pMeasurementSRV->commandResponseCBObj, OK );
1033 WLAN_REPORT_INFORMATION( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG,
1038 WLAN_REPORT_INFORMATION( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG,
1044 if ( TRUE == pMeasurementSRV->bStartStopTimerRunning )
1046 WLAN_REPORT_INFORMATION( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG, ("***** STOP TIMER 8 *****\n") );
1047 os_timerStop( pMeasurementSRV->hOS, pMeasurementSRV->hStartStopTimer );
1048 pMeasurementSRV->bStartStopTimerRunning = FALSE;
1052 pMeasurementSRV->bRequestTimerRunning[ i ] )
1054 os_timerStop( pMeasurementSRV->hOS, pMeasurementSRV->hRequestTimer[ i ] );
1055 pMeasurementSRV->bRequestTimerRunning[ i ] = FALSE;
1059 measurementSRVSM_SMEvent( hMeasurementSRV, &(pMeasurementSRV->SMState),
1076 measurementSRV_t *pMeasurementSRV = (measurementSRV_t*)hMeasurementSrv;
1078 WLAN_REPORT_WARNING( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG,
1082 whalCtrl_measurementStop( pMeasurementSRV->hHalCtrl, (void *)pMeasurementSRV->commandResponseCBFunc,
1083 pMeasurementSRV->commandResponseCBObj );
1085 pMeasurementSRV->commandResponseCBFunc = NULL;
1086 pMeasurementSRV->commandResponseCBObj = NULL;
1102 measurementSRV_t *pMeasurementSRV = (measurementSRV_t*)hMeasurementSrv;
1105 WLAN_REPORT_SM( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG,
1108 if ( TRUE == pMeasurementSRV->bStartStopTimerRunning )
1110 WLAN_REPORT_INFORMATION( pMeasurementSRV->hReport, MEASUREMENT_SRV_MODULE_LOG, ("***** STOP TIMER 7 *****\n") );
1111 os_timerStop( pMeasurementSRV->hOS, pMeasurementSRV->hStartStopTimer );
1112 pMeasurementSRV->bStartStopTimerRunning = FALSE;
1117 if ( TRUE == pMeasurementSRV->bRequestTimerRunning[ i ] )
1119 os_timerStop( pMeasurementSRV->hOS, pMeasurementSRV->hRequestTimer[ i ] );
1120 pMeasurementSRV->bRequestTimerRunning[ i ] = FALSE;
1126 pMeasurementSRV->commandResponseCBFunc = NULL;
1127 pMeasurementSRV->commandResponseCBObj = NULL;
1130 pMeasurementSRV->returnStatus = NOK;