diff options
author | Michal Kazior <michal.kazior@tieto.com> | 2014-11-27 05:09:37 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2014-12-01 02:13:36 -0500 |
commit | d84a512dca23c4330be4d4ffaf29b4d49438f12e (patch) | |
tree | d89c971966030bcd7083db497d8f127cab902a74 | |
parent | 5f07ea4c3a9ae3277ac3bfdbc6df5814e800ad66 (diff) |
ath10k: remove transfer_id from ath10k_hif_cb::tx_completion
Pass the eid argument via skbuff control buffer.
This will make it possible to work with queues of
HTC event buffers.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-rw-r--r-- | drivers/net/wireless/ath/ath10k/core.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath10k/hif.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath10k/htc.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath10k/pci.c | 4 |
4 files changed, 11 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h index 5af9a24ae143..514c219263a5 100644 --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h | |||
@@ -79,6 +79,7 @@ static inline const char *ath10k_bus_str(enum ath10k_bus bus) | |||
79 | 79 | ||
80 | struct ath10k_skb_cb { | 80 | struct ath10k_skb_cb { |
81 | dma_addr_t paddr; | 81 | dma_addr_t paddr; |
82 | u8 eid; | ||
82 | u8 vdev_id; | 83 | u8 vdev_id; |
83 | 84 | ||
84 | struct { | 85 | struct { |
diff --git a/drivers/net/wireless/ath/ath10k/hif.h b/drivers/net/wireless/ath/ath10k/hif.h index 91d24a546efa..0c92e0251e84 100644 --- a/drivers/net/wireless/ath/ath10k/hif.h +++ b/drivers/net/wireless/ath/ath10k/hif.h | |||
@@ -32,8 +32,7 @@ struct ath10k_hif_sg_item { | |||
32 | 32 | ||
33 | struct ath10k_hif_cb { | 33 | struct ath10k_hif_cb { |
34 | int (*tx_completion)(struct ath10k *ar, | 34 | int (*tx_completion)(struct ath10k *ar, |
35 | struct sk_buff *wbuf, | 35 | struct sk_buff *wbuf); |
36 | unsigned transfer_id); | ||
37 | int (*rx_completion)(struct ath10k *ar, | 36 | int (*rx_completion)(struct ath10k *ar, |
38 | struct sk_buff *wbuf); | 37 | struct sk_buff *wbuf); |
39 | }; | 38 | }; |
diff --git a/drivers/net/wireless/ath/ath10k/htc.c b/drivers/net/wireless/ath/ath10k/htc.c index e245e34f9f1c..f1946a6be442 100644 --- a/drivers/net/wireless/ath/ath10k/htc.c +++ b/drivers/net/wireless/ath/ath10k/htc.c | |||
@@ -160,6 +160,7 @@ int ath10k_htc_send(struct ath10k_htc *htc, | |||
160 | 160 | ||
161 | ath10k_htc_prepare_tx_skb(ep, skb); | 161 | ath10k_htc_prepare_tx_skb(ep, skb); |
162 | 162 | ||
163 | skb_cb->eid = eid; | ||
163 | skb_cb->paddr = dma_map_single(dev, skb->data, skb->len, DMA_TO_DEVICE); | 164 | skb_cb->paddr = dma_map_single(dev, skb->data, skb->len, DMA_TO_DEVICE); |
164 | ret = dma_mapping_error(dev, skb_cb->paddr); | 165 | ret = dma_mapping_error(dev, skb_cb->paddr); |
165 | if (ret) | 166 | if (ret) |
@@ -197,15 +198,18 @@ err_pull: | |||
197 | } | 198 | } |
198 | 199 | ||
199 | static int ath10k_htc_tx_completion_handler(struct ath10k *ar, | 200 | static int ath10k_htc_tx_completion_handler(struct ath10k *ar, |
200 | struct sk_buff *skb, | 201 | struct sk_buff *skb) |
201 | unsigned int eid) | ||
202 | { | 202 | { |
203 | struct ath10k_htc *htc = &ar->htc; | 203 | struct ath10k_htc *htc = &ar->htc; |
204 | struct ath10k_htc_ep *ep = &htc->endpoint[eid]; | 204 | struct ath10k_skb_cb *skb_cb; |
205 | struct ath10k_htc_ep *ep; | ||
205 | 206 | ||
206 | if (WARN_ON_ONCE(!skb)) | 207 | if (WARN_ON_ONCE(!skb)) |
207 | return 0; | 208 | return 0; |
208 | 209 | ||
210 | skb_cb = ATH10K_SKB_CB(skb); | ||
211 | ep = &htc->endpoint[skb_cb->eid]; | ||
212 | |||
209 | ath10k_htc_notify_tx_completion(ep, skb); | 213 | ath10k_htc_notify_tx_completion(ep, skb); |
210 | /* the skb now belongs to the completion handler */ | 214 | /* the skb now belongs to the completion handler */ |
211 | 215 | ||
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c index 541f3bc497a9..95e90668f67c 100644 --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c | |||
@@ -835,7 +835,7 @@ static void ath10k_pci_ce_send_done(struct ath10k_ce_pipe *ce_state) | |||
835 | if (transfer_context == NULL) | 835 | if (transfer_context == NULL) |
836 | continue; | 836 | continue; |
837 | 837 | ||
838 | cb->tx_completion(ar, transfer_context, transfer_id); | 838 | cb->tx_completion(ar, transfer_context); |
839 | } | 839 | } |
840 | } | 840 | } |
841 | 841 | ||
@@ -1263,7 +1263,7 @@ static void ath10k_pci_tx_pipe_cleanup(struct ath10k_pci_pipe *pci_pipe) | |||
1263 | id = MS(__le16_to_cpu(ce_desc[i].flags), | 1263 | id = MS(__le16_to_cpu(ce_desc[i].flags), |
1264 | CE_DESC_FLAGS_META_DATA); | 1264 | CE_DESC_FLAGS_META_DATA); |
1265 | 1265 | ||
1266 | ar_pci->msg_callbacks_current.tx_completion(ar, skb, id); | 1266 | ar_pci->msg_callbacks_current.tx_completion(ar, skb); |
1267 | } | 1267 | } |
1268 | } | 1268 | } |
1269 | 1269 | ||