Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp261869pxy; Wed, 21 Apr 2021 02:18:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPO5MywjNk7BCk+jQFw/lhPuyAAeP4toYPPq3NNaYKXkON3jPDEFJoJTySxJ3JkqPag8LY X-Received: by 2002:a17:906:7016:: with SMTP id n22mr31731127ejj.23.1618996703527; Wed, 21 Apr 2021 02:18:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618996703; cv=none; d=google.com; s=arc-20160816; b=LJwCYj8Hedjg18URk77Ovxv1I0F7rTYFdd+aoqBf6BDK0nE+aO7/v0maH0qGN7ab8P opVgC89WBgZYnqiZ7Mb2x7J8FcLd7E24/isI7P9hvpBA4UOD2j6YZW481Q3eJnOHGvYe 5YDw/fwpn2Zoz1BWIY52dVtFvX39y+m199t1z9lgkL/LmGy7RkQuozw2ExCt+sosMPBM b8AblkKn/cvtuVFgNQng5Pd/MBS51N4O6EqRdanrrmFu4EeOpar0KcM20NDkRHVpC+09 yR5FRMYT4TN7gRnoEHPOb97TqWSaKoxmgx8jjpRY5hgd7I6/1JMo34wUcesASYyOEf9c hCNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from:dmarc-filter :sender:dkim-signature; bh=C15zEg9lT28TsukmTZN4mMcIoCliTgr0gqXl4JqKaYA=; b=GiI05n/RNX5eBZKtzRrkmeAcg2ZdyjIRn+VYtVaSG78vIdZhiOxUdi5Q3wMAVes5q5 L5MI8uNwn9byhlBXQmarOtzEb9PQJ/yZmIhBRFHWmUYmLHq9B7sW9sX8Itq9EcWOKTPH 3CpefcBbcUbrVxVNDem4EF1xz9Y6FODREhHjHlrTC+Y72ogb7xlhevQKMHLE54hLhD7+ afmt4T38x85s6srmUHlFmeCL3D1MXII9ImJUMxeQdrhHeW3XTFPP2XVTqMGC6rBGhnsX ArguvSmLY9YWXGHuAYRIV+tHM2ssIU3miEqhaeSzKrUdnvRnzBqLSfLkGEGWz8MfnlKz u77g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=jM12FpWE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bc6si1447392edb.57.2021.04.21.02.17.58; Wed, 21 Apr 2021 02:18:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=jM12FpWE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237917AbhDUJR0 (ORCPT + 99 others); Wed, 21 Apr 2021 05:17:26 -0400 Received: from so254-9.mailgun.net ([198.61.254.9]:12674 "EHLO so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230516AbhDUJRZ (ORCPT ); Wed, 21 Apr 2021 05:17:25 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1618996612; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=C15zEg9lT28TsukmTZN4mMcIoCliTgr0gqXl4JqKaYA=; b=jM12FpWEvt60uPS2c5KQQDAL5+oIaG3rQWBwfdgzSpbH3kZ4qI/y1KLGrOpsw5mpZ83QeKQ2 FVgJ+bjhlGqaIDGF5my63ZnWys1Z6XWG7cHgpkn0et3Ym+g4MQlpN3Uk/fdLOG0MXh9x+/uD 7trQTYbA9P3MsXpD0rGycwr1IQc= X-Mailgun-Sending-Ip: 198.61.254.9 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n03.prod.us-east-1.postgun.com with SMTP id 607fed6f853c0a2c46c7a107 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Wed, 21 Apr 2021 09:16:31 GMT Sender: zijuhu=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id A7FFDC4323A; Wed, 21 Apr 2021 09:16:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from zijuhu-gv.qualcomm.com (unknown [180.166.53.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: zijuhu) by smtp.codeaurora.org (Postfix) with ESMTPSA id 6475FC433D3; Wed, 21 Apr 2021 09:16:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 6475FC433D3 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=zijuhu@codeaurora.org From: Zijun Hu To: marcel@holtmann.org, johan.hedberg@gmail.com, luiz.dentz@gmail.com Cc: linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, linux-arm-msm@vger.kernel.org, bgodavar@codeaurora.org, c-hbandi@codeaurora.org, hemantg@codeaurora.org, mka@chromium.org, rjliao@codeaurora.org, zijuhu@codeaurora.org, tjiang@codeaurora.org Subject: [PATCH v1] Bluetooth: btusb: use default nvm if boardID is 0 for wcn6855. Date: Wed, 21 Apr 2021 17:16:16 +0800 Message-Id: <1618996576-7743-1-git-send-email-zijuhu@codeaurora.org> X-Mailer: git-send-email 2.7.4 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tim Jiang if boardID is 0, will use the default nvm file without surfix. Signed-off-by: Tim Jiang --- drivers/bluetooth/btusb.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 6f25337..61afea9 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -4138,9 +4138,14 @@ static int btusb_setup_qca_load_nvm(struct hci_dev *hdev, int err; if (((ver->flag >> 8) & 0xff) == QCA_FLAG_MULTI_NVM) { - snprintf(fwname, sizeof(fwname), "qca/nvm_usb_%08x_%04x.bin", - le32_to_cpu(ver->rom_version), - le16_to_cpu(ver->board_id)); + if (le16_to_cpu(ver->board_id) == 0x0) { //if boardid equal 0, use default nvm. + snprintf(fwname, sizeof(fwname), "qca/nvm_usb_%08x.bin", + le32_to_cpu(ver->rom_version)); + } else { + snprintf(fwname, sizeof(fwname), "qca/nvm_usb_%08x_%04x.bin", + le32_to_cpu(ver->rom_version), + le16_to_cpu(ver->board_id)); + } } else { snprintf(fwname, sizeof(fwname), "qca/nvm_usb_%08x.bin", le32_to_cpu(ver->rom_version)); -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project