|
|
@@ -63,7 +63,9 @@ static struct sk_buff *ath10k_htc_build_tx_ctrl_skb(void *ar)
|
|
|
static inline void ath10k_htc_restore_tx_skb(struct ath10k_htc *htc,
|
|
|
struct sk_buff *skb)
|
|
|
{
|
|
|
- ath10k_skb_unmap(htc->ar->dev, skb);
|
|
|
+ struct ath10k_skb_cb *skb_cb = ATH10K_SKB_CB(skb);
|
|
|
+
|
|
|
+ dma_unmap_single(htc->ar->dev, skb_cb->paddr, skb->len, DMA_TO_DEVICE);
|
|
|
skb_pull(skb, sizeof(struct ath10k_htc_hdr));
|
|
|
}
|
|
|
|
|
|
@@ -122,6 +124,8 @@ int ath10k_htc_send(struct ath10k_htc *htc,
|
|
|
struct sk_buff *skb)
|
|
|
{
|
|
|
struct ath10k_htc_ep *ep = &htc->endpoint[eid];
|
|
|
+ struct ath10k_skb_cb *skb_cb = ATH10K_SKB_CB(skb);
|
|
|
+ struct device *dev = htc->ar->dev;
|
|
|
int credits = 0;
|
|
|
int ret;
|
|
|
|
|
|
@@ -157,7 +161,8 @@ int ath10k_htc_send(struct ath10k_htc *htc,
|
|
|
|
|
|
ath10k_htc_prepare_tx_skb(ep, skb);
|
|
|
|
|
|
- ret = ath10k_skb_map(htc->ar->dev, skb);
|
|
|
+ skb_cb->paddr = dma_map_single(dev, skb->data, skb->len, DMA_TO_DEVICE);
|
|
|
+ ret = dma_mapping_error(dev, skb_cb->paddr);
|
|
|
if (ret)
|
|
|
goto err_credits;
|
|
|
|
|
|
@@ -169,7 +174,7 @@ int ath10k_htc_send(struct ath10k_htc *htc,
|
|
|
return 0;
|
|
|
|
|
|
err_unmap:
|
|
|
- ath10k_skb_unmap(htc->ar->dev, skb);
|
|
|
+ dma_unmap_single(dev, skb_cb->paddr, skb->len, DMA_TO_DEVICE);
|
|
|
err_credits:
|
|
|
if (ep->tx_credit_flow_enabled) {
|
|
|
spin_lock_bh(&htc->tx_lock);
|