diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2008-08-26 21:30:04 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-08-27 05:14:32 -0400 |
commit | 3d01625a4f30ec9db8e964b7fde1f902f522e992 (patch) | |
tree | e344f6ef2e7c082a87a13c9a31daa7cfd22cad46 /drivers/net/ixgbe | |
parent | 736783b8528bdce7f090dfae66f57411be40c5f8 (diff) |
ixgbe: fix vlan filtering
VLAN filtering is broken, due to reading the incorrect register for
the VLAN filtering settings. Fixed by reading/writing the correct
register.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/ixgbe')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 34bca16d48a6..53f41b649f03 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -1636,16 +1636,17 @@ static void ixgbe_set_multi(struct net_device *netdev) | |||
1636 | struct ixgbe_hw *hw = &adapter->hw; | 1636 | struct ixgbe_hw *hw = &adapter->hw; |
1637 | struct dev_mc_list *mc_ptr; | 1637 | struct dev_mc_list *mc_ptr; |
1638 | u8 *mta_list; | 1638 | u8 *mta_list; |
1639 | u32 fctrl; | 1639 | u32 fctrl, vlnctrl; |
1640 | int i; | 1640 | int i; |
1641 | 1641 | ||
1642 | /* Check for Promiscuous and All Multicast modes */ | 1642 | /* Check for Promiscuous and All Multicast modes */ |
1643 | 1643 | ||
1644 | fctrl = IXGBE_READ_REG(hw, IXGBE_FCTRL); | 1644 | fctrl = IXGBE_READ_REG(hw, IXGBE_FCTRL); |
1645 | vlnctrl = IXGBE_READ_REG(hw, IXGBE_VLNCTRL); | ||
1645 | 1646 | ||
1646 | if (netdev->flags & IFF_PROMISC) { | 1647 | if (netdev->flags & IFF_PROMISC) { |
1647 | fctrl |= (IXGBE_FCTRL_UPE | IXGBE_FCTRL_MPE); | 1648 | fctrl |= (IXGBE_FCTRL_UPE | IXGBE_FCTRL_MPE); |
1648 | fctrl &= ~IXGBE_VLNCTRL_VFE; | 1649 | vlnctrl &= ~IXGBE_VLNCTRL_VFE; |
1649 | } else { | 1650 | } else { |
1650 | if (netdev->flags & IFF_ALLMULTI) { | 1651 | if (netdev->flags & IFF_ALLMULTI) { |
1651 | fctrl |= IXGBE_FCTRL_MPE; | 1652 | fctrl |= IXGBE_FCTRL_MPE; |
@@ -1653,10 +1654,11 @@ static void ixgbe_set_multi(struct net_device *netdev) | |||
1653 | } else { | 1654 | } else { |
1654 | fctrl &= ~(IXGBE_FCTRL_UPE | IXGBE_FCTRL_MPE); | 1655 | fctrl &= ~(IXGBE_FCTRL_UPE | IXGBE_FCTRL_MPE); |
1655 | } | 1656 | } |
1656 | fctrl |= IXGBE_VLNCTRL_VFE; | 1657 | vlnctrl |= IXGBE_VLNCTRL_VFE; |
1657 | } | 1658 | } |
1658 | 1659 | ||
1659 | IXGBE_WRITE_REG(hw, IXGBE_FCTRL, fctrl); | 1660 | IXGBE_WRITE_REG(hw, IXGBE_FCTRL, fctrl); |
1661 | IXGBE_WRITE_REG(hw, IXGBE_VLNCTRL, vlnctrl); | ||
1660 | 1662 | ||
1661 | if (netdev->mc_count) { | 1663 | if (netdev->mc_count) { |
1662 | mta_list = kcalloc(netdev->mc_count, ETH_ALEN, GFP_ATOMIC); | 1664 | mta_list = kcalloc(netdev->mc_count, ETH_ALEN, GFP_ATOMIC); |