aboutsummaryrefslogtreecommitdiffstats
path: root/net/8021q/vlan.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/8021q/vlan.c')
-rw-r--r--net/8021q/vlan.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index f862dccf6bb0..05b867e43757 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -135,7 +135,7 @@ void unregister_vlan_dev(struct net_device *dev, struct list_head *head)
135 vlan_gvrp_uninit_applicant(real_dev); 135 vlan_gvrp_uninit_applicant(real_dev);
136 136
137 rcu_assign_pointer(real_dev->vlgrp, NULL); 137 rcu_assign_pointer(real_dev->vlgrp, NULL);
138 if (real_dev->features & NETIF_F_HW_VLAN_RX) 138 if (ops->ndo_vlan_rx_register)
139 ops->ndo_vlan_rx_register(real_dev, NULL); 139 ops->ndo_vlan_rx_register(real_dev, NULL);
140 140
141 /* Free the group, after all cpu's are done. */ 141 /* Free the group, after all cpu's are done. */
@@ -156,11 +156,6 @@ int vlan_check_real_dev(struct net_device *real_dev, u16 vlan_id)
156 return -EOPNOTSUPP; 156 return -EOPNOTSUPP;
157 } 157 }
158 158
159 if ((real_dev->features & NETIF_F_HW_VLAN_RX) && !ops->ndo_vlan_rx_register) {
160 pr_info("8021q: device %s has buggy VLAN hw accel\n", name);
161 return -EOPNOTSUPP;
162 }
163
164 if ((real_dev->features & NETIF_F_HW_VLAN_FILTER) && 159 if ((real_dev->features & NETIF_F_HW_VLAN_FILTER) &&
165 (!ops->ndo_vlan_rx_add_vid || !ops->ndo_vlan_rx_kill_vid)) { 160 (!ops->ndo_vlan_rx_add_vid || !ops->ndo_vlan_rx_kill_vid)) {
166 pr_info("8021q: Device %s has buggy VLAN hw accel\n", name); 161 pr_info("8021q: Device %s has buggy VLAN hw accel\n", name);
@@ -213,7 +208,7 @@ int register_vlan_dev(struct net_device *dev)
213 grp->nr_vlans++; 208 grp->nr_vlans++;
214 209
215 if (ngrp) { 210 if (ngrp) {
216 if (real_dev->features & NETIF_F_HW_VLAN_RX) 211 if (ops->ndo_vlan_rx_register)
217 ops->ndo_vlan_rx_register(real_dev, ngrp); 212 ops->ndo_vlan_rx_register(real_dev, ngrp);
218 rcu_assign_pointer(real_dev->vlgrp, ngrp); 213 rcu_assign_pointer(real_dev->vlgrp, ngrp);
219 } 214 }