|
@@ -538,7 +538,7 @@ static void ath10k_pci_ce_send_done(struct ce_state *ce_state,
|
|
|
if (!compl)
|
|
|
break;
|
|
|
|
|
|
- compl->send_or_recv = HIF_CE_COMPLETE_SEND;
|
|
|
+ compl->state = ATH10K_PCI_COMPL_SEND;
|
|
|
compl->ce_state = ce_state;
|
|
|
compl->pipe_info = pipe_info;
|
|
|
compl->transfer_context = transfer_context;
|
|
@@ -588,7 +588,7 @@ static void ath10k_pci_ce_recv_data(struct ce_state *ce_state,
|
|
|
if (!compl)
|
|
|
break;
|
|
|
|
|
|
- compl->send_or_recv = HIF_CE_COMPLETE_RECV;
|
|
|
+ compl->state = ATH10K_PCI_COMPL_RECV;
|
|
|
compl->ce_state = ce_state;
|
|
|
compl->pipe_info = pipe_info;
|
|
|
compl->transfer_context = transfer_context;
|
|
@@ -810,7 +810,7 @@ static int ath10k_pci_start_ce(struct ath10k *ar)
|
|
|
return -ENOMEM;
|
|
|
}
|
|
|
|
|
|
- compl->send_or_recv = HIF_CE_COMPLETE_FREE;
|
|
|
+ compl->state = ATH10K_PCI_COMPL_FREE;
|
|
|
list_add_tail(&compl->list, &pipe_info->compl_free);
|
|
|
}
|
|
|
}
|
|
@@ -909,12 +909,14 @@ static void ath10k_pci_process_ce(struct ath10k *ar)
|
|
|
list_del(&compl->list);
|
|
|
spin_unlock_bh(&ar_pci->compl_lock);
|
|
|
|
|
|
- if (compl->send_or_recv == HIF_CE_COMPLETE_SEND) {
|
|
|
+ switch (compl->state) {
|
|
|
+ case ATH10K_PCI_COMPL_SEND:
|
|
|
cb->tx_completion(ar,
|
|
|
compl->transfer_context,
|
|
|
compl->transfer_id);
|
|
|
send_done = 1;
|
|
|
- } else {
|
|
|
+ break;
|
|
|
+ case ATH10K_PCI_COMPL_RECV:
|
|
|
ret = ath10k_pci_post_rx_pipe(compl->pipe_info, 1);
|
|
|
if (ret) {
|
|
|
ath10k_warn("Unable to post recv buffer for pipe: %d\n",
|
|
@@ -941,9 +943,17 @@ static void ath10k_pci_process_ce(struct ath10k *ar)
|
|
|
nbytes,
|
|
|
skb->len + skb_tailroom(skb));
|
|
|
}
|
|
|
+ break;
|
|
|
+ case ATH10K_PCI_COMPL_FREE:
|
|
|
+ ath10k_warn("free completion cannot be processed\n");
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ ath10k_warn("invalid completion state (%d)\n",
|
|
|
+ compl->state);
|
|
|
+ break;
|
|
|
}
|
|
|
|
|
|
- compl->send_or_recv = HIF_CE_COMPLETE_FREE;
|
|
|
+ compl->state = ATH10K_PCI_COMPL_FREE;
|
|
|
|
|
|
/*
|
|
|
* Add completion back to the pipe's free list.
|