aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Bowling <kbowling@FreeBSD.org>2022-04-13 16:01:19 +0000
committerKevin Bowling <kbowling@FreeBSD.org>2022-04-27 17:35:12 +0000
commit479ef11e788058f4f4df45626fe9181052266b77 (patch)
treed56dcc3b6261cb0f37aa5aebd05559e376762548
parentc4661f71cb42da91b50e6d0e6158bb6869d887fa (diff)
downloadsrc-479ef11e788058f4f4df45626fe9181052266b77.tar.gz
src-479ef11e788058f4f4df45626fe9181052266b77.zip
e1000: Update mc filter before RCTL flags
Update mc filter array before changing RCTL flags as in 5a3eb6207a35 Approved by: grehan (cherry picked from commit 07ede751612f8879675e2970b3875ea3831e2b9c)
-rw-r--r--sys/dev/e1000/if_em.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c
index cb0c01c9c65d..b3871361d335 100644
--- a/sys/dev/e1000/if_em.c
+++ b/sys/dev/e1000/if_em.c
@@ -1735,6 +1735,9 @@ em_if_multi_set(if_ctx_t ctx)
mcnt = if_foreach_llmaddr(ifp, em_copy_maddr, mta);
+ if (mcnt < MAX_NUM_MULTICAST_ADDRESSES)
+ e1000_update_mc_addr_list(&sc->hw, mta, mcnt);
+
reg_rctl = E1000_READ_REG(&sc->hw, E1000_RCTL);
if (if_getflags(ifp) & IFF_PROMISC)
@@ -1748,9 +1751,6 @@ em_if_multi_set(if_ctx_t ctx)
E1000_WRITE_REG(&sc->hw, E1000_RCTL, reg_rctl);
- if (mcnt < MAX_NUM_MULTICAST_ADDRESSES)
- e1000_update_mc_addr_list(&sc->hw, mta, mcnt);
-
if (sc->hw.mac.type == e1000_82542 &&
sc->hw.revision_id == E1000_REVISION_2) {
reg_rctl = E1000_READ_REG(&sc->hw, E1000_RCTL);