Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 130136
b: refs/heads/master
c: 068c89b
h: refs/heads/master
v: v3
  • Loading branch information
Don Skidmore authored and David S. Miller committed Jan 20, 2009
1 parent 7bac799 commit a49c69b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 27 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 15005a320473b8d3676b878deb29bbe738ef9027
refs/heads/master: 068c89b014ebd27b1c09c3c772e9d982988e7786
53 changes: 27 additions & 26 deletions trunk/drivers/net/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1744,6 +1744,32 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter)
IXGBE_WRITE_REG(hw, IXGBE_RXCSUM, rxcsum);
}

static void ixgbe_vlan_rx_add_vid(struct net_device *netdev, u16 vid)
{
struct ixgbe_adapter *adapter = netdev_priv(netdev);
struct ixgbe_hw *hw = &adapter->hw;

/* add VID to filter table */
hw->mac.ops.set_vfta(&adapter->hw, vid, 0, true);
}

static void ixgbe_vlan_rx_kill_vid(struct net_device *netdev, u16 vid)
{
struct ixgbe_adapter *adapter = netdev_priv(netdev);
struct ixgbe_hw *hw = &adapter->hw;

if (!test_bit(__IXGBE_DOWN, &adapter->state))
ixgbe_irq_disable(adapter);

vlan_group_set_device(adapter->vlgrp, vid, NULL);

if (!test_bit(__IXGBE_DOWN, &adapter->state))
ixgbe_irq_enable(adapter);

/* remove VID from filter table */
hw->mac.ops.set_vfta(&adapter->hw, vid, 0, false);
}

static void ixgbe_vlan_rx_register(struct net_device *netdev,
struct vlan_group *grp)
{
Expand All @@ -1763,6 +1789,7 @@ static void ixgbe_vlan_rx_register(struct net_device *netdev,
ctrl |= IXGBE_VLNCTRL_VME;
ctrl &= ~IXGBE_VLNCTRL_CFIEN;
IXGBE_WRITE_REG(&adapter->hw, IXGBE_VLNCTRL, ctrl);
ixgbe_vlan_rx_add_vid(netdev, 0);

if (grp) {
/* enable VLAN tag insert/strip */
Expand All @@ -1776,32 +1803,6 @@ static void ixgbe_vlan_rx_register(struct net_device *netdev,
ixgbe_irq_enable(adapter);
}

static void ixgbe_vlan_rx_add_vid(struct net_device *netdev, u16 vid)
{
struct ixgbe_adapter *adapter = netdev_priv(netdev);
struct ixgbe_hw *hw = &adapter->hw;

/* add VID to filter table */
hw->mac.ops.set_vfta(&adapter->hw, vid, 0, true);
}

static void ixgbe_vlan_rx_kill_vid(struct net_device *netdev, u16 vid)
{
struct ixgbe_adapter *adapter = netdev_priv(netdev);
struct ixgbe_hw *hw = &adapter->hw;

if (!test_bit(__IXGBE_DOWN, &adapter->state))
ixgbe_irq_disable(adapter);

vlan_group_set_device(adapter->vlgrp, vid, NULL);

if (!test_bit(__IXGBE_DOWN, &adapter->state))
ixgbe_irq_enable(adapter);

/* remove VID from filter table */
hw->mac.ops.set_vfta(&adapter->hw, vid, 0, false);
}

static void ixgbe_restore_vlan(struct ixgbe_adapter *adapter)
{
ixgbe_vlan_rx_register(adapter->netdev, adapter->vlgrp);
Expand Down

0 comments on commit a49c69b

Please sign in to comment.