software/drivers/sd8887/src/wlan/mlinux/moal_cfg80211.c
/**
 *  @brief Set coalesce parameter
 *
 *  @param priv             A pointer to moal_private structure
 *  @param action           MLAN_ACT_SET or MLAN_ACT_GET
 *  @param coalesce_cfg     A pointer to coalesce structure
 *
 *  @return                 MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
 */
@brief Set coalesce parameter
@param priv             A pointer to moal_private structure
@param action           MLAN_ACT_SET or MLAN_ACT_GET
@param coalesce_cfg     A pointer to coalesce structure


@brief Set coalesce parameter @param priv A pointer to moal_private structure @param action MLAN_ACT_SET or MLAN_ACT_GET @param coalesce_cfg A pointer to coalesce structure
mlan_status
woal_set_coalesce(moal_private *priv, t_u16 action,
		  mlan_ds_coalesce_cfg * coalesce_cfg)
{
	mlan_status ret = MLAN_STATUS_SUCCESS;
	mlan_ds_misc_cfg *misc_cfg = NULL;
	mlan_ioctl_req *req = NULL;
	ENTER();
	req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg));
	if (req == NULL) {
		ret = MLAN_STATUS_FAILURE;
		goto done;
	}
	misc_cfg = (mlan_ds_misc_cfg *)req->pbuf;
	misc_cfg->sub_command = MLAN_OID_MISC_COALESCE_CFG;
	req->req_id = MLAN_IOCTL_MISC_CFG;
	req->action = action;
	memcpy(&misc_cfg->param.coalesce_cfg, coalesce_cfg,
	       sizeof(mlan_ds_coalesce_cfg));
	ret = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT);
	if (ret != MLAN_STATUS_SUCCESS)
		goto done;
done:
	if (ret != MLAN_STATUS_PENDING)
		kfree(req);
	LEAVE();
	return ret;
}
mlan_status woal_set_coalesce ( moal_private * priv , t_u16 action , mlan_ds_coalesce_cfg * coalesce_cfg ) { mlan_status ret = MLAN_STATUS_SUCCESS ; mlan_ds_misc_cfg * misc_cfg = NULL ; mlan_ioctl_req * req = NULL ; ENTER ( ) ; req = woal_alloc_mlan_ioctl_req ( sizeof ( mlan_ds_misc_cfg ) ) ; if ( req == NULL ) { ret = MLAN_STATUS_FAILURE ; goto done ; } misc_cfg = ( mlan_ds_misc_cfg * ) req -> pbuf ; misc_cfg -> sub_command = MLAN_OID_MISC_COALESCE_CFG ; req -> req_id = MLAN_IOCTL_MISC_CFG ; req -> action = action ; memcpy ( & misc_cfg -> param . coalesce_cfg , coalesce_cfg , sizeof ( mlan_ds_coalesce_cfg ) ) ; ret = woal_request_ioctl ( priv , req , MOAL_IOCTL_WAIT ) ; if ( ret != MLAN_STATUS_SUCCESS ) goto done ; done : if ( ret != MLAN_STATUS_PENDING ) kfree ( req ) ; LEAVE ( ) ; return ret ; }
@brief Set coalesce parameter
  @param priv             A pointer to moal_private structure
  @param action           MLAN_ACT_SET or MLAN_ACT_GET
  @param coalesce_cfg     A pointer to coalesce structure
@brief Set coalesce parameter @param priv A pointer to moal_private structure @param action MLAN_ACT_SET or MLAN_ACT_GET @param coalesce_cfg A pointer to coalesce structure