Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 202925
b: refs/heads/master
c: 4247e16
h: refs/heads/master
i:
  202923: 73c42a8
v: v3
  • Loading branch information
Herbert Xu authored and David S. Miller committed Jun 15, 2010
1 parent 18ff855 commit b82bff4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dbaa154178341689faaa08fbf40b94ae5ca1d6c0
refs/heads/master: 4247e161b12f8dffb7ee3ee07bc5e61f714ebe2d
2 changes: 2 additions & 0 deletions trunk/include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,8 @@ struct net_device_ops {
unsigned short vid);
#ifdef CONFIG_NET_POLL_CONTROLLER
void (*ndo_poll_controller)(struct net_device *dev);
int (*ndo_netpoll_setup)(struct net_device *dev,
struct netpoll_info *info);
void (*ndo_netpoll_cleanup)(struct net_device *dev);
#endif
int (*ndo_set_vf_mac)(struct net_device *dev,
Expand Down
10 changes: 10 additions & 0 deletions trunk/net/core/netpoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,7 @@ int netpoll_setup(struct netpoll *np)
struct net_device *ndev = NULL;
struct in_device *in_dev;
struct netpoll_info *npinfo;
const struct net_device_ops *ops;
unsigned long flags;
int err;

Expand Down Expand Up @@ -797,6 +798,13 @@ int netpoll_setup(struct netpoll *np)
INIT_DELAYED_WORK(&npinfo->tx_work, queue_process);

atomic_set(&npinfo->refcnt, 1);

ops = np->dev->netdev_ops;
if (ops->ndo_netpoll_setup) {
err = ops->ndo_netpoll_setup(ndev, npinfo);
if (err)
goto free_npinfo;
}
} else {
npinfo = ndev->npinfo;
atomic_inc(&npinfo->refcnt);
Expand All @@ -817,6 +825,8 @@ int netpoll_setup(struct netpoll *np)

return 0;

free_npinfo:
kfree(npinfo);
unlock:
rtnl_unlock();
put:
Expand Down

0 comments on commit b82bff4

Please sign in to comment.