Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 8710
b: refs/heads/master
c: b88a762
h: refs/heads/master
v: v3
  • Loading branch information
Ralf Baechle authored and David S. Miller committed Sep 12, 2005
1 parent 6cea025 commit b63f0c6
Show file tree
Hide file tree
Showing 4 changed files with 13 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: e21ce8c7c013fb223a002c70bb0a547de6c26c12
refs/heads/master: b88a762b6062f06d431af0045de4854a758646c0
5 changes: 5 additions & 0 deletions trunk/include/net/netrom.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#ifndef _NETROM_H
#define _NETROM_H

#include <linux/netrom.h>
#include <linux/list.h>
#include <net/sock.h>
Expand Down Expand Up @@ -58,6 +59,10 @@ enum {
#define NR_MAX_WINDOW_SIZE 127 /* Maximum Window Allowable - 127 */
#define NR_MAX_PACKET_SIZE 236 /* Maximum Packet Length - 236 */

struct nr_private {
struct net_device_stats stats;
};

struct nr_sock {
struct sock sock;
ax25_address user_addr, source_addr, dest_addr;
Expand Down
3 changes: 1 addition & 2 deletions trunk/net/netrom/af_netrom.c
Original file line number Diff line number Diff line change
Expand Up @@ -1392,8 +1392,7 @@ static int __init nr_proto_init(void)
struct net_device *dev;

sprintf(name, "nr%d", i);
dev = alloc_netdev(sizeof(struct net_device_stats), name,
nr_setup);
dev = alloc_netdev(sizeof(struct nr_private), name, nr_setup);
if (!dev) {
printk(KERN_ERR "NET/ROM: nr_proto_init - unable to allocate device structure\n");
goto fail;
Expand Down
11 changes: 6 additions & 5 deletions trunk/net/netrom/nr_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,9 @@ static int nr_close(struct net_device *dev)

static int nr_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct net_device_stats *stats = netdev_priv(dev);
unsigned int len;

len = skb->len;
struct nr_private *nr = netdev_priv(dev);
struct net_device_stats *stats = &nr->stats;
unsigned int len = skb->len;

if (!nr_route_frame(skb, NULL)) {
kfree_skb(skb);
Expand All @@ -179,7 +178,9 @@ static int nr_xmit(struct sk_buff *skb, struct net_device *dev)

static struct net_device_stats *nr_get_stats(struct net_device *dev)
{
return netdev_priv(dev);
struct nr_private *nr = netdev_priv(dev);

return &nr->stats;
}

void nr_setup(struct net_device *dev)
Expand Down

0 comments on commit b63f0c6

Please sign in to comment.