diff options
author | Nicholas Mc Guire <der.herr@hofr.at> | 2015-01-08 07:27:34 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2015-01-13 09:19:59 -0500 |
commit | 38e2a644174e74f948ec4415ae5b5c76f1412b0e (patch) | |
tree | 250fa81bc6fd1c503b2c5aafddc527fe163a11fd | |
parent | 49274332a43a70b3a3f40ba6db14d9c0677e8e02 (diff) |
ath10k: fixup wait_for_completion_timeout return handling
wait_for_completion_timeout does not return negative values so the tests
for <= 0 are not needed and the case differentiation in the error handling
path unnecessary.
Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-rw-r--r-- | drivers/net/wireless/ath/ath10k/debug.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath10k/htc.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath10k/htt.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath10k/mac.c | 2 |
4 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c index 6ca24427e184..42b2e49b2836 100644 --- a/drivers/net/wireless/ath/ath10k/debug.c +++ b/drivers/net/wireless/ath/ath10k/debug.c | |||
@@ -371,7 +371,7 @@ static int ath10k_debug_fw_stats_request(struct ath10k *ar) | |||
371 | 371 | ||
372 | ret = wait_for_completion_timeout(&ar->debug.fw_stats_complete, | 372 | ret = wait_for_completion_timeout(&ar->debug.fw_stats_complete, |
373 | 1*HZ); | 373 | 1*HZ); |
374 | if (ret <= 0) | 374 | if (ret == 0) |
375 | return -ETIMEDOUT; | 375 | return -ETIMEDOUT; |
376 | 376 | ||
377 | spin_lock_bh(&ar->data_lock); | 377 | spin_lock_bh(&ar->data_lock); |
diff --git a/drivers/net/wireless/ath/ath10k/htc.c b/drivers/net/wireless/ath/ath10k/htc.c index f1946a6be442..2fd9e180272b 100644 --- a/drivers/net/wireless/ath/ath10k/htc.c +++ b/drivers/net/wireless/ath/ath10k/htc.c | |||
@@ -703,11 +703,9 @@ int ath10k_htc_connect_service(struct ath10k_htc *htc, | |||
703 | /* wait for response */ | 703 | /* wait for response */ |
704 | status = wait_for_completion_timeout(&htc->ctl_resp, | 704 | status = wait_for_completion_timeout(&htc->ctl_resp, |
705 | ATH10K_HTC_CONN_SVC_TIMEOUT_HZ); | 705 | ATH10K_HTC_CONN_SVC_TIMEOUT_HZ); |
706 | if (status <= 0) { | 706 | if (status == 0) { |
707 | if (status == 0) | ||
708 | status = -ETIMEDOUT; | ||
709 | ath10k_err(ar, "Service connect timeout: %d\n", status); | 707 | ath10k_err(ar, "Service connect timeout: %d\n", status); |
710 | return status; | 708 | return -ETIMEDOUT; |
711 | } | 709 | } |
712 | 710 | ||
713 | /* we controlled the buffer creation, it's aligned */ | 711 | /* we controlled the buffer creation, it's aligned */ |
diff --git a/drivers/net/wireless/ath/ath10k/htt.c b/drivers/net/wireless/ath/ath10k/htt.c index ceec76426070..4f59ab923e48 100644 --- a/drivers/net/wireless/ath/ath10k/htt.c +++ b/drivers/net/wireless/ath/ath10k/htt.c | |||
@@ -101,7 +101,7 @@ int ath10k_htt_setup(struct ath10k_htt *htt) | |||
101 | 101 | ||
102 | status = wait_for_completion_timeout(&htt->target_version_received, | 102 | status = wait_for_completion_timeout(&htt->target_version_received, |
103 | HTT_TARGET_VERSION_TIMEOUT_HZ); | 103 | HTT_TARGET_VERSION_TIMEOUT_HZ); |
104 | if (status <= 0) { | 104 | if (status == 0) { |
105 | ath10k_warn(ar, "htt version request timed out\n"); | 105 | ath10k_warn(ar, "htt version request timed out\n"); |
106 | return -ETIMEDOUT; | 106 | return -ETIMEDOUT; |
107 | } | 107 | } |
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index c7febfc9c68f..b403cba0afc1 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c | |||
@@ -2228,7 +2228,7 @@ void ath10k_offchan_tx_work(struct work_struct *work) | |||
2228 | 2228 | ||
2229 | ret = wait_for_completion_timeout(&ar->offchan_tx_completed, | 2229 | ret = wait_for_completion_timeout(&ar->offchan_tx_completed, |
2230 | 3 * HZ); | 2230 | 3 * HZ); |
2231 | if (ret <= 0) | 2231 | if (ret == 0) |
2232 | ath10k_warn(ar, "timed out waiting for offchannel skb %p\n", | 2232 | ath10k_warn(ar, "timed out waiting for offchannel skb %p\n", |
2233 | skb); | 2233 | skb); |
2234 | 2234 | ||