Commit e6f597a1425b5af64917be3448b29e2d5a585ac8
Committed by
Linus Torvalds
1 parent
6845a44a31
Exists in
master
and in
7 other branches
staging: fix build failure in bcm driver
While building latest Linus git, I hit the following: CC [M] drivers/staging/bcm/Qos.o drivers/staging/bcm/Qos.c: In function ‘PruneQueue’: drivers/staging/bcm/Qos.c:367: error: ‘struct netdev_queue’ has no member named ‘tx_dropped’ drivers/staging/bcm/Qos.c: In function ‘flush_all_queues’: drivers/staging/bcm/Qos.c:416: error: ‘struct netdev_queue’ has no member named ‘tx_dropped’ make[5]: *** [drivers/staging/bcm/Qos.o] Error 1 make[4]: *** [drivers/staging/bcm] Error 2 make[3]: *** [drivers/staging] Error 2 As well as: CC [M] drivers/staging/bcm/Transmit.o drivers/staging/bcm/Transmit.c: In function ‘SetupNextSend’: drivers/staging/bcm/Transmit.c:163: error: ‘struct netdev_queue’ has no member named ‘tx_bytes’ drivers/staging/bcm/Transmit.c:164: error: ‘struct netdev_queue’ has no member named ‘tx_packets’ make[2]: *** [drivers/staging/bcm/Transmit.o] Error 1 tx_dropped/tx_bytes_tx_packets were removed in commit 1ac9ad13. This patch converts bcm to use net_device_stats instead of netdev_queue. Acked-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Andres Salomon <dilinger@queued.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 2 changed files with 6 additions and 7 deletions Side-by-side Diff
drivers/staging/bcm/Qos.c
... | ... | @@ -359,12 +359,11 @@ |
359 | 359 | |
360 | 360 | if(PacketToDrop) |
361 | 361 | { |
362 | - struct netdev_queue *txq = netdev_get_tx_queue(Adapter->dev, iIndex); | |
363 | 362 | if (netif_msg_tx_err(Adapter)) |
364 | 363 | pr_info(PFX "%s: tx queue %d overlimit\n", |
365 | 364 | Adapter->dev->name, iIndex); |
366 | 365 | |
367 | - txq->tx_dropped++; | |
366 | + netstats->tx_dropped++; | |
368 | 367 | |
369 | 368 | DEQUEUEPACKET(Adapter->PackInfo[iIndex].FirstTxQueue, |
370 | 369 | Adapter->PackInfo[iIndex].LastTxQueue); |
... | ... | @@ -404,7 +403,7 @@ |
404 | 403 | // down(&Adapter->data_packet_queue_lock); |
405 | 404 | for(iQIndex=LowPriority; iQIndex<HiPriority; iQIndex++) |
406 | 405 | { |
407 | - struct netdev_queue *txq = netdev_get_tx_queue(Adapter->dev, iQIndex); | |
406 | + struct net_device_stats *netstats = &Adapter->dev->stats; | |
408 | 407 | |
409 | 408 | spin_lock_bh(&Adapter->PackInfo[iQIndex].SFQueueLock); |
410 | 409 | while(Adapter->PackInfo[iQIndex].FirstTxQueue) |
... | ... | @@ -413,7 +412,7 @@ |
413 | 412 | if(PacketToDrop) |
414 | 413 | { |
415 | 414 | uiTotalPacketLength = PacketToDrop->len; |
416 | - txq->tx_dropped++; | |
415 | + netstats->tx_dropped++; | |
417 | 416 | } |
418 | 417 | else |
419 | 418 | uiTotalPacketLength = 0; |
drivers/staging/bcm/Transmit.c
... | ... | @@ -157,11 +157,11 @@ |
157 | 157 | } |
158 | 158 | else |
159 | 159 | { |
160 | - struct netdev_queue *txq = netdev_get_tx_queue(Adapter->dev, QueueIndex); | |
160 | + struct net_device_stats *netstats = &Adapter->dev->stats; | |
161 | 161 | Adapter->PackInfo[QueueIndex].uiTotalTxBytes += Leader.PLength; |
162 | 162 | |
163 | - txq->tx_bytes += Leader.PLength; | |
164 | - ++txq->tx_packets; | |
163 | + netstats->tx_bytes += Leader.PLength; | |
164 | + ++netstats->tx_packets; | |
165 | 165 | |
166 | 166 | Adapter->PackInfo[QueueIndex].uiCurrentTokenCount -= Leader.PLength << 3; |
167 | 167 | Adapter->PackInfo[QueueIndex].uiSentBytes += (Packet->len); |