software/drivers/sd8887/src/wlan/mlan/mlan_meas.c
/**
 *  @brief  Prepare the HostCmd_DS_Command structure for a measurement command.
 *
 *  Use the Command field to determine if the command being set up is for
 *     11h and call one of the local command handlers accordingly for:
 *
 *        - HostCmd_CMD_MEASUREMENT_REQUEST
 *        - HostCmd_CMD_MEASUREMENT_REPORT
 *
 *  @param pmpriv     Private driver information structure
 *  @param pcmd_ptr   Output parameter: Pointer to the command being prepared
 *                    for the firmware
 *  @param pinfo_buf  Void buffer passthrough with data necessary for a
 *                    specific command type
 *
 *  @return         MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
 *
 */
@brief  Prepare the HostCmd_DS_Command structure for a measurement command.
Use the Command field to determine if the command being set up is for
11h and call one of the local command handlers accordingly for.



@param pmpriv     Private driver information structure
@param pcmd_ptr   Output parameter: Pointer to the command being prepared
for the firmware
@param pinfo_buf  Void buffer passthrough with data necessary for a
specific command type


@brief Prepare the HostCmd_DS_Command structure for a measurement command . Use the Command field to determine if the command being set up is for 11h and call one of the local command handlers accordingly for . @param pmpriv Private driver information structure @param pcmd_ptr Output parameter : Pointer to the command being prepared for the firmware @param pinfo_buf Void buffer passthrough with data necessary for a specific command type
int
wlan_meas_cmd_process(mlan_private *pmpriv,
		      HostCmd_DS_COMMAND *pcmd_ptr, const void *pinfo_buf)
{
	int ret = MLAN_STATUS_SUCCESS;
	ENTER();
	switch (pcmd_ptr->command) {
	case HostCmd_CMD_MEASUREMENT_REQUEST:
		ret = wlan_meas_cmd_request(pmpriv, pcmd_ptr, pinfo_buf);
		break;
	case HostCmd_CMD_MEASUREMENT_REPORT:
		ret = wlan_meas_cmd_get_report(pmpriv, pcmd_ptr);
		break;
	default:
		ret = MLAN_STATUS_FAILURE;
	}
	pcmd_ptr->command = wlan_cpu_to_le16(pcmd_ptr->command);
	pcmd_ptr->size = wlan_cpu_to_le16(pcmd_ptr->size);
	LEAVE();
	return ret;
}
int wlan_meas_cmd_process ( mlan_private * pmpriv , HostCmd_DS_COMMAND * pcmd_ptr , const void * pinfo_buf ) { int ret = MLAN_STATUS_SUCCESS ; ENTER ( ) ; switch ( pcmd_ptr -> command ) { case HostCmd_CMD_MEASUREMENT_REQUEST : ret = wlan_meas_cmd_request ( pmpriv , pcmd_ptr , pinfo_buf ) ; break ; case HostCmd_CMD_MEASUREMENT_REPORT : ret = wlan_meas_cmd_get_report ( pmpriv , pcmd_ptr ) ; break ; default : ret = MLAN_STATUS_FAILURE ; } pcmd_ptr -> command = wlan_cpu_to_le16 ( pcmd_ptr -> command ) ; pcmd_ptr -> size = wlan_cpu_to_le16 ( pcmd_ptr -> size ) ; LEAVE ( ) ; return ret ; }
@brief  Prepare the HostCmd_DS_Command structure for a measurement command.
@brief Prepare the HostCmd_DS_Command structure for a measurement command .