/* ========================================================================== Description: This routine init the entire IGMP table. ========================================================================== */ VOID MulticastFilterTableInit( IN PMULTICAST_FILTER_TABLE *ppMulticastFilterTable) { // Initialize MAC table and allocate spin lock *ppMulticastFilterTable = kmalloc(sizeof(MULTICAST_FILTER_TABLE), MEM_ALLOC_FLAG); if (*ppMulticastFilterTable == NULL) { DBGPRINT(RT_DEBUG_ERROR, ("%s unable to alloc memory for Multicase filter table, size=%d\n", __FUNCTION__, sizeof(MULTICAST_FILTER_TABLE))); return; } NdisZeroMemory(*ppMulticastFilterTable, sizeof(MULTICAST_FILTER_TABLE)); NdisAllocateSpinLock(&((*ppMulticastFilterTable)->MulticastFilterTabLock)); NdisAllocateSpinLock(&((*ppMulticastFilterTable)->FreeMemberPoolTabLock)); initList(&((*ppMulticastFilterTable)->freeEntryList)); initFreeEntryList(*ppMulticastFilterTable, &((*ppMulticastFilterTable)->freeEntryList)); return; }
/* ========================================================================== Description: This routine init the entire IGMP table. ========================================================================== */ VOID MulticastFilterTableInit( IN PRTMP_ADAPTER pAd, IN PMULTICAST_FILTER_TABLE *ppMulticastFilterTable) { /* Initialize MAC table and allocate spin lock */ os_alloc_mem(NULL, (UCHAR **)ppMulticastFilterTable, sizeof(MULTICAST_FILTER_TABLE)); if (*ppMulticastFilterTable == NULL) { DBGPRINT(RT_DEBUG_ERROR, ("%s unable to alloc memory for Multicase filter table, size=%d\n", __FUNCTION__, sizeof(MULTICAST_FILTER_TABLE))); return; } NdisZeroMemory(*ppMulticastFilterTable, sizeof(MULTICAST_FILTER_TABLE)); NdisAllocateSpinLock(pAd, &((*ppMulticastFilterTable)->MulticastFilterTabLock)); NdisAllocateSpinLock(pAd, &((*ppMulticastFilterTable)->FreeMemberPoolTabLock)); initList(&((*ppMulticastFilterTable)->freeEntryList)); initFreeEntryList(*ppMulticastFilterTable, &((*ppMulticastFilterTable)->freeEntryList)); return; }