Hi Jorn,
On 2019-11-06 00:14, Bjorn Andersson wrote:
On Tue 05 Nov 06:45 PST 2019, Balakrishna Godavarthi wrote:
This patch add support for WCN3991 i.e. current values and fw download
support.
Signed-off-by: Balakrishna Godavarthi <bgodavar@xxxxxxxxxxxxxx>
---
drivers/bluetooth/btqca.c | 68
+++++++++++++++++++++++++++++--------
drivers/bluetooth/btqca.h | 10 ++++--
drivers/bluetooth/hci_qca.c | 16 +++++++--
3 files changed, 74 insertions(+), 20 deletions(-)
diff --git a/drivers/bluetooth/btqca.c b/drivers/bluetooth/btqca.c
[..]
@@ -48,13 +62,16 @@ int qca_read_soc_version(struct hci_dev *hdev, u32
*soc_version)
}
if (edl->cresp != EDL_CMD_REQ_RES_EVT ||
- edl->rtype != EDL_APP_VER_RES_EVT) {
+ edl->rtype != rtype) {
bt_dev_err(hdev, "QCA Wrong packet received %d %d", edl->cresp,
edl->rtype);
err = -EIO;
goto out;
}
+ if (soc_type == QCA_WCN3991)
+ memcpy(&edl->data, &edl->data[1], sizeof(*ver));
memcpy() shouldn't be used when the two memory regions are overlapping,
use memmove() for this.
[Bala]: will update
[..]
diff --git a/drivers/bluetooth/btqca.h b/drivers/bluetooth/btqca.h
index 7f7a2b2c0df6..309a720ff216 100644
--- a/drivers/bluetooth/btqca.h
+++ b/drivers/bluetooth/btqca.h
@@ -126,6 +126,7 @@ enum qca_btsoc_type {
QCA_ROME,
QCA_WCN3990,
QCA_WCN3998,
+ QCA_WCN3991,
Please maintain sort order.
[Bala]: will update
[..]
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
[..]
@@ -1663,6 +1674,7 @@ static const struct of_device_id
qca_bluetooth_of_match[] = {
{ .compatible = "qcom,qca6174-bt" },
{ .compatible = "qcom,wcn3990-bt", .data = &qca_soc_data_wcn3990},
{ .compatible = "qcom,wcn3998-bt", .data = &qca_soc_data_wcn3998},
+ { .compatible = "qcom,wcn3991-bt", .data = &qca_soc_data_wcn3991},
Ditto
[Bala]: will update
Regards,
Bjorn
--
Regards
Balakrishna.