aboutsummaryrefslogtreecommitdiffstats
path: root/net/8021q
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2013-04-18 22:04:27 -0400
committerDavid S. Miller <davem@davemloft.net>2013-04-19 14:45:26 -0400
commitf646968f8f7c624587de729115d802372b9063dd (patch)
tree2b8c6604306f5e74af9e16c17e2b611610982b65 /net/8021q
parentc2962897c94605bc8f158a37dee8d867dda9f116 (diff)
net: vlan: rename NETIF_F_HW_VLAN_* feature flags to NETIF_F_HW_VLAN_CTAG_*
Rename the hardware VLAN acceleration features to include "CTAG" to indicate that they only support CTAGs. Follow up patches will introduce 802.1ad server provider tagging (STAGs) and require the distinction for hardware not supporting acclerating both. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/8021q')
-rw-r--r--net/8021q/vlan.c6
-rw-r--r--net/8021q/vlan_core.c4
-rw-r--r--net/8021q/vlan_dev.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index 85addcd9372b..d913feed0757 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -301,7 +301,7 @@ static void vlan_transfer_features(struct net_device *dev,
301{ 301{
302 vlandev->gso_max_size = dev->gso_max_size; 302 vlandev->gso_max_size = dev->gso_max_size;
303 303
304 if (dev->features & NETIF_F_HW_VLAN_TX) 304 if (dev->features & NETIF_F_HW_VLAN_CTAG_TX)
305 vlandev->hard_header_len = dev->hard_header_len; 305 vlandev->hard_header_len = dev->hard_header_len;
306 else 306 else
307 vlandev->hard_header_len = dev->hard_header_len + VLAN_HLEN; 307 vlandev->hard_header_len = dev->hard_header_len + VLAN_HLEN;
@@ -347,7 +347,7 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
347 __vlan_device_event(dev, event); 347 __vlan_device_event(dev, event);
348 348
349 if ((event == NETDEV_UP) && 349 if ((event == NETDEV_UP) &&
350 (dev->features & NETIF_F_HW_VLAN_FILTER)) { 350 (dev->features & NETIF_F_HW_VLAN_CTAG_FILTER)) {
351 pr_info("adding VLAN 0 to HW filter on device %s\n", 351 pr_info("adding VLAN 0 to HW filter on device %s\n",
352 dev->name); 352 dev->name);
353 vlan_vid_add(dev, 0); 353 vlan_vid_add(dev, 0);
@@ -415,7 +415,7 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
415 break; 415 break;
416 416
417 case NETDEV_DOWN: 417 case NETDEV_DOWN:
418 if (dev->features & NETIF_F_HW_VLAN_FILTER) 418 if (dev->features & NETIF_F_HW_VLAN_CTAG_FILTER)
419 vlan_vid_del(dev, 0); 419 vlan_vid_del(dev, 0);
420 420
421 /* Put all VLANs for this dev in the down state too. */ 421 /* Put all VLANs for this dev in the down state too. */
diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c
index f3b6f515eba6..3df29d344704 100644
--- a/net/8021q/vlan_core.c
+++ b/net/8021q/vlan_core.c
@@ -225,7 +225,7 @@ static int __vlan_vid_add(struct vlan_info *vlan_info, unsigned short vid,
225 if (!vid_info) 225 if (!vid_info)
226 return -ENOMEM; 226 return -ENOMEM;
227 227
228 if (dev->features & NETIF_F_HW_VLAN_FILTER) { 228 if (dev->features & NETIF_F_HW_VLAN_CTAG_FILTER) {
229 err = ops->ndo_vlan_rx_add_vid(dev, vid); 229 err = ops->ndo_vlan_rx_add_vid(dev, vid);
230 if (err) { 230 if (err) {
231 kfree(vid_info); 231 kfree(vid_info);
@@ -282,7 +282,7 @@ static void __vlan_vid_del(struct vlan_info *vlan_info,
282 unsigned short vid = vid_info->vid; 282 unsigned short vid = vid_info->vid;
283 int err; 283 int err;
284 284
285 if (dev->features & NETIF_F_HW_VLAN_FILTER) { 285 if (dev->features & NETIF_F_HW_VLAN_CTAG_FILTER) {
286 err = ops->ndo_vlan_rx_kill_vid(dev, vid); 286 err = ops->ndo_vlan_rx_kill_vid(dev, vid);
287 if (err) { 287 if (err) {
288 pr_warn("failed to kill vid %d for device %s\n", 288 pr_warn("failed to kill vid %d for device %s\n",
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 19cf81bf9f69..5c4892a86410 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -583,7 +583,7 @@ static int vlan_dev_init(struct net_device *dev)
583#endif 583#endif
584 584
585 dev->needed_headroom = real_dev->needed_headroom; 585 dev->needed_headroom = real_dev->needed_headroom;
586 if (real_dev->features & NETIF_F_HW_VLAN_TX) { 586 if (real_dev->features & NETIF_F_HW_VLAN_CTAG_TX) {
587 dev->header_ops = real_dev->header_ops; 587 dev->header_ops = real_dev->header_ops;
588 dev->hard_header_len = real_dev->hard_header_len; 588 dev->hard_header_len = real_dev->hard_header_len;
589 } else { 589 } else {