Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 203944
b: refs/heads/master
c: bee3136
h: refs/heads/master
v: v3
  • Loading branch information
Nolan Leake authored and David S. Miller committed Jul 31, 2010
1 parent 2162628 commit 79e44ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ae3568adf42d5d3bb3cfa505b94351c5d1ce4924
refs/heads/master: bee31369ce16fc3898ec9a54161248c9eddb06bc
10 changes: 3 additions & 7 deletions trunk/drivers/net/tun.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ static int tun_attach(struct tun_struct *tun, struct file *file)
tfile->tun = tun;
tun->tfile = tfile;
tun->socket.file = file;
netif_carrier_on(tun->dev);
dev_hold(tun->dev);
sock_hold(tun->socket.sk);
atomic_inc(&tfile->count);
Expand All @@ -162,6 +163,7 @@ static void __tun_detach(struct tun_struct *tun)
{
/* Detach from net device */
netif_tx_lock_bh(tun->dev);
netif_carrier_off(tun->dev);
tun->tfile = NULL;
tun->socket.file = NULL;
netif_tx_unlock_bh(tun->dev);
Expand Down Expand Up @@ -1574,12 +1576,6 @@ static void tun_set_msglevel(struct net_device *dev, u32 value)
#endif
}

static u32 tun_get_link(struct net_device *dev)
{
struct tun_struct *tun = netdev_priv(dev);
return !!tun->tfile;
}

static u32 tun_get_rx_csum(struct net_device *dev)
{
struct tun_struct *tun = netdev_priv(dev);
Expand All @@ -1601,7 +1597,7 @@ static const struct ethtool_ops tun_ethtool_ops = {
.get_drvinfo = tun_get_drvinfo,
.get_msglevel = tun_get_msglevel,
.set_msglevel = tun_set_msglevel,
.get_link = tun_get_link,
.get_link = ethtool_op_get_link,
.get_rx_csum = tun_get_rx_csum,
.set_rx_csum = tun_set_rx_csum
};
Expand Down

0 comments on commit 79e44ad

Please sign in to comment.