Skip to content

Commit

Permalink
atm: convert clip driver to net_device_ops
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Mar 22, 2009
1 parent 788dee0 commit dde0975
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions net/atm/clip.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,10 +552,13 @@ static int clip_setentry(struct atm_vcc *vcc, __be32 ip)
return error;
}

static const struct net_device_ops clip_netdev_ops = {
.ndo_start_xmit = clip_start_xmit,
};

static void clip_setup(struct net_device *dev)
{
dev->hard_start_xmit = clip_start_xmit;
/* sg_xmit ... */
dev->netdev_ops = &clip_netdev_ops;
dev->type = ARPHRD_ATM;
dev->hard_header_len = RFC1483LLC_LEN;
dev->mtu = RFC1626_MTU;
Expand Down Expand Up @@ -615,7 +618,7 @@ static int clip_device_event(struct notifier_block *this, unsigned long event,
}

/* ignore non-CLIP devices */
if (dev->type != ARPHRD_ATM || dev->hard_start_xmit != clip_start_xmit)
if (dev->type != ARPHRD_ATM || dev->netdev_ops != &clip_netdev_ops)
return NOTIFY_DONE;

switch (event) {
Expand Down

0 comments on commit dde0975

Please sign in to comment.