diff options
Diffstat (limited to 'net/sched/sch_teql.c')
-rw-r--r-- | net/sched/sch_teql.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/net/sched/sch_teql.c b/net/sched/sch_teql.c index 3b6418297231..9c002b6e0533 100644 --- a/net/sched/sch_teql.c +++ b/net/sched/sch_teql.c | |||
@@ -58,7 +58,6 @@ struct teql_master | |||
58 | struct net_device *dev; | 58 | struct net_device *dev; |
59 | struct Qdisc *slaves; | 59 | struct Qdisc *slaves; |
60 | struct list_head master_list; | 60 | struct list_head master_list; |
61 | struct net_device_stats stats; | ||
62 | }; | 61 | }; |
63 | 62 | ||
64 | struct teql_sched_data | 63 | struct teql_sched_data |
@@ -223,7 +222,7 @@ __teql_resolve(struct sk_buff *skb, struct sk_buff *skb_res, struct net_device * | |||
223 | { | 222 | { |
224 | struct netdev_queue *dev_queue = netdev_get_tx_queue(dev, 0); | 223 | struct netdev_queue *dev_queue = netdev_get_tx_queue(dev, 0); |
225 | struct teql_sched_data *q = qdisc_priv(dev_queue->qdisc); | 224 | struct teql_sched_data *q = qdisc_priv(dev_queue->qdisc); |
226 | struct neighbour *mn = skb->dst->neighbour; | 225 | struct neighbour *mn = skb_dst(skb)->neighbour; |
227 | struct neighbour *n = q->ncache; | 226 | struct neighbour *n = q->ncache; |
228 | 227 | ||
229 | if (mn->tbl == NULL) | 228 | if (mn->tbl == NULL) |
@@ -263,8 +262,8 @@ static inline int teql_resolve(struct sk_buff *skb, | |||
263 | return -ENODEV; | 262 | return -ENODEV; |
264 | 263 | ||
265 | if (dev->header_ops == NULL || | 264 | if (dev->header_ops == NULL || |
266 | skb->dst == NULL || | 265 | skb_dst(skb) == NULL || |
267 | skb->dst->neighbour == NULL) | 266 | skb_dst(skb)->neighbour == NULL) |
268 | return 0; | 267 | return 0; |
269 | return __teql_resolve(skb, skb_res, dev); | 268 | return __teql_resolve(skb, skb_res, dev); |
270 | } | 269 | } |
@@ -272,6 +271,7 @@ static inline int teql_resolve(struct sk_buff *skb, | |||
272 | static int teql_master_xmit(struct sk_buff *skb, struct net_device *dev) | 271 | static int teql_master_xmit(struct sk_buff *skb, struct net_device *dev) |
273 | { | 272 | { |
274 | struct teql_master *master = netdev_priv(dev); | 273 | struct teql_master *master = netdev_priv(dev); |
274 | struct netdev_queue *txq = netdev_get_tx_queue(dev, 0); | ||
275 | struct Qdisc *start, *q; | 275 | struct Qdisc *start, *q; |
276 | int busy; | 276 | int busy; |
277 | int nores; | 277 | int nores; |
@@ -308,11 +308,12 @@ restart: | |||
308 | if (!netif_tx_queue_stopped(slave_txq) && | 308 | if (!netif_tx_queue_stopped(slave_txq) && |
309 | !netif_tx_queue_frozen(slave_txq) && | 309 | !netif_tx_queue_frozen(slave_txq) && |
310 | slave_ops->ndo_start_xmit(skb, slave) == 0) { | 310 | slave_ops->ndo_start_xmit(skb, slave) == 0) { |
311 | txq_trans_update(slave_txq); | ||
311 | __netif_tx_unlock(slave_txq); | 312 | __netif_tx_unlock(slave_txq); |
312 | master->slaves = NEXT_SLAVE(q); | 313 | master->slaves = NEXT_SLAVE(q); |
313 | netif_wake_queue(dev); | 314 | netif_wake_queue(dev); |
314 | master->stats.tx_packets++; | 315 | txq->tx_packets++; |
315 | master->stats.tx_bytes += length; | 316 | txq->tx_bytes += length; |
316 | return 0; | 317 | return 0; |
317 | } | 318 | } |
318 | __netif_tx_unlock(slave_txq); | 319 | __netif_tx_unlock(slave_txq); |
@@ -337,12 +338,12 @@ restart: | |||
337 | 338 | ||
338 | if (busy) { | 339 | if (busy) { |
339 | netif_stop_queue(dev); | 340 | netif_stop_queue(dev); |
340 | return 1; | 341 | return NETDEV_TX_BUSY; |
341 | } | 342 | } |
342 | master->stats.tx_errors++; | 343 | dev->stats.tx_errors++; |
343 | 344 | ||
344 | drop: | 345 | drop: |
345 | master->stats.tx_dropped++; | 346 | txq->tx_dropped++; |
346 | dev_kfree_skb(skb); | 347 | dev_kfree_skb(skb); |
347 | return 0; | 348 | return 0; |
348 | } | 349 | } |
@@ -395,12 +396,6 @@ static int teql_master_close(struct net_device *dev) | |||
395 | return 0; | 396 | return 0; |
396 | } | 397 | } |
397 | 398 | ||
398 | static struct net_device_stats *teql_master_stats(struct net_device *dev) | ||
399 | { | ||
400 | struct teql_master *m = netdev_priv(dev); | ||
401 | return &m->stats; | ||
402 | } | ||
403 | |||
404 | static int teql_master_mtu(struct net_device *dev, int new_mtu) | 399 | static int teql_master_mtu(struct net_device *dev, int new_mtu) |
405 | { | 400 | { |
406 | struct teql_master *m = netdev_priv(dev); | 401 | struct teql_master *m = netdev_priv(dev); |
@@ -425,7 +420,6 @@ static const struct net_device_ops teql_netdev_ops = { | |||
425 | .ndo_open = teql_master_open, | 420 | .ndo_open = teql_master_open, |
426 | .ndo_stop = teql_master_close, | 421 | .ndo_stop = teql_master_close, |
427 | .ndo_start_xmit = teql_master_xmit, | 422 | .ndo_start_xmit = teql_master_xmit, |
428 | .ndo_get_stats = teql_master_stats, | ||
429 | .ndo_change_mtu = teql_master_mtu, | 423 | .ndo_change_mtu = teql_master_mtu, |
430 | }; | 424 | }; |
431 | 425 | ||