diff options
Diffstat (limited to 'drivers/net/shaper.c')
-rw-r--r-- | drivers/net/shaper.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/net/shaper.c b/drivers/net/shaper.c index b56721a68a85..315feba7dacc 100644 --- a/drivers/net/shaper.c +++ b/drivers/net/shaper.c | |||
@@ -171,7 +171,7 @@ static int shaper_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
171 | */ | 171 | */ |
172 | if(time_after(SHAPERCB(skb)->shapeclock,jiffies + SHAPER_LATENCY)) { | 172 | if(time_after(SHAPERCB(skb)->shapeclock,jiffies + SHAPER_LATENCY)) { |
173 | dev_kfree_skb(skb); | 173 | dev_kfree_skb(skb); |
174 | shaper->stats.tx_dropped++; | 174 | dev->stats.tx_dropped++; |
175 | } else | 175 | } else |
176 | skb_queue_tail(&shaper->sendq, skb); | 176 | skb_queue_tail(&shaper->sendq, skb); |
177 | } | 177 | } |
@@ -182,7 +182,7 @@ static int shaper_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
182 | { | 182 | { |
183 | ptr=skb_dequeue(&shaper->sendq); | 183 | ptr=skb_dequeue(&shaper->sendq); |
184 | dev_kfree_skb(ptr); | 184 | dev_kfree_skb(ptr); |
185 | shaper->stats.collisions++; | 185 | dev->stats.collisions++; |
186 | } | 186 | } |
187 | shaper_kick(shaper); | 187 | shaper_kick(shaper); |
188 | spin_unlock(&shaper->lock); | 188 | spin_unlock(&shaper->lock); |
@@ -207,8 +207,8 @@ static void shaper_queue_xmit(struct shaper *shaper, struct sk_buff *skb) | |||
207 | shaper->dev->name,newskb->priority); | 207 | shaper->dev->name,newskb->priority); |
208 | dev_queue_xmit(newskb); | 208 | dev_queue_xmit(newskb); |
209 | 209 | ||
210 | shaper->stats.tx_bytes += skb->len; | 210 | shaper->dev->stats.tx_bytes += skb->len; |
211 | shaper->stats.tx_packets++; | 211 | shaper->dev->stats.tx_packets++; |
212 | 212 | ||
213 | if(sh_debug) | 213 | if(sh_debug) |
214 | printk("Kicked new frame out.\n"); | 214 | printk("Kicked new frame out.\n"); |
@@ -330,12 +330,6 @@ static int shaper_close(struct net_device *dev) | |||
330 | * ARP and other resolutions and not before. | 330 | * ARP and other resolutions and not before. |
331 | */ | 331 | */ |
332 | 332 | ||
333 | static struct net_device_stats *shaper_get_stats(struct net_device *dev) | ||
334 | { | ||
335 | struct shaper *sh=dev->priv; | ||
336 | return &sh->stats; | ||
337 | } | ||
338 | |||
339 | static int shaper_header(struct sk_buff *skb, struct net_device *dev, | 333 | static int shaper_header(struct sk_buff *skb, struct net_device *dev, |
340 | unsigned short type, void *daddr, void *saddr, unsigned len) | 334 | unsigned short type, void *daddr, void *saddr, unsigned len) |
341 | { | 335 | { |
@@ -538,7 +532,6 @@ static void __init shaper_setup(struct net_device *dev) | |||
538 | dev->open = shaper_open; | 532 | dev->open = shaper_open; |
539 | dev->stop = shaper_close; | 533 | dev->stop = shaper_close; |
540 | dev->hard_start_xmit = shaper_start_xmit; | 534 | dev->hard_start_xmit = shaper_start_xmit; |
541 | dev->get_stats = shaper_get_stats; | ||
542 | dev->set_multicast_list = NULL; | 535 | dev->set_multicast_list = NULL; |
543 | 536 | ||
544 | /* | 537 | /* |