software/drivers/sd8887/src/wlan/mlinux/moal_ioctl.c
/**
 *  @brief Send delelte all BA command to MLAN
 *
 *  @param priv          A pointer to moal_private structure
 *  @param wait_option          Wait option
 *
 *  @return              MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING -- success, otherwise fail
 */
@brief Send delelte all BA command to MLAN
@param priv          A pointer to moal_private structure
@param wait_option          Wait option


@brief Send delelte all BA command to MLAN @param priv A pointer to moal_private structure @param wait_option Wait option
mlan_status
woal_delba_all(moal_private *priv, t_u8 wait_option)
{
	mlan_ioctl_req *req = NULL;
	mlan_ds_11n_cfg *cfg_11n = NULL;
	mlan_ds_11n_delba *del_ba = NULL;
	t_u8 zero_mac[MLAN_MAC_ADDR_LENGTH] = { 0 };
	mlan_status status = MLAN_STATUS_SUCCESS;
	int ret = 0;
	req = (mlan_ioctl_req *)
		woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_11n_cfg));
	if (req == NULL) {
		ret = -ENOMEM;
		goto done;
	}
	cfg_11n = (mlan_ds_11n_cfg *)req->pbuf;
	req->req_id = MLAN_IOCTL_11N_CFG;
	cfg_11n->sub_command = MLAN_OID_11N_CFG_DELBA;
	del_ba = &cfg_11n->param.del_ba;
	memset(del_ba, 0, sizeof(mlan_ds_11n_delba));
	del_ba->direction = DELBA_RX | DELBA_TX;
	del_ba->tid = DELBA_ALL_TIDS;
	memcpy(del_ba->peer_mac_addr, zero_mac, ETH_ALEN);
	status = woal_request_ioctl(priv, req, wait_option);
	if (status != MLAN_STATUS_SUCCESS) {
		ret = -EFAULT;
		goto done;
	}
done:
	if (status != MLAN_STATUS_PENDING)
		kfree(req);
	LEAVE();
	return ret;
}
mlan_status woal_delba_all ( moal_private * priv , t_u8 wait_option ) { mlan_ioctl_req * req = NULL ; mlan_ds_11n_cfg * cfg_11n = NULL ; mlan_ds_11n_delba * del_ba = NULL ; t_u8 zero_mac [ MLAN_MAC_ADDR_LENGTH ] = { 0 } ; mlan_status status = MLAN_STATUS_SUCCESS ; int ret = 0 ; req = ( mlan_ioctl_req * ) woal_alloc_mlan_ioctl_req ( sizeof ( mlan_ds_11n_cfg ) ) ; if ( req == NULL ) { ret = - ENOMEM ; goto done ; } cfg_11n = ( mlan_ds_11n_cfg * ) req -> pbuf ; req -> req_id = MLAN_IOCTL_11N_CFG ; cfg_11n -> sub_command = MLAN_OID_11N_CFG_DELBA ; del_ba = & cfg_11n -> param . del_ba ; memset ( del_ba , 0 , sizeof ( mlan_ds_11n_delba ) ) ; del_ba -> direction = DELBA_RX | DELBA_TX ; del_ba -> tid = DELBA_ALL_TIDS ; memcpy ( del_ba -> peer_mac_addr , zero_mac , ETH_ALEN ) ; status = woal_request_ioctl ( priv , req , wait_option ) ; if ( status != MLAN_STATUS_SUCCESS ) { ret = - EFAULT ; goto done ; } done : if ( status != MLAN_STATUS_PENDING ) kfree ( req ) ; LEAVE ( ) ; return ret ; }
@brief Send delelte all BA command to MLAN
  @param priv          A pointer to moal_private structure
  @param wait_option          Wait option
@brief Send delelte all BA command to MLAN @param priv A pointer to moal_private structure @param wait_option Wait option