Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 127783
b: refs/heads/master
c: 43a6730
h: refs/heads/master
i:
  127781: 7467c54
  127779: ee7c5c9
  127775: abef132
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Jan 8, 2009
1 parent 301bfe3 commit 54072f3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 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: 03b35ccb7c41ccc256631ff33e6887b7be88137b
refs/heads/master: 43a67304a3e882ec297e08159f8698be59a235fe
25 changes: 11 additions & 14 deletions trunk/drivers/net/appletalk/ipddp.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,26 @@ static int ipddp_mode = IPDDP_DECAP;

/* Index to functions, as function prototypes. */
static int ipddp_xmit(struct sk_buff *skb, struct net_device *dev);
static struct net_device_stats *ipddp_get_stats(struct net_device *dev);
static int ipddp_create(struct ipddp_route *new_rt);
static int ipddp_delete(struct ipddp_route *rt);
static struct ipddp_route* ipddp_find_route(struct ipddp_route *rt);
static int ipddp_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);

static const struct net_device_ops ipddp_netdev_ops = {
.ndo_start_xmit = ipddp_xmit,
.ndo_do_ioctl = ipddp_ioctl,
.ndo_change_mtu = eth_change_mtu,
.ndo_set_mac_address = eth_mac_addr,
.ndo_validate_addr = eth_validate_addr,
};

static struct net_device * __init ipddp_init(void)
{
static unsigned version_printed;
struct net_device *dev;
int err;

dev = alloc_etherdev(sizeof(struct net_device_stats));
dev = alloc_etherdev(0);
if (!dev)
return ERR_PTR(-ENOMEM);

Expand All @@ -71,9 +77,7 @@ static struct net_device * __init ipddp_init(void)
printk(version);

/* Initalize the device structure. */
dev->hard_start_xmit = ipddp_xmit;
dev->get_stats = ipddp_get_stats;
dev->do_ioctl = ipddp_ioctl;
dev->netdev_ops = &ipddp_netdev_ops;

dev->type = ARPHRD_IPDDP; /* IP over DDP tunnel */
dev->mtu = 585;
Expand Down Expand Up @@ -103,13 +107,6 @@ static struct net_device * __init ipddp_init(void)
return dev;
}

/*
* Get the current statistics. This may be called with the card open or closed.
*/
static struct net_device_stats *ipddp_get_stats(struct net_device *dev)
{
return netdev_priv(dev);
}

/*
* Transmit LLAP/ELAP frame using aarp_send_ddp.
Expand Down Expand Up @@ -170,8 +167,8 @@ static int ipddp_xmit(struct sk_buff *skb, struct net_device *dev)

skb->protocol = htons(ETH_P_ATALK); /* Protocol has changed */

((struct net_device_stats *) netdev_priv(dev))->tx_packets++;
((struct net_device_stats *) netdev_priv(dev))->tx_bytes += skb->len;
dev->stats.tx_packets++;
dev->stats.tx_bytes += skb->len;

if(aarp_send_ddp(rt->dev, skb, &rt->at, NULL) < 0)
dev_kfree_skb(skb);
Expand Down

0 comments on commit 54072f3

Please sign in to comment.