@@ -4447,6 +4447,7 @@ void ixgbe_set_rx_mode(struct net_device *netdev)
4447
4447
struct ixgbe_adapter * adapter = netdev_priv (netdev );
4448
4448
struct ixgbe_hw * hw = & adapter -> hw ;
4449
4449
u32 fctrl , vmolr = IXGBE_VMOLR_BAM | IXGBE_VMOLR_AUPE ;
4450
+ netdev_features_t features = netdev -> features ;
4450
4451
int count ;
4451
4452
4452
4453
/* Check for Promiscuous and All Multicast modes */
@@ -4464,14 +4465,13 @@ void ixgbe_set_rx_mode(struct net_device *netdev)
4464
4465
hw -> addr_ctrl .user_set_promisc = true;
4465
4466
fctrl |= (IXGBE_FCTRL_UPE | IXGBE_FCTRL_MPE );
4466
4467
vmolr |= IXGBE_VMOLR_MPE ;
4467
- ixgbe_vlan_promisc_enable ( adapter ) ;
4468
+ features &= ~ NETIF_F_HW_VLAN_CTAG_FILTER ;
4468
4469
} else {
4469
4470
if (netdev -> flags & IFF_ALLMULTI ) {
4470
4471
fctrl |= IXGBE_FCTRL_MPE ;
4471
4472
vmolr |= IXGBE_VMOLR_MPE ;
4472
4473
}
4473
4474
hw -> addr_ctrl .user_set_promisc = false;
4474
- ixgbe_vlan_promisc_disable (adapter );
4475
4475
}
4476
4476
4477
4477
/*
@@ -4504,7 +4504,7 @@ void ixgbe_set_rx_mode(struct net_device *netdev)
4504
4504
}
4505
4505
4506
4506
/* This is useful for sniffing bad packets. */
4507
- if (adapter -> netdev -> features & NETIF_F_RXALL ) {
4507
+ if (features & NETIF_F_RXALL ) {
4508
4508
/* UPE and MPE will be handled by normal PROMISC logic
4509
4509
* in e1000e_set_rx_mode */
4510
4510
fctrl |= (IXGBE_FCTRL_SBP | /* Receive bad packets */
@@ -4517,10 +4517,15 @@ void ixgbe_set_rx_mode(struct net_device *netdev)
4517
4517
4518
4518
IXGBE_WRITE_REG (hw , IXGBE_FCTRL , fctrl );
4519
4519
4520
- if (netdev -> features & NETIF_F_HW_VLAN_CTAG_RX )
4520
+ if (features & NETIF_F_HW_VLAN_CTAG_RX )
4521
4521
ixgbe_vlan_strip_enable (adapter );
4522
4522
else
4523
4523
ixgbe_vlan_strip_disable (adapter );
4524
+
4525
+ if (features & NETIF_F_HW_VLAN_CTAG_FILTER )
4526
+ ixgbe_vlan_promisc_disable (adapter );
4527
+ else
4528
+ ixgbe_vlan_promisc_enable (adapter );
4524
4529
}
4525
4530
4526
4531
static void ixgbe_napi_enable_all (struct ixgbe_adapter * adapter )
@@ -8495,11 +8500,6 @@ static int ixgbe_set_features(struct net_device *netdev,
8495
8500
adapter -> flags |= IXGBE_FLAG_FDIR_HASH_CAPABLE ;
8496
8501
}
8497
8502
8498
- if (features & NETIF_F_HW_VLAN_CTAG_RX )
8499
- ixgbe_vlan_strip_enable (adapter );
8500
- else
8501
- ixgbe_vlan_strip_disable (adapter );
8502
-
8503
8503
if (changed & NETIF_F_RXALL )
8504
8504
need_reset = true;
8505
8505
@@ -8516,6 +8516,9 @@ static int ixgbe_set_features(struct net_device *netdev,
8516
8516
8517
8517
if (need_reset )
8518
8518
ixgbe_do_reset (netdev );
8519
+ else if (changed & (NETIF_F_HW_VLAN_CTAG_RX |
8520
+ NETIF_F_HW_VLAN_CTAG_FILTER ))
8521
+ ixgbe_set_rx_mode (netdev );
8519
8522
8520
8523
return 0 ;
8521
8524
}
@@ -9190,7 +9193,8 @@ static int ixgbe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
9190
9193
NETIF_F_RXCSUM |
9191
9194
NETIF_F_HW_CSUM |
9192
9195
NETIF_F_HW_VLAN_CTAG_TX |
9193
- NETIF_F_HW_VLAN_CTAG_RX ;
9196
+ NETIF_F_HW_VLAN_CTAG_RX |
9197
+ NETIF_F_HW_VLAN_CTAG_FILTER ;
9194
9198
9195
9199
if (hw -> mac .type >= ixgbe_mac_82599EB )
9196
9200
netdev -> features |= NETIF_F_SCTP_CRC ;
@@ -9204,9 +9208,6 @@ static int ixgbe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
9204
9208
netdev -> hw_features |= NETIF_F_NTUPLE |
9205
9209
NETIF_F_HW_TC ;
9206
9210
9207
- /* set this bit last since it cannot be part of hw_features */
9208
- netdev -> features |= NETIF_F_HW_VLAN_CTAG_FILTER ;
9209
-
9210
9211
netdev -> vlan_features |= NETIF_F_SG |
9211
9212
NETIF_F_TSO |
9212
9213
NETIF_F_TSO6 |
0 commit comments