* [PATCH] ath10k: fix HTT op backwards compatibility for QCA6174
@ 2015-03-30 11:14 Kalle Valo
2015-03-30 11:25 ` Michal Kazior
2015-03-30 11:57 ` Kalle Valo
0 siblings, 2 replies; 4+ messages in thread
From: Kalle Valo @ 2015-03-30 11:14 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless
Commit 8348db298496 ("ath10k: add ATH10K_FW_IE_HTT_OP_VERSION") broke QCA6174
receive side as the HTT ids from ATH10K_FW_HTT_OP_VERSION_MAIN don't have
HTT_TLV_T2H_MSG_TYPE_RX_IN_ORD_PADDR_IND set. Fix this by adding a backwards
compatibility code which sets HTT op version if it's not set by the firmare
image.
Fixes: 8348db298496 ("ath10k: add ATH10K_FW_IE_HTT_OP_VERSION")
Reported-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath10k/core.c | 23 +++++++++++++++++++++++
drivers/net/wireless/ath/ath10k/htt.c | 2 +-
2 files changed, 24 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 1c74585d9256..47f7e7116448 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -998,6 +998,29 @@ static int ath10k_core_init_firmware_features(struct ath10k *ar)
return -EINVAL;
}
+ /* Backwards compatibility for firmwares without
+ * ATH10K_FW_IE_HTT_OP_VERSION.
+ */
+ if (ar->htt.op_version == ATH10K_FW_HTT_OP_VERSION_UNSET) {
+ switch (ar->wmi.op_version) {
+ case ATH10K_FW_WMI_OP_VERSION_MAIN:
+ ar->htt.op_version = ATH10K_FW_HTT_OP_VERSION_MAIN;
+ break;
+ case ATH10K_FW_WMI_OP_VERSION_10_1:
+ case ATH10K_FW_WMI_OP_VERSION_10_2:
+ case ATH10K_FW_WMI_OP_VERSION_10_2_4:
+ ar->htt.op_version = ATH10K_FW_HTT_OP_VERSION_10_1;
+ break;
+ case ATH10K_FW_WMI_OP_VERSION_TLV:
+ ar->htt.op_version = ATH10K_FW_HTT_OP_VERSION_TLV;
+ break;
+ case ATH10K_FW_WMI_OP_VERSION_UNSET:
+ case ATH10K_FW_WMI_OP_VERSION_MAX:
+ WARN_ON(1);
+ return -EINVAL;
+ }
+ }
+
return 0;
}
diff --git a/drivers/net/wireless/ath/ath10k/htt.c b/drivers/net/wireless/ath/ath10k/htt.c
index f782d76c3886..6da6ef26143a 100644
--- a/drivers/net/wireless/ath/ath10k/htt.c
+++ b/drivers/net/wireless/ath/ath10k/htt.c
@@ -156,11 +156,11 @@ int ath10k_htt_init(struct ath10k *ar)
ar->htt.t2h_msg_types_max = HTT_TLV_T2H_NUM_MSGS;
break;
case ATH10K_FW_HTT_OP_VERSION_MAIN:
- case ATH10K_FW_HTT_OP_VERSION_UNSET:
ar->htt.t2h_msg_types = htt_main_t2h_msg_types;
ar->htt.t2h_msg_types_max = HTT_MAIN_T2H_NUM_MSGS;
break;
case ATH10K_FW_HTT_OP_VERSION_MAX:
+ case ATH10K_FW_HTT_OP_VERSION_UNSET:
WARN_ON(1);
return -EINVAL;
}
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] ath10k: fix HTT op backwards compatibility for QCA6174 2015-03-30 11:14 [PATCH] ath10k: fix HTT op backwards compatibility for QCA6174 Kalle Valo @ 2015-03-30 11:25 ` Michal Kazior 2015-03-30 11:46 ` Kalle Valo 2015-03-30 11:57 ` Kalle Valo 1 sibling, 1 reply; 4+ messages in thread From: Michal Kazior @ 2015-03-30 11:25 UTC (permalink / raw) To: Kalle Valo; +Cc: linux-wireless, ath10k@lists.infradead.org On 30 March 2015 at 13:14, Kalle Valo <kvalo@qca.qualcomm.com> wrote: > Commit 8348db298496 ("ath10k: add ATH10K_FW_IE_HTT_OP_VERSION") broke QCA6174 > receive side as the HTT ids from ATH10K_FW_HTT_OP_VERSION_MAIN don't have > HTT_TLV_T2H_MSG_TYPE_RX_IN_ORD_PADDR_IND set. Fix this by adding a backwards > compatibility code which sets HTT op version if it's not set by the firmare s/firmare/firmware/ > image. > > Fixes: 8348db298496 ("ath10k: add ATH10K_FW_IE_HTT_OP_VERSION") > Reported-by: Michal Kazior <michal.kazior@tieto.com> > Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Tested-by: Michal Kazior <michal.kazior@tieto.com> Michał _______________________________________________ ath10k mailing list ath10k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath10k ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ath10k: fix HTT op backwards compatibility for QCA6174 2015-03-30 11:25 ` Michal Kazior @ 2015-03-30 11:46 ` Kalle Valo 0 siblings, 0 replies; 4+ messages in thread From: Kalle Valo @ 2015-03-30 11:46 UTC (permalink / raw) To: Michal Kazior; +Cc: linux-wireless, ath10k@lists.infradead.org Michal Kazior <michal.kazior@tieto.com> writes: > On 30 March 2015 at 13:14, Kalle Valo <kvalo@qca.qualcomm.com> wrote: >> Commit 8348db298496 ("ath10k: add ATH10K_FW_IE_HTT_OP_VERSION") broke QCA6174 >> receive side as the HTT ids from ATH10K_FW_HTT_OP_VERSION_MAIN don't have >> HTT_TLV_T2H_MSG_TYPE_RX_IN_ORD_PADDR_IND set. Fix this by adding a backwards >> compatibility code which sets HTT op version if it's not set by the firmare > > s/firmare/firmware/ Fixed. >> image. >> >> Fixes: 8348db298496 ("ath10k: add ATH10K_FW_IE_HTT_OP_VERSION") >> Reported-by: Michal Kazior <michal.kazior@tieto.com> >> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> > > Tested-by: Michal Kazior <michal.kazior@tieto.com> Thanks! And sorry for this. -- Kalle Valo _______________________________________________ ath10k mailing list ath10k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath10k ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ath10k: fix HTT op backwards compatibility for QCA6174 2015-03-30 11:14 [PATCH] ath10k: fix HTT op backwards compatibility for QCA6174 Kalle Valo 2015-03-30 11:25 ` Michal Kazior @ 2015-03-30 11:57 ` Kalle Valo 1 sibling, 0 replies; 4+ messages in thread From: Kalle Valo @ 2015-03-30 11:57 UTC (permalink / raw) To: ath10k; +Cc: linux-wireless Kalle Valo <kvalo@qca.qualcomm.com> writes: > Commit 8348db298496 ("ath10k: add ATH10K_FW_IE_HTT_OP_VERSION") broke QCA6174 > receive side as the HTT ids from ATH10K_FW_HTT_OP_VERSION_MAIN don't have > HTT_TLV_T2H_MSG_TYPE_RX_IN_ORD_PADDR_IND set. Fix this by adding a backwards > compatibility code which sets HTT op version if it's not set by the firmare > image. > > Fixes: 8348db298496 ("ath10k: add ATH10K_FW_IE_HTT_OP_VERSION") > Reported-by: Michal Kazior <michal.kazior@tieto.com> > Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Applied. -- Kalle Valo _______________________________________________ ath10k mailing list ath10k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath10k ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-03-30 11:58 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-03-30 11:14 [PATCH] ath10k: fix HTT op backwards compatibility for QCA6174 Kalle Valo 2015-03-30 11:25 ` Michal Kazior 2015-03-30 11:46 ` Kalle Valo 2015-03-30 11:57 ` Kalle Valo
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox