提交 e59d16c0 编写于 作者: V Vladimir Kondratiev 提交者: Kalle Valo

wil6210: avoid Tx descriptor double write

Non-cacheable Tx descriptor for the last fragment of
multi-fragment frame used to be written back twice.

Refactor code to always write non-cacheable descriptor
only once
Signed-off-by: NVladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
上级 a3c74902
...@@ -981,8 +981,6 @@ static int wil_tx_vring(struct wil6210_priv *wil, struct vring *vring, ...@@ -981,8 +981,6 @@ static int wil_tx_vring(struct wil6210_priv *wil, struct vring *vring,
vring->ctx[i].nr_frags = nr_frags; vring->ctx[i].nr_frags = nr_frags;
wil_tx_desc_set_nr_frags(d, nr_frags); wil_tx_desc_set_nr_frags(d, nr_frags);
if (nr_frags)
*_d = *d;
/* middle segments */ /* middle segments */
for (; f < nr_frags; f++) { for (; f < nr_frags; f++) {
...@@ -990,6 +988,7 @@ static int wil_tx_vring(struct wil6210_priv *wil, struct vring *vring, ...@@ -990,6 +988,7 @@ static int wil_tx_vring(struct wil6210_priv *wil, struct vring *vring,
&skb_shinfo(skb)->frags[f]; &skb_shinfo(skb)->frags[f];
int len = skb_frag_size(frag); int len = skb_frag_size(frag);
*_d = *d;
i = (swhead + f + 1) % vring->size; i = (swhead + f + 1) % vring->size;
_d = &vring->va[i].tx; _d = &vring->va[i].tx;
pa = skb_frag_dma_map(dev, frag, 0, skb_frag_size(frag), pa = skb_frag_dma_map(dev, frag, 0, skb_frag_size(frag),
...@@ -1003,7 +1002,6 @@ static int wil_tx_vring(struct wil6210_priv *wil, struct vring *vring, ...@@ -1003,7 +1002,6 @@ static int wil_tx_vring(struct wil6210_priv *wil, struct vring *vring,
* it will succeed here too * it will succeed here too
*/ */
wil_tx_desc_offload_cksum_set(wil, d, skb); wil_tx_desc_offload_cksum_set(wil, d, skb);
*_d = *d;
} }
/* for the last seg only */ /* for the last seg only */
d->dma.d0 |= BIT(DMA_CFG_DESC_TX_0_CMD_EOP_POS); d->dma.d0 |= BIT(DMA_CFG_DESC_TX_0_CMD_EOP_POS);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册