diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2009-01-09 08:01:08 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-21 17:02:19 -0500 |
commit | 5803c5122acb31ebf5f76b1a9925e2c72c4436e1 (patch) | |
tree | 5c676bbf593c28fd211ea3af451b5040ef1e6700 /drivers | |
parent | 60961ce4d09db7c1ba49da3375123a18845ec864 (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')
-rw-r--r-- | drivers/net/arcnet/arc-rawmode.c | 2 | ||||
-rw-r--r-- | drivers/net/arcnet/arcnet.c | 38 | ||||
-rw-r--r-- | drivers/net/arcnet/capmode.c | 2 | ||||
-rw-r--r-- | drivers/net/arcnet/rfc1051.c | 12 | ||||
-rw-r--r-- | drivers/net/arcnet/rfc1201.c | 47 |
5 files changed, 42 insertions, 59 deletions
diff --git a/drivers/net/arcnet/arc-rawmode.c b/drivers/net/arcnet/arc-rawmode.c index 3ff9affb1a91..da017cbb5f64 100644 --- a/drivers/net/arcnet/arc-rawmode.c +++ b/drivers/net/arcnet/arc-rawmode.c | |||
@@ -102,7 +102,7 @@ static void rx(struct net_device *dev, int bufnum, | |||
102 | skb = alloc_skb(length + ARC_HDR_SIZE, GFP_ATOMIC); | 102 | skb = alloc_skb(length + ARC_HDR_SIZE, GFP_ATOMIC); |
103 | if (skb == NULL) { | 103 | if (skb == NULL) { |
104 | BUGMSG(D_NORMAL, "Memory squeeze, dropping packet.\n"); | 104 | BUGMSG(D_NORMAL, "Memory squeeze, dropping packet.\n"); |
105 | lp->stats.rx_dropped++; | 105 | dev->stats.rx_dropped++; |
106 | return; | 106 | return; |
107 | } | 107 | } |
108 | skb_put(skb, length + ARC_HDR_SIZE); | 108 | skb_put(skb, length + ARC_HDR_SIZE); |
diff --git a/drivers/net/arcnet/arcnet.c b/drivers/net/arcnet/arcnet.c index 6b53e5ed125c..34b9a4d0da30 100644 --- a/drivers/net/arcnet/arcnet.c +++ b/drivers/net/arcnet/arcnet.c | |||
@@ -105,7 +105,6 @@ static int arcnet_header(struct sk_buff *skb, struct net_device *dev, | |||
105 | unsigned short type, const void *daddr, | 105 | unsigned short type, const void *daddr, |
106 | const void *saddr, unsigned len); | 106 | const void *saddr, unsigned len); |
107 | static int arcnet_rebuild_header(struct sk_buff *skb); | 107 | static int arcnet_rebuild_header(struct sk_buff *skb); |
108 | static struct net_device_stats *arcnet_get_stats(struct net_device *dev); | ||
109 | static int go_tx(struct net_device *dev); | 108 | static int go_tx(struct net_device *dev); |
110 | 109 | ||
111 | static int debug = ARCNET_DEBUG; | 110 | static int debug = ARCNET_DEBUG; |
@@ -347,7 +346,6 @@ static void arcdev_setup(struct net_device *dev) | |||
347 | dev->stop = arcnet_close; | 346 | dev->stop = arcnet_close; |
348 | dev->hard_start_xmit = arcnet_send_packet; | 347 | dev->hard_start_xmit = arcnet_send_packet; |
349 | dev->tx_timeout = arcnet_timeout; | 348 | dev->tx_timeout = arcnet_timeout; |
350 | dev->get_stats = arcnet_get_stats; | ||
351 | } | 349 | } |
352 | 350 | ||
353 | struct net_device *alloc_arcdev(char *name) | 351 | struct net_device *alloc_arcdev(char *name) |
@@ -583,8 +581,8 @@ static int arcnet_rebuild_header(struct sk_buff *skb) | |||
583 | } else { | 581 | } else { |
584 | BUGMSG(D_NORMAL, | 582 | BUGMSG(D_NORMAL, |
585 | "I don't understand ethernet protocol %Xh addresses!\n", type); | 583 | "I don't understand ethernet protocol %Xh addresses!\n", type); |
586 | lp->stats.tx_errors++; | 584 | dev->stats.tx_errors++; |
587 | lp->stats.tx_aborted_errors++; | 585 | dev->stats.tx_aborted_errors++; |
588 | } | 586 | } |
589 | 587 | ||
590 | /* if we couldn't resolve the address... give up. */ | 588 | /* if we couldn't resolve the address... give up. */ |
@@ -645,7 +643,7 @@ static int arcnet_send_packet(struct sk_buff *skb, struct net_device *dev) | |||
645 | !proto->ack_tx) { | 643 | !proto->ack_tx) { |
646 | /* done right away and we don't want to acknowledge | 644 | /* done right away and we don't want to acknowledge |
647 | the package later - forget about it now */ | 645 | the package later - forget about it now */ |
648 | lp->stats.tx_bytes += skb->len; | 646 | dev->stats.tx_bytes += skb->len; |
649 | freeskb = 1; | 647 | freeskb = 1; |
650 | } else { | 648 | } else { |
651 | /* do it the 'split' way */ | 649 | /* do it the 'split' way */ |
@@ -709,7 +707,7 @@ static int go_tx(struct net_device *dev) | |||
709 | /* start sending */ | 707 | /* start sending */ |
710 | ACOMMAND(TXcmd | (lp->cur_tx << 3)); | 708 | ACOMMAND(TXcmd | (lp->cur_tx << 3)); |
711 | 709 | ||
712 | lp->stats.tx_packets++; | 710 | dev->stats.tx_packets++; |
713 | lp->lasttrans_dest = lp->lastload_dest; | 711 | lp->lasttrans_dest = lp->lastload_dest; |
714 | lp->lastload_dest = 0; | 712 | lp->lastload_dest = 0; |
715 | lp->excnak_pending = 0; | 713 | lp->excnak_pending = 0; |
@@ -732,11 +730,11 @@ static void arcnet_timeout(struct net_device *dev) | |||
732 | msg = " - missed IRQ?"; | 730 | msg = " - missed IRQ?"; |
733 | } else { | 731 | } else { |
734 | msg = ""; | 732 | msg = ""; |
735 | lp->stats.tx_aborted_errors++; | 733 | dev->stats.tx_aborted_errors++; |
736 | lp->timed_out = 1; | 734 | lp->timed_out = 1; |
737 | ACOMMAND(NOTXcmd | (lp->cur_tx << 3)); | 735 | ACOMMAND(NOTXcmd | (lp->cur_tx << 3)); |
738 | } | 736 | } |
739 | lp->stats.tx_errors++; | 737 | dev->stats.tx_errors++; |
740 | 738 | ||
741 | /* make sure we didn't miss a TX or a EXC NAK IRQ */ | 739 | /* make sure we didn't miss a TX or a EXC NAK IRQ */ |
742 | AINTMASK(0); | 740 | AINTMASK(0); |
@@ -865,8 +863,8 @@ irqreturn_t arcnet_interrupt(int irq, void *dev_id) | |||
865 | "transmit was not acknowledged! " | 863 | "transmit was not acknowledged! " |
866 | "(status=%Xh, dest=%02Xh)\n", | 864 | "(status=%Xh, dest=%02Xh)\n", |
867 | status, lp->lasttrans_dest); | 865 | status, lp->lasttrans_dest); |
868 | lp->stats.tx_errors++; | 866 | dev->stats.tx_errors++; |
869 | lp->stats.tx_carrier_errors++; | 867 | dev->stats.tx_carrier_errors++; |
870 | } else { | 868 | } else { |
871 | BUGMSG(D_DURING, | 869 | BUGMSG(D_DURING, |
872 | "broadcast was not acknowledged; that's normal " | 870 | "broadcast was not acknowledged; that's normal " |
@@ -905,7 +903,7 @@ irqreturn_t arcnet_interrupt(int irq, void *dev_id) | |||
905 | if (txbuf != -1) { | 903 | if (txbuf != -1) { |
906 | if (lp->outgoing.proto->continue_tx(dev, txbuf)) { | 904 | if (lp->outgoing.proto->continue_tx(dev, txbuf)) { |
907 | /* that was the last segment */ | 905 | /* that was the last segment */ |
908 | lp->stats.tx_bytes += lp->outgoing.skb->len; | 906 | dev->stats.tx_bytes += lp->outgoing.skb->len; |
909 | if(!lp->outgoing.proto->ack_tx) | 907 | if(!lp->outgoing.proto->ack_tx) |
910 | { | 908 | { |
911 | dev_kfree_skb_irq(lp->outgoing.skb); | 909 | dev_kfree_skb_irq(lp->outgoing.skb); |
@@ -930,7 +928,7 @@ irqreturn_t arcnet_interrupt(int irq, void *dev_id) | |||
930 | } | 928 | } |
931 | if (status & lp->intmask & RECONflag) { | 929 | if (status & lp->intmask & RECONflag) { |
932 | ACOMMAND(CFLAGScmd | CONFIGclear); | 930 | ACOMMAND(CFLAGScmd | CONFIGclear); |
933 | lp->stats.tx_carrier_errors++; | 931 | dev->stats.tx_carrier_errors++; |
934 | 932 | ||
935 | BUGMSG(D_RECON, "Network reconfiguration detected (status=%Xh)\n", | 933 | BUGMSG(D_RECON, "Network reconfiguration detected (status=%Xh)\n", |
936 | status); | 934 | status); |
@@ -1038,8 +1036,8 @@ static void arcnet_rx(struct net_device *dev, int bufnum) | |||
1038 | "(%d+4 bytes)\n", | 1036 | "(%d+4 bytes)\n", |
1039 | bufnum, pkt.hard.source, pkt.hard.dest, length); | 1037 | bufnum, pkt.hard.source, pkt.hard.dest, length); |
1040 | 1038 | ||
1041 | lp->stats.rx_packets++; | 1039 | dev->stats.rx_packets++; |
1042 | lp->stats.rx_bytes += length + ARC_HDR_SIZE; | 1040 | dev->stats.rx_bytes += length + ARC_HDR_SIZE; |
1043 | 1041 | ||
1044 | /* call the right receiver for the protocol */ | 1042 | /* call the right receiver for the protocol */ |
1045 | if (arc_proto_map[soft->proto]->is_ip) { | 1043 | if (arc_proto_map[soft->proto]->is_ip) { |
@@ -1067,18 +1065,6 @@ static void arcnet_rx(struct net_device *dev, int bufnum) | |||
1067 | } | 1065 | } |
1068 | 1066 | ||
1069 | 1067 | ||
1070 | |||
1071 | /* | ||
1072 | * Get the current statistics. This may be called with the card open or | ||
1073 | * closed. | ||
1074 | */ | ||
1075 | static struct net_device_stats *arcnet_get_stats(struct net_device *dev) | ||
1076 | { | ||
1077 | struct arcnet_local *lp = netdev_priv(dev); | ||
1078 | return &lp->stats; | ||
1079 | } | ||
1080 | |||
1081 | |||
1082 | static void null_rx(struct net_device *dev, int bufnum, | 1068 | static void null_rx(struct net_device *dev, int bufnum, |
1083 | struct archdr *pkthdr, int length) | 1069 | struct archdr *pkthdr, int length) |
1084 | { | 1070 | { |
diff --git a/drivers/net/arcnet/capmode.c b/drivers/net/arcnet/capmode.c index 30580bbe252d..1613929ff301 100644 --- a/drivers/net/arcnet/capmode.c +++ b/drivers/net/arcnet/capmode.c | |||
@@ -119,7 +119,7 @@ static void rx(struct net_device *dev, int bufnum, | |||
119 | skb = alloc_skb(length + ARC_HDR_SIZE + sizeof(int), GFP_ATOMIC); | 119 | skb = alloc_skb(length + ARC_HDR_SIZE + sizeof(int), GFP_ATOMIC); |
120 | if (skb == NULL) { | 120 | if (skb == NULL) { |
121 | BUGMSG(D_NORMAL, "Memory squeeze, dropping packet.\n"); | 121 | BUGMSG(D_NORMAL, "Memory squeeze, dropping packet.\n"); |
122 | lp->stats.rx_dropped++; | 122 | dev->stats.rx_dropped++; |
123 | return; | 123 | return; |
124 | } | 124 | } |
125 | skb_put(skb, length + ARC_HDR_SIZE + sizeof(int)); | 125 | skb_put(skb, length + ARC_HDR_SIZE + sizeof(int)); |
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 | */ |
89 | static __be16 type_trans(struct sk_buff *skb, struct net_device *dev) | 89 | static __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, | |||
168 | static int build_header(struct sk_buff *skb, struct net_device *dev, | 167 | static 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 | ||
diff --git a/drivers/net/arcnet/rfc1201.c b/drivers/net/arcnet/rfc1201.c index 2303d3a1f4b6..745530651c45 100644 --- a/drivers/net/arcnet/rfc1201.c +++ b/drivers/net/arcnet/rfc1201.c | |||
@@ -92,7 +92,6 @@ static __be16 type_trans(struct sk_buff *skb, struct net_device *dev) | |||
92 | { | 92 | { |
93 | struct archdr *pkt = (struct archdr *) skb->data; | 93 | struct archdr *pkt = (struct archdr *) skb->data; |
94 | struct arc_rfc1201 *soft = &pkt->soft.rfc1201; | 94 | struct arc_rfc1201 *soft = &pkt->soft.rfc1201; |
95 | struct arcnet_local *lp = netdev_priv(dev); | ||
96 | int hdr_size = ARC_HDR_SIZE + RFC1201_HDR_SIZE; | 95 | int hdr_size = ARC_HDR_SIZE + RFC1201_HDR_SIZE; |
97 | 96 | ||
98 | /* Pull off the arcnet header. */ | 97 | /* Pull off the arcnet header. */ |
@@ -121,8 +120,8 @@ static __be16 type_trans(struct sk_buff *skb, struct net_device *dev) | |||
121 | case ARC_P_NOVELL_EC: | 120 | case ARC_P_NOVELL_EC: |
122 | return htons(ETH_P_802_3); | 121 | return htons(ETH_P_802_3); |
123 | default: | 122 | default: |
124 | lp->stats.rx_errors++; | 123 | dev->stats.rx_errors++; |
125 | lp->stats.rx_crc_errors++; | 124 | dev->stats.rx_crc_errors++; |
126 | return 0; | 125 | return 0; |
127 | } | 126 | } |
128 | 127 | ||
@@ -172,8 +171,8 @@ static void rx(struct net_device *dev, int bufnum, | |||
172 | in->sequence, soft->split_flag, soft->sequence); | 171 | in->sequence, soft->split_flag, soft->sequence); |
173 | lp->rfc1201.aborted_seq = soft->sequence; | 172 | lp->rfc1201.aborted_seq = soft->sequence; |
174 | dev_kfree_skb_irq(in->skb); | 173 | dev_kfree_skb_irq(in->skb); |
175 | lp->stats.rx_errors++; | 174 | dev->stats.rx_errors++; |
176 | lp->stats.rx_missed_errors++; | 175 | dev->stats.rx_missed_errors++; |
177 | in->skb = NULL; | 176 | in->skb = NULL; |
178 | } | 177 | } |
179 | in->sequence = soft->sequence; | 178 | in->sequence = soft->sequence; |
@@ -181,7 +180,7 @@ static void rx(struct net_device *dev, int bufnum, | |||
181 | skb = alloc_skb(length + ARC_HDR_SIZE, GFP_ATOMIC); | 180 | skb = alloc_skb(length + ARC_HDR_SIZE, GFP_ATOMIC); |
182 | if (skb == NULL) { | 181 | if (skb == NULL) { |
183 | BUGMSG(D_NORMAL, "Memory squeeze, dropping packet.\n"); | 182 | BUGMSG(D_NORMAL, "Memory squeeze, dropping packet.\n"); |
184 | lp->stats.rx_dropped++; | 183 | dev->stats.rx_dropped++; |
185 | return; | 184 | return; |
186 | } | 185 | } |
187 | skb_put(skb, length + ARC_HDR_SIZE); | 186 | skb_put(skb, length + ARC_HDR_SIZE); |
@@ -213,7 +212,7 @@ static void rx(struct net_device *dev, int bufnum, | |||
213 | BUGMSG(D_EXTRA, | 212 | BUGMSG(D_EXTRA, |
214 | "ARP source address was 00h, set to %02Xh.\n", | 213 | "ARP source address was 00h, set to %02Xh.\n", |
215 | saddr); | 214 | saddr); |
216 | lp->stats.rx_crc_errors++; | 215 | dev->stats.rx_crc_errors++; |
217 | *cptr = saddr; | 216 | *cptr = saddr; |
218 | } else { | 217 | } else { |
219 | BUGMSG(D_DURING, "ARP source address (%Xh) is fine.\n", | 218 | BUGMSG(D_DURING, "ARP source address (%Xh) is fine.\n", |
@@ -222,8 +221,8 @@ static void rx(struct net_device *dev, int bufnum, | |||
222 | } else { | 221 | } else { |
223 | BUGMSG(D_NORMAL, "funny-shaped ARP packet. (%Xh, %Xh)\n", | 222 | BUGMSG(D_NORMAL, "funny-shaped ARP packet. (%Xh, %Xh)\n", |
224 | arp->ar_hln, arp->ar_pln); | 223 | arp->ar_hln, arp->ar_pln); |
225 | lp->stats.rx_errors++; | 224 | dev->stats.rx_errors++; |
226 | lp->stats.rx_crc_errors++; | 225 | dev->stats.rx_crc_errors++; |
227 | } | 226 | } |
228 | } | 227 | } |
229 | BUGLVL(D_SKB) arcnet_dump_skb(dev, skb, "rx"); | 228 | BUGLVL(D_SKB) arcnet_dump_skb(dev, skb, "rx"); |
@@ -257,8 +256,8 @@ static void rx(struct net_device *dev, int bufnum, | |||
257 | soft->split_flag); | 256 | soft->split_flag); |
258 | dev_kfree_skb_irq(in->skb); | 257 | dev_kfree_skb_irq(in->skb); |
259 | in->skb = NULL; | 258 | in->skb = NULL; |
260 | lp->stats.rx_errors++; | 259 | dev->stats.rx_errors++; |
261 | lp->stats.rx_missed_errors++; | 260 | dev->stats.rx_missed_errors++; |
262 | in->lastpacket = in->numpackets = 0; | 261 | in->lastpacket = in->numpackets = 0; |
263 | } | 262 | } |
264 | if (soft->split_flag & 1) { /* first packet in split */ | 263 | if (soft->split_flag & 1) { /* first packet in split */ |
@@ -269,8 +268,8 @@ static void rx(struct net_device *dev, int bufnum, | |||
269 | "(splitflag=%d, seq=%d)\n", | 268 | "(splitflag=%d, seq=%d)\n", |
270 | in->sequence, soft->split_flag, | 269 | in->sequence, soft->split_flag, |
271 | soft->sequence); | 270 | soft->sequence); |
272 | lp->stats.rx_errors++; | 271 | dev->stats.rx_errors++; |
273 | lp->stats.rx_missed_errors++; | 272 | dev->stats.rx_missed_errors++; |
274 | dev_kfree_skb_irq(in->skb); | 273 | dev_kfree_skb_irq(in->skb); |
275 | } | 274 | } |
276 | in->sequence = soft->sequence; | 275 | in->sequence = soft->sequence; |
@@ -281,8 +280,8 @@ static void rx(struct net_device *dev, int bufnum, | |||
281 | BUGMSG(D_EXTRA, "incoming packet more than 16 segments; dropping. (splitflag=%d)\n", | 280 | BUGMSG(D_EXTRA, "incoming packet more than 16 segments; dropping. (splitflag=%d)\n", |
282 | soft->split_flag); | 281 | soft->split_flag); |
283 | lp->rfc1201.aborted_seq = soft->sequence; | 282 | lp->rfc1201.aborted_seq = soft->sequence; |
284 | lp->stats.rx_errors++; | 283 | dev->stats.rx_errors++; |
285 | lp->stats.rx_length_errors++; | 284 | dev->stats.rx_length_errors++; |
286 | return; | 285 | return; |
287 | } | 286 | } |
288 | in->skb = skb = alloc_skb(508 * in->numpackets + ARC_HDR_SIZE, | 287 | in->skb = skb = alloc_skb(508 * in->numpackets + ARC_HDR_SIZE, |
@@ -290,7 +289,7 @@ static void rx(struct net_device *dev, int bufnum, | |||
290 | if (skb == NULL) { | 289 | if (skb == NULL) { |
291 | BUGMSG(D_NORMAL, "(split) memory squeeze, dropping packet.\n"); | 290 | BUGMSG(D_NORMAL, "(split) memory squeeze, dropping packet.\n"); |
292 | lp->rfc1201.aborted_seq = soft->sequence; | 291 | lp->rfc1201.aborted_seq = soft->sequence; |
293 | lp->stats.rx_dropped++; | 292 | dev->stats.rx_dropped++; |
294 | return; | 293 | return; |
295 | } | 294 | } |
296 | skb->dev = dev; | 295 | skb->dev = dev; |
@@ -314,8 +313,8 @@ static void rx(struct net_device *dev, int bufnum, | |||
314 | "first! (splitflag=%d, seq=%d, aborted=%d)\n", | 313 | "first! (splitflag=%d, seq=%d, aborted=%d)\n", |
315 | soft->split_flag, soft->sequence, | 314 | soft->split_flag, soft->sequence, |
316 | lp->rfc1201.aborted_seq); | 315 | lp->rfc1201.aborted_seq); |
317 | lp->stats.rx_errors++; | 316 | dev->stats.rx_errors++; |
318 | lp->stats.rx_missed_errors++; | 317 | dev->stats.rx_missed_errors++; |
319 | } | 318 | } |
320 | return; | 319 | return; |
321 | } | 320 | } |
@@ -325,8 +324,8 @@ static void rx(struct net_device *dev, int bufnum, | |||
325 | if (packetnum <= in->lastpacket - 1) { | 324 | if (packetnum <= in->lastpacket - 1) { |
326 | BUGMSG(D_EXTRA, "duplicate splitpacket ignored! (splitflag=%d)\n", | 325 | BUGMSG(D_EXTRA, "duplicate splitpacket ignored! (splitflag=%d)\n", |
327 | soft->split_flag); | 326 | soft->split_flag); |
328 | lp->stats.rx_errors++; | 327 | dev->stats.rx_errors++; |
329 | lp->stats.rx_frame_errors++; | 328 | dev->stats.rx_frame_errors++; |
330 | return; | 329 | return; |
331 | } | 330 | } |
332 | /* "bad" duplicate, kill reassembly */ | 331 | /* "bad" duplicate, kill reassembly */ |
@@ -336,8 +335,8 @@ static void rx(struct net_device *dev, int bufnum, | |||
336 | lp->rfc1201.aborted_seq = soft->sequence; | 335 | lp->rfc1201.aborted_seq = soft->sequence; |
337 | dev_kfree_skb_irq(in->skb); | 336 | dev_kfree_skb_irq(in->skb); |
338 | in->skb = NULL; | 337 | in->skb = NULL; |
339 | lp->stats.rx_errors++; | 338 | dev->stats.rx_errors++; |
340 | lp->stats.rx_missed_errors++; | 339 | dev->stats.rx_missed_errors++; |
341 | in->lastpacket = in->numpackets = 0; | 340 | in->lastpacket = in->numpackets = 0; |
342 | return; | 341 | return; |
343 | } | 342 | } |
@@ -404,8 +403,8 @@ static int build_header(struct sk_buff *skb, struct net_device *dev, | |||
404 | default: | 403 | default: |
405 | BUGMSG(D_NORMAL, "RFC1201: I don't understand protocol %d (%Xh)\n", | 404 | BUGMSG(D_NORMAL, "RFC1201: I don't understand protocol %d (%Xh)\n", |
406 | type, type); | 405 | type, type); |
407 | lp->stats.tx_errors++; | 406 | dev->stats.tx_errors++; |
408 | lp->stats.tx_aborted_errors++; | 407 | dev->stats.tx_aborted_errors++; |
409 | return 0; | 408 | return 0; |
410 | } | 409 | } |
411 | 410 | ||