aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath10k/wmi.c
diff options
context:
space:
mode:
authorMichal Kazior <michal.kazior@tieto.com>2013-09-13 08:16:57 -0400
committerKalle Valo <kvalo@qca.qualcomm.com>2013-09-16 12:47:46 -0400
commit7cc23016366e183dcaf23afa4a0dca61ff7f787a (patch)
tree03204e45c1d898e6b0c4d060f6b372d471c4b0f8 /drivers/net/wireless/ath/ath10k/wmi.c
parented54388a38d817dce7fe22e7dc80fc13b1a6838e (diff)
ath10k: remove wmi pending count limit
It is no longer used nor necessary since WMI commands can block. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/wmi.c')
-rw-r--r--drivers/net/wireless/ath/ath10k/wmi.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index 9152daea9d96..b29d2b954c0e 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -23,30 +23,6 @@
23#include "wmi.h" 23#include "wmi.h"
24#include "mac.h" 24#include "mac.h"
25 25
26void ath10k_wmi_flush_tx(struct ath10k *ar)
27{
28 int ret;
29
30 lockdep_assert_held(&ar->conf_mutex);
31
32 if (ar->state == ATH10K_STATE_WEDGED) {
33 ath10k_warn("wmi flush skipped - device is wedged anyway\n");
34 return;
35 }
36
37 ret = wait_event_timeout(ar->wmi.wq,
38 atomic_read(&ar->wmi.pending_tx_count) == 0,
39 5*HZ);
40 if (atomic_read(&ar->wmi.pending_tx_count) == 0)
41 return;
42
43 if (ret == 0)
44 ret = -ETIMEDOUT;
45
46 if (ret < 0)
47 ath10k_warn("wmi flush failed (%d)\n", ret);
48}
49
50int ath10k_wmi_wait_for_service_ready(struct ath10k *ar) 26int ath10k_wmi_wait_for_service_ready(struct ath10k *ar)
51{ 27{
52 int ret; 28 int ret;
@@ -85,9 +61,6 @@ static struct sk_buff *ath10k_wmi_alloc_skb(u32 len)
85static void ath10k_wmi_htc_tx_complete(struct ath10k *ar, struct sk_buff *skb) 61static void ath10k_wmi_htc_tx_complete(struct ath10k *ar, struct sk_buff *skb)
86{ 62{
87 dev_kfree_skb(skb); 63 dev_kfree_skb(skb);
88
89 if (atomic_sub_return(1, &ar->wmi.pending_tx_count) == 0)
90 wake_up(&ar->wmi.wq);
91} 64}
92 65
93static int ath10k_wmi_cmd_send_nowait(struct ath10k *ar, struct sk_buff *skb, 66static int ath10k_wmi_cmd_send_nowait(struct ath10k *ar, struct sk_buff *skb,
@@ -1243,7 +1216,6 @@ int ath10k_wmi_attach(struct ath10k *ar)
1243{ 1216{
1244 init_completion(&ar->wmi.service_ready); 1217 init_completion(&ar->wmi.service_ready);
1245 init_completion(&ar->wmi.unified_ready); 1218 init_completion(&ar->wmi.unified_ready);
1246 init_waitqueue_head(&ar->wmi.wq);
1247 init_waitqueue_head(&ar->wmi.tx_credits_wq); 1219 init_waitqueue_head(&ar->wmi.tx_credits_wq);
1248 1220
1249 skb_queue_head_init(&ar->wmi.wmi_event_list); 1221 skb_queue_head_init(&ar->wmi.wmi_event_list);
@@ -1254,10 +1226,6 @@ int ath10k_wmi_attach(struct ath10k *ar)
1254 1226
1255void ath10k_wmi_detach(struct ath10k *ar) 1227void ath10k_wmi_detach(struct ath10k *ar)
1256{ 1228{
1257 /* HTC should've drained the packets already */
1258 if (WARN_ON(atomic_read(&ar->wmi.pending_tx_count) > 0))
1259 ath10k_warn("there are still pending packets\n");
1260
1261 cancel_work_sync(&ar->wmi.wmi_event_work); 1229 cancel_work_sync(&ar->wmi.wmi_event_work);
1262 skb_queue_purge(&ar->wmi.wmi_event_list); 1230 skb_queue_purge(&ar->wmi.wmi_event_list);
1263} 1231}