software/drivers/sd8887/src/wlan/mlinux/moal_ioctl.c
/**
 *  @brief Send multicast list request to MLAN
 *
 *  @param priv   A pointer to moal_private structure
 *  @param dev    A pointer to net_device structure
 *
 *  @return       N/A
 */
@brief Send multicast list request to MLAN
@param priv   A pointer to moal_private structure
@param dev    A pointer to net_device structure

@return       N/A
@brief Send multicast list request to MLAN @param priv A pointer to moal_private structure @param dev A pointer to net_device structure @return N / A
void
woal_request_set_multicast_list(moal_private *priv, struct net_device *dev)
{
	mlan_ioctl_req *req = NULL;
	mlan_ds_bss *bss = NULL;
	mlan_status status;
	int mc_count = 0;
	ENTER();
	req = (mlan_ioctl_req *)woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_bss));
	if (req == NULL) {
		PRINTM(MERROR, "%s:Fail to allocate ioctl req buffer\n",
		       __func__);
		goto done;
	}
	bss = (mlan_ds_bss *)req->pbuf;
	bss->sub_command = MLAN_OID_BSS_MULTICAST_LIST;
	req->req_id = MLAN_IOCTL_BSS;
	req->action = MLAN_ACT_SET;
	if (dev->flags & IFF_PROMISC) {
		bss->param.multicast_list.mode = MLAN_PROMISC_MODE;
	} else if (dev->flags & IFF_ALLMULTI) {
		bss->param.multicast_list.mode = MLAN_ALL_MULTI_MODE;
	} else {
		bss->param.multicast_list.mode = MLAN_MULTICAST_MODE;
		mc_count =
			woal_copy_all_mc_list(priv->phandle,
					      &bss->param.multicast_list);
		if (mc_count > MLAN_MAX_MULTICAST_LIST_SIZE)
			bss->param.multicast_list.mode = MLAN_ALL_MULTI_MODE;
	}
	status = woal_request_ioctl(priv, req, MOAL_NO_WAIT);
	if (status != MLAN_STATUS_PENDING)
		kfree(req);
done:
	LEAVE();
	return;
}
void woal_request_set_multicast_list ( moal_private * priv , struct net_device * dev ) { mlan_ioctl_req * req = NULL ; mlan_ds_bss * bss = NULL ; mlan_status status ; int mc_count = 0 ; ENTER ( ) ; req = ( mlan_ioctl_req * ) woal_alloc_mlan_ioctl_req ( sizeof ( mlan_ds_bss ) ) ; if ( req == NULL ) { PRINTM ( MERROR , " \n " , __func__ ) ; goto done ; } bss = ( mlan_ds_bss * ) req -> pbuf ; bss -> sub_command = MLAN_OID_BSS_MULTICAST_LIST ; req -> req_id = MLAN_IOCTL_BSS ; req -> action = MLAN_ACT_SET ; if ( dev -> flags & IFF_PROMISC ) { bss -> param . multicast_list . mode = MLAN_PROMISC_MODE ; } else if ( dev -> flags & IFF_ALLMULTI ) { bss -> param . multicast_list . mode = MLAN_ALL_MULTI_MODE ; } else { bss -> param . multicast_list . mode = MLAN_MULTICAST_MODE ; mc_count = woal_copy_all_mc_list ( priv -> phandle , & bss -> param . multicast_list ) ; if ( mc_count > MLAN_MAX_MULTICAST_LIST_SIZE ) bss -> param . multicast_list . mode = MLAN_ALL_MULTI_MODE ; } status = woal_request_ioctl ( priv , req , MOAL_NO_WAIT ) ; if ( status != MLAN_STATUS_PENDING ) kfree ( req ) ; done : LEAVE ( ) ; return ; }
@brief Send multicast list request to MLAN
  @param priv   A pointer to moal_private structure
  @param dev    A pointer to net_device structure
@brief Send multicast list request to MLAN @param priv A pointer to moal_private structure @param dev A pointer to net_device structure
/* Allocate an IOCTL request buffer */ /* Fill request buffer */ /* Send IOCTL request to MLAN */