software/drivers/sd8887/src/wlan/mlan/mlan_meas.c
/**
 *  @brief Retrieve a measurement report from the firmware
 *
 *  Callback from command processing when a measurement report is received
 *    from the firmware.  Perform the following when a report is received:
 *
 *   -# Debug displays the report if compiled with the appropriate flags
 *   -# If we are pending on a specific measurement report token, and it
 *      matches the received report's token, store the report and wake up
 *      any pending threads
 *
 *  @param pmpriv Private driver information structure
 *  @param resp HostCmd_DS_COMMAND struct returned from the firmware command
 *              passing a HostCmd_DS_MEASUREMENT_REPORT structure.
 *
 *  @return     MLAN_STATUS_SUCCESS
 */
@brief Retrieve a measurement report from the firmware
Callback from command processing when a measurement report is received
from the firmware.  Perform the following when a report is received.

-# Debug displays the report if compiled with the appropriate flags
-# If we are pending on a specific measurement report token, and it
matches the received report's token, store the report and wake up
any pending threads

@param pmpriv Private driver information structure
@param resp HostCmd_DS_COMMAND struct returned from the firmware command
passing a HostCmd_DS_MEASUREMENT_REPORT structure.


@brief Retrieve a measurement report from the firmware Callback from command processing when a measurement report is received from the firmware . Perform the following when a report is received . - # Debug displays the report if compiled with the appropriate flags - # If we are pending on a specific measurement report token and it matches the received report ' s token store the report and wake up any pending threads @param pmpriv Private driver information structure @param resp HostCmd_DS_COMMAND struct returned from the firmware command passing a HostCmd_DS_MEASUREMENT_REPORT structure .
static int
wlan_meas_cmdresp_get_report(mlan_private *pmpriv,
			     const HostCmd_DS_COMMAND *resp)
{
	mlan_adapter *pmadapter = pmpriv->adapter;
	const HostCmd_DS_MEASUREMENT_REPORT *pmeas_rpt = &resp->params.meas_rpt;
	ENTER();
	PRINTM(MINFO, "Meas: Rpt: %#x-%u, Seq=%u, Ret=%u\n",
	       resp->command, resp->size, resp->seq_num, resp->result);
	wlan_meas_dump_meas_rpt(pmeas_rpt);
	if (pmadapter->state_meas.meas_rpt_pend_on
	    && pmadapter->state_meas.meas_rpt_pend_on ==
	    pmeas_rpt->dialog_token) {
		PRINTM(MINFO, "Meas: Rpt: RCV'd Pend on meas #%d\n",
		       pmadapter->state_meas.meas_rpt_pend_on);
		pmadapter->state_meas.meas_rpt_pend_on = 0;
		memcpy(pmadapter, &pmadapter->state_meas.meas_rpt_returned,
		       pmeas_rpt,
		       sizeof(pmadapter->state_meas.meas_rpt_returned));
		wlan_recv_event(pmpriv, MLAN_EVENT_ID_DRV_MEAS_REPORT, MNULL);
	}
	LEAVE();
	return MLAN_STATUS_SUCCESS;
}
static int wlan_meas_cmdresp_get_report ( mlan_private * pmpriv , const HostCmd_DS_COMMAND * resp ) { mlan_adapter * pmadapter = pmpriv -> adapter ; const HostCmd_DS_MEASUREMENT_REPORT * pmeas_rpt = & resp -> params . meas_rpt ; ENTER ( ) ; PRINTM ( MINFO , " \n " , resp -> command , resp -> size , resp -> seq_num , resp -> result ) ; wlan_meas_dump_meas_rpt ( pmeas_rpt ) ; if ( pmadapter -> state_meas . meas_rpt_pend_on && pmadapter -> state_meas . meas_rpt_pend_on == pmeas_rpt -> dialog_token ) { PRINTM ( MINFO , " \n " , pmadapter -> state_meas . meas_rpt_pend_on ) ; pmadapter -> state_meas . meas_rpt_pend_on = 0 ; memcpy ( pmadapter , & pmadapter -> state_meas . meas_rpt_returned , pmeas_rpt , sizeof ( pmadapter -> state_meas . meas_rpt_returned ) ) ; wlan_recv_event ( pmpriv , MLAN_EVENT_ID_DRV_MEAS_REPORT , MNULL ) ; } LEAVE ( ) ; return MLAN_STATUS_SUCCESS ; }
@brief Retrieve a measurement report from the firmware
  Callback from command processing when a measurement report is received
    from the firmware.
@brief Retrieve a measurement report from the firmware Callback from command processing when a measurement report is received from the firmware .
/* Debug displays the measurement report */ /*
	 * Check if we are pending on a measurement report and it matches
	 *  the dialog token of the received report:
	 */ /* Clear the pending report indicator */ /* Copy the received report into the measurement state for retrieval */ /*
		 * Wake up any threads pending on the wait queue
		 */