bxe: correctly use the maddr in the netif. It's a linked list. We need to clean this up to use the Akaros ones. Signed-off-by: Ron Minnich <rminnich@gmail.com>
diff --git a/kern/drivers/net/bxe/bxe.c b/kern/drivers/net/bxe/bxe.c index 3cf5b40..57b3e63 100644 --- a/kern/drivers/net/bxe/bxe.c +++ b/kern/drivers/net/bxe/bxe.c
@@ -12469,7 +12469,7 @@ int mc_count = 0; int i; struct ecore_mcast_list_elem *mc_mac; - unsigned char *mta; + struct netaddr *m = ifp->maddr; mc_count = ifp->nmaddr; /* should we enforce one? */ @@ -12480,8 +12480,6 @@ return (0); } - mta = ifp->maddr; - mc_mac = kzmalloc(sizeof(*mc_mac) * mc_count, KMALLOC_WAIT); if (!mc_mac) { BLOGE(sc, "Failed to allocate temp mcast list\n"); @@ -12489,7 +12487,7 @@ } for(i=0; i< mc_count; i++) { - bcopy((mta + (i * ETH_ADDR_LEN)), mc_mac->mac, ETH_ADDR_LEN); + bcopy(m->addr, mc_mac->mac, ETH_ADDR_LEN); ECORE_LIST_PUSH_TAIL(&mc_mac->link, &p->mcast_list); BLOGD(sc, DBG_LOAD, @@ -12498,6 +12496,7 @@ mc_mac->mac[3], mc_mac->mac[4], mc_mac->mac[5]); mc_mac++; + m = m->next; } p->mcast_list_len = mc_count;
diff --git a/kern/include/ip.h b/kern/include/ip.h index 1033e7f..d090fb1 100644 --- a/kern/include/ip.h +++ b/kern/include/ip.h
@@ -918,6 +918,7 @@ /* * a network address */ +// TODO: make this one of the LIST types! struct netaddr { struct netaddr *next; /* allocation chain */ struct netaddr *hnext;