diff options
author | Michal Kazior <michal.kazior@tieto.com> | 2015-03-11 14:37:11 +0100 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2015-03-19 15:53:16 +0200 |
commit | 5dc0f1db41df905c19f95bb7809940f2debf0aef (patch) | |
tree | 29f2459702e37497e900ec56a6ba30d7940c344b /drivers/net/wireless/ath/ath10k/htc.c | |
parent | 7e47e8e30f2ae10473eafbe8eaad4a0d17b3e656 (diff) | |
download | linux-5dc0f1db41df905c19f95bb7809940f2debf0aef.tar.gz linux-5dc0f1db41df905c19f95bb7809940f2debf0aef.tar.bz2 linux-5dc0f1db41df905c19f95bb7809940f2debf0aef.zip |
ath10k: protect driver from unsolicited htc ep0 events
Some firmware revisions (tested with qca6174
rm2.0-00088) deliver unsolicited unknown (kind of
garbled) HTC ep0 event to host in some cases.
This issue was mainly observed with both qca988x
and qca6174 being installed on a single host
system. During driver probing if qca6174 booting
sequences were somehow deferred (e.g. by qca988x
implicitly making some resources busy presumably)
the unsolicited event would came around 1s after
ATH10K_HTC_MSG_READY_ID was delivered to host for
qca6174.
The unsolicited event would confuse driver and
cause HTT initialization (and subsequently
driver probing) to fail.
Make the ep0 event processing more robust. The
event will still be caught but instead will
only generate a warning now.
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/htc.c')
-rw-r--r-- | drivers/net/wireless/ath/ath10k/htc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath10k/htc.c b/drivers/net/wireless/ath/ath10k/htc.c index 2fd9e180272b..d33d5c4397f6 100644 --- a/drivers/net/wireless/ath/ath10k/htc.c +++ b/drivers/net/wireless/ath/ath10k/htc.c @@ -414,7 +414,8 @@ static int ath10k_htc_rx_completion_handler(struct ath10k *ar, struct ath10k_htc_msg *msg = (struct ath10k_htc_msg *)skb->data; switch (__le16_to_cpu(msg->hdr.message_id)) { - default: + case ATH10K_HTC_MSG_READY_ID: + case ATH10K_HTC_MSG_CONNECT_SERVICE_RESP_ID: /* handle HTC control message */ if (completion_done(&htc->ctl_resp)) { /* @@ -438,6 +439,10 @@ static int ath10k_htc_rx_completion_handler(struct ath10k *ar, break; case ATH10K_HTC_MSG_SEND_SUSPEND_COMPLETE: htc->htc_ops.target_send_suspend_complete(ar); + break; + default: + ath10k_warn(ar, "ignoring unsolicited htc ep0 event\n"); + break; } goto out; } |