aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/arcnet/rfc1051.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2009-01-09 08:01:08 -0500
committerDavid S. Miller <davem@davemloft.net>2009-01-21 17:02:19 -0500
commit5803c5122acb31ebf5f76b1a9925e2c72c4436e1 (patch)
tree5c676bbf593c28fd211ea3af451b5040ef1e6700 /drivers/net/arcnet/rfc1051.c
parent60961ce4d09db7c1ba49da3375123a18845ec864 (diff)
arcnet: convert to internal stats
Use pre-existing network_device_stats inside network_device rather than own private structure. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/arcnet/rfc1051.c')
-rw-r--r--drivers/net/arcnet/rfc1051.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/arcnet/rfc1051.c b/drivers/net/arcnet/rfc1051.c
index 49d39a9cb696..06f8fa2f8f2f 100644
--- a/drivers/net/arcnet/rfc1051.c
+++ b/drivers/net/arcnet/rfc1051.c
@@ -88,7 +88,6 @@ MODULE_LICENSE("GPL");
88 */ 88 */
89static __be16 type_trans(struct sk_buff *skb, struct net_device *dev) 89static __be16 type_trans(struct sk_buff *skb, struct net_device *dev)
90{ 90{
91 struct arcnet_local *lp = netdev_priv(dev);
92 struct archdr *pkt = (struct archdr *) skb->data; 91 struct archdr *pkt = (struct archdr *) skb->data;
93 struct arc_rfc1051 *soft = &pkt->soft.rfc1051; 92 struct arc_rfc1051 *soft = &pkt->soft.rfc1051;
94 int hdr_size = ARC_HDR_SIZE + RFC1051_HDR_SIZE; 93 int hdr_size = ARC_HDR_SIZE + RFC1051_HDR_SIZE;
@@ -112,8 +111,8 @@ static __be16 type_trans(struct sk_buff *skb, struct net_device *dev)
112 return htons(ETH_P_ARP); 111 return htons(ETH_P_ARP);
113 112
114 default: 113 default:
115 lp->stats.rx_errors++; 114 dev->stats.rx_errors++;
116 lp->stats.rx_crc_errors++; 115 dev->stats.rx_crc_errors++;
117 return 0; 116 return 0;
118 } 117 }
119 118
@@ -140,7 +139,7 @@ static void rx(struct net_device *dev, int bufnum,
140 skb = alloc_skb(length + ARC_HDR_SIZE, GFP_ATOMIC); 139 skb = alloc_skb(length + ARC_HDR_SIZE, GFP_ATOMIC);
141 if (skb == NULL) { 140 if (skb == NULL) {
142 BUGMSG(D_NORMAL, "Memory squeeze, dropping packet.\n"); 141 BUGMSG(D_NORMAL, "Memory squeeze, dropping packet.\n");
143 lp->stats.rx_dropped++; 142 dev->stats.rx_dropped++;
144 return; 143 return;
145 } 144 }
146 skb_put(skb, length + ARC_HDR_SIZE); 145 skb_put(skb, length + ARC_HDR_SIZE);
@@ -168,7 +167,6 @@ static void rx(struct net_device *dev, int bufnum,
168static int build_header(struct sk_buff *skb, struct net_device *dev, 167static int build_header(struct sk_buff *skb, struct net_device *dev,
169 unsigned short type, uint8_t daddr) 168 unsigned short type, uint8_t daddr)
170{ 169{
171 struct arcnet_local *lp = netdev_priv(dev);
172 int hdr_size = ARC_HDR_SIZE + RFC1051_HDR_SIZE; 170 int hdr_size = ARC_HDR_SIZE + RFC1051_HDR_SIZE;
173 struct archdr *pkt = (struct archdr *) skb_push(skb, hdr_size); 171 struct archdr *pkt = (struct archdr *) skb_push(skb, hdr_size);
174 struct arc_rfc1051 *soft = &pkt->soft.rfc1051; 172 struct arc_rfc1051 *soft = &pkt->soft.rfc1051;
@@ -184,8 +182,8 @@ static int build_header(struct sk_buff *skb, struct net_device *dev,
184 default: 182 default:
185 BUGMSG(D_NORMAL, "RFC1051: I don't understand protocol %d (%Xh)\n", 183 BUGMSG(D_NORMAL, "RFC1051: I don't understand protocol %d (%Xh)\n",
186 type, type); 184 type, type);
187 lp->stats.tx_errors++; 185 dev->stats.tx_errors++;
188 lp->stats.tx_aborted_errors++; 186 dev->stats.tx_aborted_errors++;
189 return 0; 187 return 0;
190 } 188 }
191 189