aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/e1000
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2019-10-21 18:11:24 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2019-10-21 18:11:24 +0000
commitc42980268b3324356e3478511185f3d0c6500d36 (patch)
treeb701b4d06fa1278d58632777397fccb503343af6 /sys/dev/e1000
parent3e346c0a6c55661808217934a411c9432c073f83 (diff)
Notes
Diffstat (limited to 'sys/dev/e1000')
-rw-r--r--sys/dev/e1000/if_em.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c
index b0efc32e75e0b..b1177fcb82f6e 100644
--- a/sys/dev/e1000/if_em.c
+++ b/sys/dev/e1000/if_em.c
@@ -1655,7 +1655,7 @@ em_disable_promisc(if_ctx_t ctx)
if (if_getflags(ifp) & IFF_ALLMULTI)
mcnt = MAX_NUM_MULTICAST_ADDRESSES;
else
- mcnt = if_multiaddr_count(ifp, MAX_NUM_MULTICAST_ADDRESSES);
+ mcnt = if_llmaddr_count(ifp);
/* Don't disable if in MAX groups */
if (mcnt < MAX_NUM_MULTICAST_ADDRESSES)
reg_rctl &= (~E1000_RCTL_MPE);
@@ -1664,6 +1664,19 @@ em_disable_promisc(if_ctx_t ctx)
}
+static u_int
+em_copy_maddr(void *arg, struct sockaddr_dl *sdl, u_int cnt)
+{
+ u8 *mta = arg;
+
+ if (cnt == MAX_NUM_MULTICAST_ADDRESSES)
+ return (1);
+
+ bcopy(LLADDR(sdl), &mta[cnt * ETH_ADDR_LEN], ETH_ADDR_LEN);
+
+ return (1);
+}
+
/*********************************************************************
* Multicast Update
*
@@ -1695,7 +1708,7 @@ em_if_multi_set(if_ctx_t ctx)
msec_delay(5);
}
- if_multiaddr_array(ifp, mta, &mcnt, MAX_NUM_MULTICAST_ADDRESSES);
+ mcnt = if_foreach_llmaddr(ifp, em_copy_maddr, mta);
if (mcnt >= MAX_NUM_MULTICAST_ADDRESSES) {
reg_rctl = E1000_READ_REG(&adapter->hw, E1000_RCTL);