diff options
author | Michal Kazior <michal.kazior@tieto.com> | 2013-09-13 08:16:57 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2013-09-16 12:47:46 -0400 |
commit | 7cc23016366e183dcaf23afa4a0dca61ff7f787a (patch) | |
tree | 03204e45c1d898e6b0c4d060f6b372d471c4b0f8 | |
parent | ed54388a38d817dce7fe22e7dc80fc13b1a6838e (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>
-rw-r--r-- | drivers/net/wireless/ath/ath10k/core.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath10k/mac.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath10k/wmi.c | 32 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath10k/wmi.h | 2 |
4 files changed, 0 insertions, 45 deletions
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h index 14b7d3de6883..c2b6a766dabd 100644 --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h | |||
@@ -112,8 +112,6 @@ struct ath10k_wmi { | |||
112 | enum ath10k_htc_ep_id eid; | 112 | enum ath10k_htc_ep_id eid; |
113 | struct completion service_ready; | 113 | struct completion service_ready; |
114 | struct completion unified_ready; | 114 | struct completion unified_ready; |
115 | atomic_t pending_tx_count; | ||
116 | wait_queue_head_t wq; | ||
117 | wait_queue_head_t tx_credits_wq; | 115 | wait_queue_head_t tx_credits_wq; |
118 | 116 | ||
119 | struct sk_buff_head wmi_event_list; | 117 | struct sk_buff_head wmi_event_list; |
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 6c3e9d1f80d9..11aa13e7587f 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c | |||
@@ -1224,8 +1224,6 @@ static void ath10k_bss_disassoc(struct ieee80211_hw *hw, | |||
1224 | /* FIXME: why don't we print error if wmi call fails? */ | 1224 | /* FIXME: why don't we print error if wmi call fails? */ |
1225 | ret = ath10k_wmi_vdev_down(ar, arvif->vdev_id); | 1225 | ret = ath10k_wmi_vdev_down(ar, arvif->vdev_id); |
1226 | 1226 | ||
1227 | ath10k_wmi_flush_tx(ar); | ||
1228 | |||
1229 | arvif->def_wep_key_index = 0; | 1227 | arvif->def_wep_key_index = 0; |
1230 | } | 1228 | } |
1231 | 1229 | ||
@@ -1664,8 +1662,6 @@ static int ath10k_abort_scan(struct ath10k *ar) | |||
1664 | return -EIO; | 1662 | return -EIO; |
1665 | } | 1663 | } |
1666 | 1664 | ||
1667 | ath10k_wmi_flush_tx(ar); | ||
1668 | |||
1669 | ret = wait_for_completion_timeout(&ar->scan.completed, 3*HZ); | 1665 | ret = wait_for_completion_timeout(&ar->scan.completed, 3*HZ); |
1670 | if (ret == 0) | 1666 | if (ret == 0) |
1671 | ath10k_warn("timed out while waiting for scan to stop\n"); | 1667 | ath10k_warn("timed out while waiting for scan to stop\n"); |
@@ -1699,10 +1695,6 @@ static int ath10k_start_scan(struct ath10k *ar, | |||
1699 | if (ret) | 1695 | if (ret) |
1700 | return ret; | 1696 | return ret; |
1701 | 1697 | ||
1702 | /* make sure we submit the command so the completion | ||
1703 | * timeout makes sense */ | ||
1704 | ath10k_wmi_flush_tx(ar); | ||
1705 | |||
1706 | ret = wait_for_completion_timeout(&ar->scan.started, 1*HZ); | 1698 | ret = wait_for_completion_timeout(&ar->scan.started, 1*HZ); |
1707 | if (ret == 0) { | 1699 | if (ret == 0) { |
1708 | ath10k_abort_scan(ar); | 1700 | ath10k_abort_scan(ar); |
@@ -1924,7 +1916,6 @@ static int ath10k_config(struct ieee80211_hw *hw, u32 changed) | |||
1924 | ret = ath10k_monitor_destroy(ar); | 1916 | ret = ath10k_monitor_destroy(ar); |
1925 | } | 1917 | } |
1926 | 1918 | ||
1927 | ath10k_wmi_flush_tx(ar); | ||
1928 | mutex_unlock(&ar->conf_mutex); | 1919 | mutex_unlock(&ar->conf_mutex); |
1929 | return ret; | 1920 | return ret; |
1930 | } | 1921 | } |
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 | ||
26 | void 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 | |||
50 | int ath10k_wmi_wait_for_service_ready(struct ath10k *ar) | 26 | int 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) | |||
85 | static void ath10k_wmi_htc_tx_complete(struct ath10k *ar, struct sk_buff *skb) | 61 | static 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 | ||
93 | static int ath10k_wmi_cmd_send_nowait(struct ath10k *ar, struct sk_buff *skb, | 66 | static 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 | ||
1255 | void ath10k_wmi_detach(struct ath10k *ar) | 1227 | void 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 | } |
diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h index b100431f2241..2c52c23107dd 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.h +++ b/drivers/net/wireless/ath/ath10k/wmi.h | |||
@@ -3044,7 +3044,6 @@ struct wmi_force_fw_hang_cmd { | |||
3044 | 3044 | ||
3045 | #define WMI_MAX_EVENT 0x1000 | 3045 | #define WMI_MAX_EVENT 0x1000 |
3046 | /* Maximum number of pending TXed WMI packets */ | 3046 | /* Maximum number of pending TXed WMI packets */ |
3047 | #define WMI_MAX_PENDING_TX_COUNT 128 | ||
3048 | #define WMI_SKB_HEADROOM sizeof(struct wmi_cmd_hdr) | 3047 | #define WMI_SKB_HEADROOM sizeof(struct wmi_cmd_hdr) |
3049 | 3048 | ||
3050 | /* By default disable power save for IBSS */ | 3049 | /* By default disable power save for IBSS */ |
@@ -3057,7 +3056,6 @@ int ath10k_wmi_attach(struct ath10k *ar); | |||
3057 | void ath10k_wmi_detach(struct ath10k *ar); | 3056 | void ath10k_wmi_detach(struct ath10k *ar); |
3058 | int ath10k_wmi_wait_for_service_ready(struct ath10k *ar); | 3057 | int ath10k_wmi_wait_for_service_ready(struct ath10k *ar); |
3059 | int ath10k_wmi_wait_for_unified_ready(struct ath10k *ar); | 3058 | int ath10k_wmi_wait_for_unified_ready(struct ath10k *ar); |
3060 | void ath10k_wmi_flush_tx(struct ath10k *ar); | ||
3061 | 3059 | ||
3062 | int ath10k_wmi_connect_htc_service(struct ath10k *ar); | 3060 | int ath10k_wmi_connect_htc_service(struct ath10k *ar); |
3063 | int ath10k_wmi_pdev_set_channel(struct ath10k *ar, | 3061 | int ath10k_wmi_pdev_set_channel(struct ath10k *ar, |