summaryrefslogtreecommitdiffstats
path: root/drivers/staging/bcm/Qos.c
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-11-01 13:34:35 -0400
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-11-01 13:53:30 -0400
commitcacd92222dd4e04424fa532cf1a222e67c30709b (patch)
treea43d689fc5988d5714c93b87f500445df34323b7 /drivers/staging/bcm/Qos.c
parentb5ebd85b2bcc0c0a2171e4cc74c61debdc903ddf (diff)
downloadlinux-cacd92222dd4e04424fa532cf1a222e67c30709b.tar.bz2
beceem: statistics and transmit queue changes
Use standard network statistics variables and routines. Transmit counters are per queue, and skb mapping is already in skb and does not need to be recomputed. Move SearchVcId to only place it is used. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Diffstat (limited to 'drivers/staging/bcm/Qos.c')
-rw-r--r--drivers/staging/bcm/Qos.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/staging/bcm/Qos.c b/drivers/staging/bcm/Qos.c
index e4d5a67c8c6b..88ec3b20742d 100644
--- a/drivers/staging/bcm/Qos.c
+++ b/drivers/staging/bcm/Qos.c
@@ -359,12 +359,13 @@ static VOID PruneQueue(PMINI_ADAPTER Adapter, INT iIndex)
if(PacketToDrop)
{
+ struct netdev_queue *txq = netdev_get_tx_queue(Adapter->dev, iIndex);
if (netif_msg_tx_err(Adapter))
pr_info(PFX "%s: tx queue %d overlimit\n",
Adapter->dev->name, iIndex);
- netstats->tx_dropped++;
- atomic_inc(&Adapter->TxDroppedPacketCount);
+ txq->tx_dropped++;
+
DEQUEUEPACKET(Adapter->PackInfo[iIndex].FirstTxQueue,
Adapter->PackInfo[iIndex].LastTxQueue);
/// update current bytes and packets count
@@ -397,14 +398,15 @@ VOID flush_all_queues(PMINI_ADAPTER Adapter)
{
INT iQIndex;
UINT uiTotalPacketLength;
- struct sk_buff* PacketToDrop=NULL;
- struct net_device_stats* netstats=&Adapter->dev->stats;
+ struct sk_buff* PacketToDrop=NULL;
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, DUMP_INFO, DBG_LVL_ALL, "=====>");
// down(&Adapter->data_packet_queue_lock);
for(iQIndex=LowPriority; iQIndex<HiPriority; iQIndex++)
{
+ struct netdev_queue *txq = netdev_get_tx_queue(Adapter->dev, iQIndex);
+
spin_lock_bh(&Adapter->PackInfo[iQIndex].SFQueueLock);
while(Adapter->PackInfo[iQIndex].FirstTxQueue)
{
@@ -412,8 +414,7 @@ VOID flush_all_queues(PMINI_ADAPTER Adapter)
if(PacketToDrop)
{
uiTotalPacketLength = PacketToDrop->len;
- netstats->tx_dropped++;
- atomic_inc(&Adapter->TxDroppedPacketCount);
+ txq->tx_dropped++;
}
else
uiTotalPacketLength = 0;