mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-20 02:34:23 +08:00
mwifiex: update tx_pkts_queued for requeued packets
wmm.tx_pkts_queued and ralist's total_pkt_count should be updated in synchronization. They were not correctly updated in mwifiex_send_processed_packet(). Signed-off-by: Xinming Hu <huxm@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
a936ea5436
commit
77f486c8bb
@ -1334,9 +1334,11 @@ mwifiex_send_processed_packet(struct mwifiex_private *priv,
|
|||||||
skb = skb_dequeue(&ptr->skb_head);
|
skb = skb_dequeue(&ptr->skb_head);
|
||||||
|
|
||||||
if (adapter->data_sent || adapter->tx_lock_flag) {
|
if (adapter->data_sent || adapter->tx_lock_flag) {
|
||||||
|
ptr->total_pkt_count--;
|
||||||
spin_unlock_irqrestore(&priv->wmm.ra_list_spinlock,
|
spin_unlock_irqrestore(&priv->wmm.ra_list_spinlock,
|
||||||
ra_list_flags);
|
ra_list_flags);
|
||||||
skb_queue_tail(&adapter->tx_data_q, skb);
|
skb_queue_tail(&adapter->tx_data_q, skb);
|
||||||
|
atomic_dec(&priv->wmm.tx_pkts_queued);
|
||||||
atomic_inc(&adapter->tx_queued);
|
atomic_inc(&adapter->tx_queued);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1394,6 +1396,10 @@ mwifiex_send_processed_packet(struct mwifiex_private *priv,
|
|||||||
if (ret != -EBUSY) {
|
if (ret != -EBUSY) {
|
||||||
mwifiex_rotate_priolists(priv, ptr, ptr_index);
|
mwifiex_rotate_priolists(priv, ptr, ptr_index);
|
||||||
atomic_dec(&priv->wmm.tx_pkts_queued);
|
atomic_dec(&priv->wmm.tx_pkts_queued);
|
||||||
|
spin_lock_irqsave(&priv->wmm.ra_list_spinlock, ra_list_flags);
|
||||||
|
ptr->total_pkt_count--;
|
||||||
|
spin_unlock_irqrestore(&priv->wmm.ra_list_spinlock,
|
||||||
|
ra_list_flags);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user