software/drivers/sd8887/src/wlan/mlinux/moal_ioctl.c
/**
 *  @brief copy mc list from all the active interface
 *
 *  @param handle  A pointer to moal_handle
 *  @param mlist  A pointer to multicast list
 *
 *  @return       total_mc_count
 */
@brief copy mc list from all the active interface
@param handle  A pointer to moal_handle
@param mlist  A pointer to multicast list


@brief copy mc list from all the active interface @param handle A pointer to moal_handle @param mlist A pointer to multicast list
static int
woal_copy_all_mc_list(moal_handle *handle, mlan_multicast_list *mlist)
{
	int i;
	moal_private *priv = NULL;
#ifdef STA_SUPPORT
	int mc_count = 0;
#endif
	ENTER();
	for (i = 0; i < handle->priv_num && (priv = handle->priv[i]); i++) {
#ifdef STA_SUPPORT
		if (GET_BSS_ROLE(handle->priv[i]) == MLAN_BSS_ROLE_STA) {
			if (handle->priv[i]->media_connected == MTRUE) {
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
				mc_count = priv->netdev->mc_count;
#else
				mc_count = netdev_mc_count(priv->netdev);
#endif
				if (mc_count)
					woal_copy_mcast_addr(mlist,
							     priv->netdev);
			}
		}
#endif
	}
	PRINTM(MIOCTL, "total mc_count=%d\n", mlist->num_multicast_addr);
	LEAVE();
	return mlist->num_multicast_addr;
}
static int woal_copy_all_mc_list ( moal_handle * handle , mlan_multicast_list * mlist ) { int i ; moal_private * priv = NULL ; #ifdef STA_SUPPORT int mc_count = 0 ; #endif ENTER ( ) ; for ( i = 0 ; i < handle -> priv_num && ( priv = handle -> priv [ i ] ) ; i ++ ) { #ifdef STA_SUPPORT if ( GET_BSS_ROLE ( handle -> priv [ i ] ) == MLAN_BSS_ROLE_STA ) { if ( handle -> priv [ i ] -> media_connected == MTRUE ) { #if LINUX_VERSION_CODE < KERNEL_VERSION ( 2 , 6 , 35 ) mc_count = priv -> netdev -> mc_count ; #else mc_count = netdev_mc_count ( priv -> netdev ) ; #endif if ( mc_count ) woal_copy_mcast_addr ( mlist , priv -> netdev ) ; } } #endif } PRINTM ( MIOCTL , " \n " , mlist -> num_multicast_addr ) ; LEAVE ( ) ; return mlist -> num_multicast_addr ; }
@brief copy mc list from all the active interface
  @param handle  A pointer to moal_handle
  @param mlist  A pointer to multicast list
@brief copy mc list from all the active interface @param handle A pointer to moal_handle @param mlist A pointer to multicast list