software/drivers/sd8887/src/wlan/mlinux/moal_priv.c
/**
 *  @brief Implement 802.11D clear chan table command
 *
 *  @param priv     Pointer to the moal_private driver data struct
 *  @param wrq      Pointer to the iwreq structure
 *
 *  @return         0 --success, otherwise fail
 */
@brief Implement 802.11D clear chan table command
@param priv     Pointer to the moal_private driver data struct
@param wrq      Pointer to the iwreq structure

@return         0 --success, otherwise fail
@brief Implement 802 . 11D clear chan table command @param priv Pointer to the moal_private driver data struct @param wrq Pointer to the iwreq structure @return 0 -- success otherwise fail
static int
woal_11d_clr_chan_table(moal_private *priv, struct iwreq *wrq)
{
	int ret = 0;
	mlan_ds_11d_cfg *pcfg_11d = NULL;
	mlan_ioctl_req *req = NULL;
	mlan_status status = MLAN_STATUS_SUCCESS;
	ENTER();
	req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11d_cfg));
	if (req == NULL) {
		ret = -ENOMEM;
		goto done;
	}
	pcfg_11d = (mlan_ds_11d_cfg *)req->pbuf;
	req->req_id = MLAN_IOCTL_11D_CFG;
	pcfg_11d->sub_command = MLAN_OID_11D_CLR_CHAN_TABLE;
	req->action = MLAN_ACT_SET;
	status = woal_request_ioctl(priv, req, MOAL_IOCTL_WAIT);
	if (status != MLAN_STATUS_SUCCESS) {
		ret = -EFAULT;
		goto done;
	}
done:
	if (status != MLAN_STATUS_PENDING)
		kfree(req);
	LEAVE();
	return ret;
}
static int woal_11d_clr_chan_table ( moal_private * priv , struct iwreq * wrq ) { int ret = 0 ; mlan_ds_11d_cfg * pcfg_11d = NULL ; mlan_ioctl_req * req = NULL ; mlan_status status = MLAN_STATUS_SUCCESS ; ENTER ( ) ; req = woal_alloc_mlan_ioctl_req ( sizeof ( mlan_ds_11d_cfg ) ) ; if ( req == NULL ) { ret = - ENOMEM ; goto done ; } pcfg_11d = ( mlan_ds_11d_cfg * ) req -> pbuf ; req -> req_id = MLAN_IOCTL_11D_CFG ; pcfg_11d -> sub_command = MLAN_OID_11D_CLR_CHAN_TABLE ; req -> action = MLAN_ACT_SET ; status = woal_request_ioctl ( priv , req , MOAL_IOCTL_WAIT ) ; if ( status != MLAN_STATUS_SUCCESS ) { ret = - EFAULT ; goto done ; } done : if ( status != MLAN_STATUS_PENDING ) kfree ( req ) ; LEAVE ( ) ; return ret ; }
@brief Implement 802.11D clear chan table command
  @param priv     Pointer to the moal_private driver data struct
  @param wrq      Pointer to the iwreq structure
@brief Implement 802 . 11D clear chan table command @param priv Pointer to the moal_private driver data struct @param wrq Pointer to the iwreq structure