Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp286947ybx; Wed, 6 Nov 2019 00:10:01 -0800 (PST) X-Google-Smtp-Source: APXvYqx09RKoOT3Usx0VPKgtgUsG2u3rXzYEcjHKka61EPv6X6RjirRQDEZgPM3GNVPaDe04fmtT X-Received: by 2002:aa7:dd13:: with SMTP id i19mr1273725edv.240.1573027801051; Wed, 06 Nov 2019 00:10:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573027801; cv=none; d=google.com; s=arc-20160816; b=UF1bGADwwqcxZFAN5C4T2cwFFPwuZYkoGfzCGD+fHFTHKNOBFRMuASZMZGU3jfmwn7 jTLthqUv/d8xHTbKCI809wtME8FoM4vr6itr54Q9R+vkurbIaxC2dhPadn2/VMz2Xd5B ONzGjJan4DabKJuLSp6KGsK19DY4nv8A8Tv7uRCCAl/ihNoJwXNF4PTiAx2QUzNBMURs 7aHqp/gDhkqM2HPcM0wUTy3kgSoGaecK5wQU3nPQKiwEdzpBJegF1fwcc2k2w3Zdvzl3 /eN/mF3hYdPpCLQZ460co5zM01wQoahc5r1eBFx9tI9thrA0I0rmpT+EmZpSnoc1M/zX a3Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature; bh=GQ7+t/B1bGm/M8DSHXSocodUOsyQ53gV8xPrlHs47a8=; b=YFsoA0ODX3KS06sEnAyR1bokoqwivJLbbULC1sxD5ccOyjeVt1dTDC8obS/Uyvj1Qt RGnB5v29ZA9fEz+H8nmKraqZeDyNajhMDDalHSKpL+2aOh/o5NC0E/Llu0opPTaXm3kq VAgVhc3Y2JHPPZjQld2p08cJrFF0foids+EhTdRaL+Mjhpi8u/bZwhPOuIR3NgGziFgw SvZSbpNYRIA6Ggun8/tjzgLp1Mf+MZBJADH6Ns/hb515KSm6S8Vpu2RwNNiDkbOIrpDL 4nX9RbPZVCgsO08N/8X5lviuoRa0nARCT+oq4agUn1feJBhuNni1VeAWQebqkYJMlzsn RwMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=VMB2FIKp; dkim=pass header.i=@codeaurora.org header.s=default header.b=Kjd7AuVi; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x12si12913158edi.301.2019.11.06.00.09.21; Wed, 06 Nov 2019 00:10:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=VMB2FIKp; dkim=pass header.i=@codeaurora.org header.s=default header.b=Kjd7AuVi; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730271AbfKFIIg (ORCPT + 99 others); Wed, 6 Nov 2019 03:08:36 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:32918 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729986AbfKFIIg (ORCPT ); Wed, 6 Nov 2019 03:08:36 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 0A4E7611FA; Wed, 6 Nov 2019 08:08:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1573027715; bh=Yo8SjkHYjtVRfPkp1PCsQaZra8UH8YIzC2IL8wAokAQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=VMB2FIKpdyZBdj/Gzgg0EPW60ktlEchBic4EaMJey34K57PbxkBAqpzVCppzsgqed 5yj5n03ZLKZRzXEvUyIqAP2W6ElvRfKcluz88VLPT+b5x5njoLRKhuTlpZnw61QVCd W3g/pA8A6ChQYV0Ng/wgNRmFQNLMHT+t5x6y1jaM= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 0F17A611FA; Wed, 6 Nov 2019 08:08:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1573027714; bh=Yo8SjkHYjtVRfPkp1PCsQaZra8UH8YIzC2IL8wAokAQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Kjd7AuVic0Qh7zYpZM8+B10ufNxRXRFu1YkVYV1UH4ckWBzt1b2HedvixzIeG4wIk 4gX5fnjwTQ1CKTZZKPs6gaQev5qPNR9TKNqqqiZCLjfz+5s1jKoUk/NIVzuu6byMnk ZcFHv6z/PC7j1xE+547iGggtVbr3c2G/jsQsaGp8= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 06 Nov 2019 13:38:34 +0530 From: Balakrishna Godavarthi To: Bjorn Andersson Cc: marcel@holtmann.org, johan.hedberg@gmail.com, mka@chromium.org, linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, hemantg@codeaurora.org, linux-arm-msm@vger.kernel.org, tientzu@chromium.org, seanpaul@chromium.org Subject: Re: [PATCH v1 2/2] Bluetooth: hci_qca: Add support for Qualcomm Bluetooth SoC WCN3991 In-Reply-To: <20191105184407.GA1852@minitux> References: <20191105144508.22989-1-bgodavar@codeaurora.org> <20191105144508.22989-3-bgodavar@codeaurora.org> <20191105184407.GA1852@minitux> Message-ID: <739a8cadc6e01971a523d5a0b6fae057@codeaurora.org> X-Sender: bgodavar@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org 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 >> --- >> 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.