diff options
author | Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> | 2015-02-01 03:55:12 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-02-03 08:36:33 -0500 |
commit | e59d16c08b3aa147f5c3c664d5dfda77fa93a827 (patch) | |
tree | 3adc3a02a8068ebb07f14f15ab82f09934e7a647 /drivers/net/wireless | |
parent | a3c74902082c0e77aaf1065b5489867508db44ca (diff) |
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: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath/wil6210/txrx.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/wil6210/txrx.c b/drivers/net/wireless/ath/wil6210/txrx.c index 24c4b9a6a004..e37cab1c5a53 100644 --- a/drivers/net/wireless/ath/wil6210/txrx.c +++ b/drivers/net/wireless/ath/wil6210/txrx.c | |||
@@ -981,8 +981,6 @@ static int wil_tx_vring(struct wil6210_priv *wil, struct vring *vring, | |||
981 | 981 | ||
982 | vring->ctx[i].nr_frags = nr_frags; | 982 | vring->ctx[i].nr_frags = nr_frags; |
983 | wil_tx_desc_set_nr_frags(d, nr_frags); | 983 | wil_tx_desc_set_nr_frags(d, nr_frags); |
984 | if (nr_frags) | ||
985 | *_d = *d; | ||
986 | 984 | ||
987 | /* middle segments */ | 985 | /* middle segments */ |
988 | for (; f < nr_frags; f++) { | 986 | for (; f < nr_frags; f++) { |
@@ -990,6 +988,7 @@ static int wil_tx_vring(struct wil6210_priv *wil, struct vring *vring, | |||
990 | &skb_shinfo(skb)->frags[f]; | 988 | &skb_shinfo(skb)->frags[f]; |
991 | int len = skb_frag_size(frag); | 989 | int len = skb_frag_size(frag); |
992 | 990 | ||
991 | *_d = *d; | ||
993 | i = (swhead + f + 1) % vring->size; | 992 | i = (swhead + f + 1) % vring->size; |
994 | _d = &vring->va[i].tx; | 993 | _d = &vring->va[i].tx; |
995 | pa = skb_frag_dma_map(dev, frag, 0, skb_frag_size(frag), | 994 | 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 | * it will succeed here too | 1002 | * it will succeed here too |
1004 | */ | 1003 | */ |
1005 | wil_tx_desc_offload_cksum_set(wil, d, skb); | 1004 | wil_tx_desc_offload_cksum_set(wil, d, skb); |
1006 | *_d = *d; | ||
1007 | } | 1005 | } |
1008 | /* for the last seg only */ | 1006 | /* for the last seg only */ |
1009 | d->dma.d0 |= BIT(DMA_CFG_DESC_TX_0_CMD_EOP_POS); | 1007 | d->dma.d0 |= BIT(DMA_CFG_DESC_TX_0_CMD_EOP_POS); |