aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/igbvf/netdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/intel/igbvf/netdev.c')
-rw-r--r--drivers/net/ethernet/intel/igbvf/netdev.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/net/ethernet/intel/igbvf/netdev.c b/drivers/net/ethernet/intel/igbvf/netdev.c
index c358973ce414..fd3da3076c2f 100644
--- a/drivers/net/ethernet/intel/igbvf/netdev.c
+++ b/drivers/net/ethernet/intel/igbvf/netdev.c
@@ -1176,18 +1176,20 @@ static void igbvf_set_rlpml(struct igbvf_adapter *adapter)
1176 e1000_rlpml_set_vf(hw, max_frame_size); 1176 e1000_rlpml_set_vf(hw, max_frame_size);
1177} 1177}
1178 1178
1179static void igbvf_vlan_rx_add_vid(struct net_device *netdev, u16 vid) 1179static int igbvf_vlan_rx_add_vid(struct net_device *netdev, u16 vid)
1180{ 1180{
1181 struct igbvf_adapter *adapter = netdev_priv(netdev); 1181 struct igbvf_adapter *adapter = netdev_priv(netdev);
1182 struct e1000_hw *hw = &adapter->hw; 1182 struct e1000_hw *hw = &adapter->hw;
1183 1183
1184 if (hw->mac.ops.set_vfta(hw, vid, true)) 1184 if (hw->mac.ops.set_vfta(hw, vid, true)) {
1185 dev_err(&adapter->pdev->dev, "Failed to add vlan id %d\n", vid); 1185 dev_err(&adapter->pdev->dev, "Failed to add vlan id %d\n", vid);
1186 else 1186 return -EINVAL;
1187 set_bit(vid, adapter->active_vlans); 1187 }
1188 set_bit(vid, adapter->active_vlans);
1189 return 0;
1188} 1190}
1189 1191
1190static void igbvf_vlan_rx_kill_vid(struct net_device *netdev, u16 vid) 1192static int igbvf_vlan_rx_kill_vid(struct net_device *netdev, u16 vid)
1191{ 1193{
1192 struct igbvf_adapter *adapter = netdev_priv(netdev); 1194 struct igbvf_adapter *adapter = netdev_priv(netdev);
1193 struct e1000_hw *hw = &adapter->hw; 1195 struct e1000_hw *hw = &adapter->hw;
@@ -1197,11 +1199,13 @@ static void igbvf_vlan_rx_kill_vid(struct net_device *netdev, u16 vid)
1197 if (!test_bit(__IGBVF_DOWN, &adapter->state)) 1199 if (!test_bit(__IGBVF_DOWN, &adapter->state))
1198 igbvf_irq_enable(adapter); 1200 igbvf_irq_enable(adapter);
1199 1201
1200 if (hw->mac.ops.set_vfta(hw, vid, false)) 1202 if (hw->mac.ops.set_vfta(hw, vid, false)) {
1201 dev_err(&adapter->pdev->dev, 1203 dev_err(&adapter->pdev->dev,
1202 "Failed to remove vlan id %d\n", vid); 1204 "Failed to remove vlan id %d\n", vid);
1203 else 1205 return -EINVAL;
1204 clear_bit(vid, adapter->active_vlans); 1206 }
1207 clear_bit(vid, adapter->active_vlans);
1208 return 0;
1205} 1209}
1206 1210
1207static void igbvf_restore_vlan(struct igbvf_adapter *adapter) 1211static void igbvf_restore_vlan(struct igbvf_adapter *adapter)