software/drivers/sd8887/src/wlan/mlinux/moal_ioctl.c
/**
 *  @brief Get debug info
 *
 *  @param priv                 A pointer to moal_private structure
 *  @param wait_option          Wait option
 *  @param debug_info           A pointer to mlan_debug_info structure
 *
 *  @return                     MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail
 */
@brief Get debug info
@param priv                 A pointer to moal_private structure
@param wait_option          Wait option
@param debug_info           A pointer to mlan_debug_info structure


@brief Get debug info @param priv A pointer to moal_private structure @param wait_option Wait option @param debug_info A pointer to mlan_debug_info structure
mlan_status
woal_get_debug_info(moal_private *priv, t_u8 wait_option,
		    mlan_debug_info *debug_info)
{
	int ret = 0;
	mlan_ioctl_req *req = NULL;
	mlan_ds_get_info *info = NULL;
	mlan_status status = MLAN_STATUS_SUCCESS;
	ENTER();
	req = woal_alloc_mlan_ioctl_req(sizeof(t_u32) +
					sizeof(mlan_debug_info));
	if (req == NULL) {
		ret = -ENOMEM;
		goto done;
	}
	info = (mlan_ds_get_info *)req->pbuf;
	info->sub_command = MLAN_OID_GET_DEBUG_INFO;
	req->req_id = MLAN_IOCTL_GET_INFO;
	req->action = MLAN_ACT_GET;
	status = woal_request_ioctl(priv, req, wait_option);
	if (status == MLAN_STATUS_SUCCESS) {
		if (debug_info) {
			memcpy(debug_info, &info->param.debug_info,
			       sizeof(mlan_debug_info));
		}
	}
done:
	if (status != MLAN_STATUS_PENDING)
		kfree(req);
	LEAVE();
	return status;
}
mlan_status woal_get_debug_info ( moal_private * priv , t_u8 wait_option , mlan_debug_info * debug_info ) { int ret = 0 ; mlan_ioctl_req * req = NULL ; mlan_ds_get_info * info = NULL ; mlan_status status = MLAN_STATUS_SUCCESS ; ENTER ( ) ; req = woal_alloc_mlan_ioctl_req ( sizeof ( t_u32 ) + sizeof ( mlan_debug_info ) ) ; if ( req == NULL ) { ret = - ENOMEM ; goto done ; } info = ( mlan_ds_get_info * ) req -> pbuf ; info -> sub_command = MLAN_OID_GET_DEBUG_INFO ; req -> req_id = MLAN_IOCTL_GET_INFO ; req -> action = MLAN_ACT_GET ; status = woal_request_ioctl ( priv , req , wait_option ) ; if ( status == MLAN_STATUS_SUCCESS ) { if ( debug_info ) { memcpy ( debug_info , & info -> param . debug_info , sizeof ( mlan_debug_info ) ) ; } } done : if ( status != MLAN_STATUS_PENDING ) kfree ( req ) ; LEAVE ( ) ; return status ; }
@brief Get debug info
  @param priv                 A pointer to moal_private structure
  @param wait_option          Wait option
  @param debug_info           A pointer to mlan_debug_info structure
@brief Get debug info @param priv A pointer to moal_private structure @param wait_option Wait option @param debug_info A pointer to mlan_debug_info structure
/* Allocate an IOCTL request buffer */ /* Fill request buffer */ /* Send IOCTL request to MLAN */