Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Kernel v2.6.25-rc7 /net/8021q/vlan_netlink.c

Filename:/net/8021q/vlan_netlink.c
Lines Added:6
Lines Deleted:11
Also changed in: (Previous) 2.6.25-rc6  2.6.25-rc5  2.6.25-rc4  2.6.25-rc3  2.6.25-rc2  2.6.25-rc1 
(Following) 2.6.25-rc8  2.6.25-rc9  2.6.25  2.6.25-git2  2.6.25-git3  2.6.25-git4 

Location
[  2.6.25-rc7
  [  net
    [  8021q
       o  vlan_netlink.c

Patch

diff --git a/net/8021q/vlan_netlink.c b/net/8021q/vlan_netlink.c
index 0996185..e32eeb3 100644
--- a/net/8021q/vlan_netlink.c
+++ b/net/8021q/vlan_netlink.c
@@ -75,7 +75,7 @@ static int vlan_validate(struct nlattr *tb[], struct nlattr *data[])
 static int vlan_changelink(struct net_device *dev,
             struct nlattr *tb[], struct nlattr *data[])
 {
-   struct vlan_dev_info *vlan = VLAN_DEV_INFO(dev);
+   struct vlan_dev_info *vlan = vlan_dev_info(dev);
    struct ifla_vlan_flags *flags;
    struct ifla_vlan_qos_mapping *m;
    struct nlattr *attr;
@@ -104,7 +104,7 @@ static int vlan_changelink(struct net_device *dev,
 static int vlan_newlink(struct net_device *dev,
          struct nlattr *tb[], struct nlattr *data[])
 {
-   struct vlan_dev_info *vlan = VLAN_DEV_INFO(dev);
+   struct vlan_dev_info *vlan = vlan_dev_info(dev);
    struct net_device *real_dev;
    int err;
 
@@ -137,11 +137,6 @@ static int vlan_newlink(struct net_device *dev,
    return register_vlan_dev(dev);
 }
 
-static void vlan_dellink(struct net_device *dev)
-{
-   unregister_vlan_device(dev);
-}
-
 static inline size_t vlan_qos_map_size(unsigned int n)
 {
    if (n == 0)
@@ -153,7 +148,7 @@ static inline size_t vlan_qos_map_size(unsigned int n)
 
 static size_t vlan_get_size(const struct net_device *dev)
 {
-   struct vlan_dev_info *vlan = VLAN_DEV_INFO(dev);
+   struct vlan_dev_info *vlan = vlan_dev_info(dev);
 
    return nla_total_size(2) +   /* IFLA_VLAN_ID */
           vlan_qos_map_size(vlan->nr_ingress_mappings) +
@@ -162,14 +157,14 @@ static size_t vlan_get_size(const struct net_device *dev)
 
 static int vlan_fill_info(struct sk_buff *skb, const struct net_device *dev)
 {
-   struct vlan_dev_info *vlan = VLAN_DEV_INFO(dev);
+   struct vlan_dev_info *vlan = vlan_dev_info(dev);
    struct vlan_priority_tci_mapping *pm;
    struct ifla_vlan_flags f;
    struct ifla_vlan_qos_mapping m;
    struct nlattr *nest;
    unsigned int i;
 
-   NLA_PUT_U16(skb, IFLA_VLAN_ID, VLAN_DEV_INFO(dev)->vlan_id);
+   NLA_PUT_U16(skb, IFLA_VLAN_ID, vlan_dev_info(dev)->vlan_id);
    if (vlan->flags) {
       f.flags = vlan->flags;
       f.mask  = ~0;
@@ -226,7 +221,7 @@ struct rtnl_link_ops vlan_link_ops __read_mostly = {
    .validate   = vlan_validate,
    .newlink   = vlan_newlink,
    .changelink   = vlan_changelink,
-   .dellink   = vlan_dellink,
+   .dellink   = unregister_vlan_dev,
    .get_size   = vlan_get_size,
    .fill_info   = vlan_fill_info,
 };


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.