File tree Expand file tree Collapse file tree 5 files changed +19
-3
lines changed Expand file tree Collapse file tree 5 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -4765,7 +4765,9 @@ static int qlge_probe(struct pci_dev *pdev,
4765
4765
ndev -> features = ndev -> hw_features ;
4766
4766
ndev -> vlan_features = ndev -> hw_features ;
4767
4767
/* vlan gets same features (except vlan filter) */
4768
- ndev -> vlan_features &= ~NETIF_F_HW_VLAN_CTAG_FILTER ;
4768
+ ndev -> vlan_features &= ~(NETIF_F_HW_VLAN_CTAG_FILTER |
4769
+ NETIF_F_HW_VLAN_CTAG_TX |
4770
+ NETIF_F_HW_VLAN_CTAG_RX );
4769
4771
4770
4772
if (test_bit (QL_DMA64 , & qdev -> flags ))
4771
4773
ndev -> features |= NETIF_F_HIGHDMA ;
Original file line number Diff line number Diff line change @@ -180,7 +180,8 @@ static void ifb_setup(struct net_device *dev)
180
180
dev -> tx_queue_len = TX_Q_LIMIT ;
181
181
182
182
dev -> features |= IFB_FEATURES ;
183
- dev -> vlan_features |= IFB_FEATURES ;
183
+ dev -> vlan_features |= IFB_FEATURES & ~(NETIF_F_HW_VLAN_CTAG_TX |
184
+ NETIF_F_HW_VLAN_STAG_TX );
184
185
185
186
dev -> flags |= IFF_NOARP ;
186
187
dev -> flags &= ~IFF_MULTICAST ;
Original file line number Diff line number Diff line change @@ -286,7 +286,10 @@ static void veth_setup(struct net_device *dev)
286
286
dev -> features |= NETIF_F_LLTX ;
287
287
dev -> features |= VETH_FEATURES ;
288
288
dev -> vlan_features = dev -> features &
289
- ~(NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_STAG_TX );
289
+ ~(NETIF_F_HW_VLAN_CTAG_TX |
290
+ NETIF_F_HW_VLAN_STAG_TX |
291
+ NETIF_F_HW_VLAN_CTAG_RX |
292
+ NETIF_F_HW_VLAN_STAG_RX );
290
293
dev -> destructor = veth_dev_free ;
291
294
292
295
dev -> hw_features = VETH_FEATURES ;
Original file line number Diff line number Diff line change @@ -163,4 +163,11 @@ enum {
163
163
/* changeable features with no special hardware requirements */
164
164
#define NETIF_F_SOFT_FEATURES (NETIF_F_GSO | NETIF_F_GRO)
165
165
166
+ #define NETIF_F_VLAN_FEATURES (NETIF_F_HW_VLAN_CTAG_FILTER | \
167
+ NETIF_F_HW_VLAN_CTAG_RX | \
168
+ NETIF_F_HW_VLAN_CTAG_TX | \
169
+ NETIF_F_HW_VLAN_STAG_FILTER | \
170
+ NETIF_F_HW_VLAN_STAG_RX | \
171
+ NETIF_F_HW_VLAN_STAG_TX)
172
+
166
173
#endif /* _LINUX_NETDEV_FEATURES_H */
Original file line number Diff line number Diff line change @@ -578,6 +578,9 @@ static int vlan_dev_init(struct net_device *dev)
578
578
579
579
dev -> features |= real_dev -> vlan_features | NETIF_F_LLTX ;
580
580
dev -> gso_max_size = real_dev -> gso_max_size ;
581
+ if (dev -> features & NETIF_F_VLAN_FEATURES )
582
+ netdev_warn (real_dev , "VLAN features are set incorrectly. Q-in-Q configurations may not work correctly.\n" );
583
+
581
584
582
585
/* ipv6 shared card related stuff */
583
586
dev -> dev_id = real_dev -> dev_id ;
You can’t perform that action at this time.
0 commit comments