mirror of
https://github.com/opnsense/src.git
synced 2026-06-13 18:50:31 -04:00
e1000: Fix setting the promiscuous mode
The variable reg_rctl stores the value read from reg E1000_RCTL. It may contain bits E1000_RCTL_VFE and E1000_RCTL_CFIEN which control VLAN hardware filter feature. The promiscuous mode implies all tagged or untagged packets should be accepted, so the VLAN hardware filter feature should be disabled when enabling the promiscuous mode. Calling em_if_vlan_filter_disable() did the task, but later writing the value of reg_rctl back to the reg E1000_RCTL may restore the feature. Move the calling of em_if_vlan_filter_disable() after writing the reg to fix that. PR: 292759 Reviewed by: kbowling Tested by: vova@zote.me Fixes:2796f7cab1e1000: Fix up HW vlan ops MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D54973 (cherry picked from commit e63ee5fedb8dab51f1bd6d24cc650b68d9663db5) (cherry picked from commit8880678b7a)
This commit is contained in:
parent
8c02f3f9ae
commit
b7143cdd85
1 changed files with 1 additions and 1 deletions
|
|
@ -2099,11 +2099,11 @@ em_if_set_promisc(if_ctx_t ctx, int flags)
|
|||
|
||||
if (flags & IFF_PROMISC) {
|
||||
reg_rctl |= (E1000_RCTL_UPE | E1000_RCTL_MPE);
|
||||
em_if_vlan_filter_disable(sc);
|
||||
/* Turn this on if you want to see bad packets */
|
||||
if (em_debug_sbp)
|
||||
reg_rctl |= E1000_RCTL_SBP;
|
||||
E1000_WRITE_REG(&sc->hw, E1000_RCTL, reg_rctl);
|
||||
em_if_vlan_filter_disable(sc);
|
||||
} else {
|
||||
if (flags & IFF_ALLMULTI) {
|
||||
reg_rctl |= E1000_RCTL_MPE;
|
||||
|
|
|
|||
Loading…
Reference in a new issue