software/drivers/sd8887/src/wlan/mlan/mlan_meas.c
/**
 *  @brief  Retrieve a measurement report from the firmware
 *
 *  The firmware will send a EVENT_MEAS_REPORT_RDY event when it
 *    completes or receives a measurement report.  The event response
 *    handler will then start a HostCmd_CMD_MEASUREMENT_REPORT firmware command
 *    which gets completed for transmission to the firmware in this routine.
 *
 *  @param pmpriv    Private driver information structure
 *  @param pcmd_ptr  Output parameter: Pointer to the command being prepared
 *                   for the firmware
 *
 *  @return        MLAN_STATUS_SUCCESS
 */
@brief  Retrieve a measurement report from the firmware
The firmware will send a EVENT_MEAS_REPORT_RDY event when it
completes or receives a measurement report.  The event response
handler will then start a HostCmd_CMD_MEASUREMENT_REPORT firmware command
which gets completed for transmission to the firmware in this routine.

@param pmpriv    Private driver information structure
@param pcmd_ptr  Output parameter: Pointer to the command being prepared
for the firmware


@brief Retrieve a measurement report from the firmware The firmware will send a EVENT_MEAS_REPORT_RDY event when it completes or receives a measurement report . The event response handler will then start a HostCmd_CMD_MEASUREMENT_REPORT firmware command which gets completed for transmission to the firmware in this routine . @param pmpriv Private driver information structure @param pcmd_ptr Output parameter : Pointer to the command being prepared for the firmware
static int
wlan_meas_cmd_get_report(mlan_private *pmpriv, HostCmd_DS_COMMAND *pcmd_ptr)
{
	ENTER();
	pcmd_ptr->command = HostCmd_CMD_MEASUREMENT_REPORT;
	pcmd_ptr->size = sizeof(HostCmd_DS_MEASUREMENT_REPORT) + S_DS_GEN;
	memset(pmpriv->adapter, &pcmd_ptr->params.meas_rpt, 0x00,
	       sizeof(pcmd_ptr->params.meas_rpt));
	memcpy(pmpriv->adapter, pcmd_ptr->params.meas_rpt.mac_addr,
	       pmpriv->curr_addr, sizeof(pcmd_ptr->params.meas_rpt.mac_addr));
	LEAVE();
	return MLAN_STATUS_SUCCESS;
}
static int wlan_meas_cmd_get_report ( mlan_private * pmpriv , HostCmd_DS_COMMAND * pcmd_ptr ) { ENTER ( ) ; pcmd_ptr -> command = HostCmd_CMD_MEASUREMENT_REPORT ; pcmd_ptr -> size = sizeof ( HostCmd_DS_MEASUREMENT_REPORT ) + S_DS_GEN ; memset ( pmpriv -> adapter , & pcmd_ptr -> params . meas_rpt , 0x00 , sizeof ( pcmd_ptr -> params . meas_rpt ) ) ; memcpy ( pmpriv -> adapter , pcmd_ptr -> params . meas_rpt . mac_addr , pmpriv -> curr_addr , sizeof ( pcmd_ptr -> params . meas_rpt . mac_addr ) ) ; LEAVE ( ) ; return MLAN_STATUS_SUCCESS ; }
@brief  Retrieve a measurement report from the firmware
  The firmware will send a EVENT_MEAS_REPORT_RDY event when it
    completes or receives a measurement report.
@brief Retrieve a measurement report from the firmware The firmware will send a EVENT_MEAS_REPORT_RDY event when it completes or receives a measurement report .
/*
	 * Set the meas_rpt.mac_addr to our mac address to get a meas report,
	 *   setting the mac to another STA address instructs the firmware
	 *   to transmit this measurement report frame instead
	 */