aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRajkumar Manoharan <rmanohar@qti.qualcomm.com>2015-10-12 08:57:06 -0400
committerKalle Valo <kvalo@qca.qualcomm.com>2015-10-16 08:49:41 -0400
commit400143e45d39fcedb5106c3aa212746a80a61f7c (patch)
treecb43d079a513dcdbeb9cb037d22cc16c79fce13d
parent0da64f19f01a6dabc4a55c1ee9cef430fcb47f4a (diff)
ath10k: remove htc polling for tx completion
Since polling for tx completion is handled whenever target to host messages are received, removing the unnecessary polling mechanism for send completion at HTC level. Reviewed-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-rw-r--r--drivers/net/wireless/ath/ath10k/hif.h9
-rw-r--r--drivers/net/wireless/ath/ath10k/htc.c26
-rw-r--r--drivers/net/wireless/ath/ath10k/htc.h1
-rw-r--r--drivers/net/wireless/ath/ath10k/pci.c14
4 files changed, 7 insertions, 43 deletions
diff --git a/drivers/net/wireless/ath/ath10k/hif.h b/drivers/net/wireless/ath/ath10k/hif.h
index 633594cd54fa..89e7076c919f 100644
--- a/drivers/net/wireless/ath/ath10k/hif.h
+++ b/drivers/net/wireless/ath/ath10k/hif.h
@@ -58,8 +58,7 @@ struct ath10k_hif_ops {
58 void (*stop)(struct ath10k *ar); 58 void (*stop)(struct ath10k *ar);
59 59
60 int (*map_service_to_pipe)(struct ath10k *ar, u16 service_id, 60 int (*map_service_to_pipe)(struct ath10k *ar, u16 service_id,
61 u8 *ul_pipe, u8 *dl_pipe, 61 u8 *ul_pipe, u8 *dl_pipe);
62 int *ul_is_polled);
63 62
64 void (*get_default_pipe)(struct ath10k *ar, u8 *ul_pipe, u8 *dl_pipe); 63 void (*get_default_pipe)(struct ath10k *ar, u8 *ul_pipe, u8 *dl_pipe);
65 64
@@ -132,12 +131,10 @@ static inline void ath10k_hif_stop(struct ath10k *ar)
132 131
133static inline int ath10k_hif_map_service_to_pipe(struct ath10k *ar, 132static inline int ath10k_hif_map_service_to_pipe(struct ath10k *ar,
134 u16 service_id, 133 u16 service_id,
135 u8 *ul_pipe, u8 *dl_pipe, 134 u8 *ul_pipe, u8 *dl_pipe)
136 int *ul_is_polled)
137{ 135{
138 return ar->hif.ops->map_service_to_pipe(ar, service_id, 136 return ar->hif.ops->map_service_to_pipe(ar, service_id,
139 ul_pipe, dl_pipe, 137 ul_pipe, dl_pipe);
140 ul_is_polled);
141} 138}
142 139
143static inline void ath10k_hif_get_default_pipe(struct ath10k *ar, 140static inline void ath10k_hif_get_default_pipe(struct ath10k *ar,
diff --git a/drivers/net/wireless/ath/ath10k/htc.c b/drivers/net/wireless/ath/ath10k/htc.c
index 20e0c48f7eef..5b3c6bcf9598 100644
--- a/drivers/net/wireless/ath/ath10k/htc.c
+++ b/drivers/net/wireless/ath/ath10k/htc.c
@@ -23,16 +23,6 @@
23/* Send */ 23/* Send */
24/********/ 24/********/
25 25
26static inline void ath10k_htc_send_complete_check(struct ath10k_htc_ep *ep,
27 int force)
28{
29 /*
30 * Check whether HIF has any prior sends that have finished,
31 * have not had the post-processing done.
32 */
33 ath10k_hif_send_complete_check(ep->htc->ar, ep->ul_pipe_id, force);
34}
35
36static void ath10k_htc_control_tx_complete(struct ath10k *ar, 26static void ath10k_htc_control_tx_complete(struct ath10k *ar,
37 struct sk_buff *skb) 27 struct sk_buff *skb)
38{ 28{
@@ -328,15 +318,6 @@ void ath10k_htc_rx_completion_handler(struct ath10k *ar, struct sk_buff *skb)
328 318
329 ep = &htc->endpoint[eid]; 319 ep = &htc->endpoint[eid];
330 320
331 /*
332 * If this endpoint that received a message from the target has
333 * a to-target HIF pipe whose send completions are polled rather
334 * than interrupt-driven, this is a good point to ask HIF to check
335 * whether it has any completed sends to handle.
336 */
337 if (ep->ul_is_polled)
338 ath10k_htc_send_complete_check(ep, 1);
339
340 payload_len = __le16_to_cpu(hdr->len); 321 payload_len = __le16_to_cpu(hdr->len);
341 322
342 if (payload_len + sizeof(*hdr) > ATH10K_HTC_MAX_LEN) { 323 if (payload_len + sizeof(*hdr) > ATH10K_HTC_MAX_LEN) {
@@ -758,8 +739,7 @@ setup:
758 status = ath10k_hif_map_service_to_pipe(htc->ar, 739 status = ath10k_hif_map_service_to_pipe(htc->ar,
759 ep->service_id, 740 ep->service_id,
760 &ep->ul_pipe_id, 741 &ep->ul_pipe_id,
761 &ep->dl_pipe_id, 742 &ep->dl_pipe_id);
762 &ep->ul_is_polled);
763 if (status) 743 if (status)
764 return status; 744 return status;
765 745
@@ -768,10 +748,6 @@ setup:
768 htc_service_name(ep->service_id), ep->ul_pipe_id, 748 htc_service_name(ep->service_id), ep->ul_pipe_id,
769 ep->dl_pipe_id, ep->eid); 749 ep->dl_pipe_id, ep->eid);
770 750
771 ath10k_dbg(ar, ATH10K_DBG_BOOT,
772 "boot htc ep %d ul polled %d\n",
773 ep->eid, ep->ul_is_polled);
774
775 if (disable_credit_flow_ctrl && ep->tx_credit_flow_enabled) { 751 if (disable_credit_flow_ctrl && ep->tx_credit_flow_enabled) {
776 ep->tx_credit_flow_enabled = false; 752 ep->tx_credit_flow_enabled = false;
777 ath10k_dbg(ar, ATH10K_DBG_BOOT, 753 ath10k_dbg(ar, ATH10K_DBG_BOOT,
diff --git a/drivers/net/wireless/ath/ath10k/htc.h b/drivers/net/wireless/ath/ath10k/htc.h
index 2ddd41e75be7..e70aa38e6e05 100644
--- a/drivers/net/wireless/ath/ath10k/htc.h
+++ b/drivers/net/wireless/ath/ath10k/htc.h
@@ -312,7 +312,6 @@ struct ath10k_htc_ep {
312 int max_ep_message_len; 312 int max_ep_message_len;
313 u8 ul_pipe_id; 313 u8 ul_pipe_id;
314 u8 dl_pipe_id; 314 u8 dl_pipe_id;
315 int ul_is_polled; /* call HIF to get tx completions */
316 315
317 u8 seq_no; /* for debugging */ 316 u8 seq_no; /* for debugging */
318 int tx_credits; 317 int tx_credits;
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index c5875bb1b9cf..adcda2815b73 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -1402,9 +1402,8 @@ static void ath10k_pci_kill_tasklet(struct ath10k *ar)
1402 del_timer_sync(&ar_pci->rx_post_retry); 1402 del_timer_sync(&ar_pci->rx_post_retry);
1403} 1403}
1404 1404
1405static int ath10k_pci_hif_map_service_to_pipe(struct ath10k *ar, 1405static int ath10k_pci_hif_map_service_to_pipe(struct ath10k *ar, u16 service_id,
1406 u16 service_id, u8 *ul_pipe, 1406 u8 *ul_pipe, u8 *dl_pipe)
1407 u8 *dl_pipe, int *ul_is_polled)
1408{ 1407{
1409 const struct service_to_pipe *entry; 1408 const struct service_to_pipe *entry;
1410 bool ul_set = false, dl_set = false; 1409 bool ul_set = false, dl_set = false;
@@ -1445,24 +1444,17 @@ static int ath10k_pci_hif_map_service_to_pipe(struct ath10k *ar,
1445 if (WARN_ON(!ul_set || !dl_set)) 1444 if (WARN_ON(!ul_set || !dl_set))
1446 return -ENOENT; 1445 return -ENOENT;
1447 1446
1448 *ul_is_polled =
1449 (host_ce_config_wlan[*ul_pipe].flags & CE_ATTR_DIS_INTR) != 0;
1450
1451 return 0; 1447 return 0;
1452} 1448}
1453 1449
1454static void ath10k_pci_hif_get_default_pipe(struct ath10k *ar, 1450static void ath10k_pci_hif_get_default_pipe(struct ath10k *ar,
1455 u8 *ul_pipe, u8 *dl_pipe) 1451 u8 *ul_pipe, u8 *dl_pipe)
1456{ 1452{
1457 int ul_is_polled;
1458
1459 ath10k_dbg(ar, ATH10K_DBG_PCI, "pci hif get default pipe\n"); 1453 ath10k_dbg(ar, ATH10K_DBG_PCI, "pci hif get default pipe\n");
1460 1454
1461 (void)ath10k_pci_hif_map_service_to_pipe(ar, 1455 (void)ath10k_pci_hif_map_service_to_pipe(ar,
1462 ATH10K_HTC_SVC_ID_RSVD_CTRL, 1456 ATH10K_HTC_SVC_ID_RSVD_CTRL,
1463 ul_pipe, 1457 ul_pipe, dl_pipe);
1464 dl_pipe,
1465 &ul_is_polled);
1466} 1458}
1467 1459
1468static void ath10k_pci_irq_msi_fw_mask(struct ath10k *ar) 1460static void ath10k_pci_irq_msi_fw_mask(struct ath10k *ar)