diff options
Diffstat (limited to 'drivers/net/tun.c')
-rw-r--r-- | drivers/net/tun.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 7bea9c65119e..93c5d72711b0 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
@@ -123,7 +123,7 @@ struct tun_struct { | |||
123 | gid_t group; | 123 | gid_t group; |
124 | 124 | ||
125 | struct net_device *dev; | 125 | struct net_device *dev; |
126 | u32 set_features; | 126 | netdev_features_t set_features; |
127 | #define TUN_USER_FEATURES (NETIF_F_HW_CSUM|NETIF_F_TSO_ECN|NETIF_F_TSO| \ | 127 | #define TUN_USER_FEATURES (NETIF_F_HW_CSUM|NETIF_F_TSO_ECN|NETIF_F_TSO| \ |
128 | NETIF_F_TSO6|NETIF_F_UFO) | 128 | NETIF_F_TSO6|NETIF_F_UFO) |
129 | struct fasync_struct *fasync; | 129 | struct fasync_struct *fasync; |
@@ -454,7 +454,8 @@ tun_net_change_mtu(struct net_device *dev, int new_mtu) | |||
454 | return 0; | 454 | return 0; |
455 | } | 455 | } |
456 | 456 | ||
457 | static u32 tun_net_fix_features(struct net_device *dev, u32 features) | 457 | static netdev_features_t tun_net_fix_features(struct net_device *dev, |
458 | netdev_features_t features) | ||
458 | { | 459 | { |
459 | struct tun_struct *tun = netdev_priv(dev); | 460 | struct tun_struct *tun = netdev_priv(dev); |
460 | 461 | ||
@@ -1196,7 +1197,7 @@ static int tun_get_iff(struct net *net, struct tun_struct *tun, | |||
1196 | * privs required. */ | 1197 | * privs required. */ |
1197 | static int set_offload(struct tun_struct *tun, unsigned long arg) | 1198 | static int set_offload(struct tun_struct *tun, unsigned long arg) |
1198 | { | 1199 | { |
1199 | u32 features = 0; | 1200 | netdev_features_t features = 0; |
1200 | 1201 | ||
1201 | if (arg & TUN_F_CSUM) { | 1202 | if (arg & TUN_F_CSUM) { |
1202 | features |= NETIF_F_HW_CSUM; | 1203 | features |= NETIF_F_HW_CSUM; |
@@ -1589,16 +1590,15 @@ static void tun_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info | |||
1589 | { | 1590 | { |
1590 | struct tun_struct *tun = netdev_priv(dev); | 1591 | struct tun_struct *tun = netdev_priv(dev); |
1591 | 1592 | ||
1592 | strcpy(info->driver, DRV_NAME); | 1593 | strlcpy(info->driver, DRV_NAME, sizeof(info->driver)); |
1593 | strcpy(info->version, DRV_VERSION); | 1594 | strlcpy(info->version, DRV_VERSION, sizeof(info->version)); |
1594 | strcpy(info->fw_version, "N/A"); | ||
1595 | 1595 | ||
1596 | switch (tun->flags & TUN_TYPE_MASK) { | 1596 | switch (tun->flags & TUN_TYPE_MASK) { |
1597 | case TUN_TUN_DEV: | 1597 | case TUN_TUN_DEV: |
1598 | strcpy(info->bus_info, "tun"); | 1598 | strlcpy(info->bus_info, "tun", sizeof(info->bus_info)); |
1599 | break; | 1599 | break; |
1600 | case TUN_TAP_DEV: | 1600 | case TUN_TAP_DEV: |
1601 | strcpy(info->bus_info, "tap"); | 1601 | strlcpy(info->bus_info, "tap", sizeof(info->bus_info)); |
1602 | break; | 1602 | break; |
1603 | } | 1603 | } |
1604 | } | 1604 | } |