Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2549220pxm; Mon, 28 Feb 2022 01:02:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJxHOGH8Z448AbSyUa7P2Ut6Ey1Gr3G0pKkYIZY/uWZoW3HviHCrLku+Nby/gvyWssfnM6Ox X-Received: by 2002:a17:902:7086:b0:14f:ee29:5ef0 with SMTP id z6-20020a170902708600b0014fee295ef0mr19217980plk.142.1646038978904; Mon, 28 Feb 2022 01:02:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646038978; cv=none; d=google.com; s=arc-20160816; b=vaFvlp430p6nMoZtkX2zXDRBGEoWmQ8ixH+HHbub+AAZldlFwE4EYZXqQgjxzZ89AV Hjo33RInqQ+Zn7oZi/Ui75rxFfTbYMt2pzCyxvIZH2tNv0/5C+y8jpYvpOygxK7vqRAq 4Q7JX/D0aoA6k3bSzBwyuVNPaqRtrebVGaKmQvbF/Szh83iHYQG1PnjAxw1Kx/Yj7qIF LCdgfKpKkaCqL/zn9Qg3N2pGW6WORTABMJF25myHPMXCKqPMxTabup/HA6rI+31jmjH+ ypfE32+PFGCtw+Pi1YKI9VX9Hl7GBHbF2DFOHU/qLY2l5BUGy59+V3IJJ+jqOgDSBrX6 y99Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from; bh=8HKPCl9a51vnaHBT+wA+qZFuGB3TwojblqM5YUQG2ek=; b=nF/SuY5Vh6Hab7Z5b+QkxdPZ02IWmJCYr6adCxP24c4N0S/KR7o08fOhvFCBbTJnq+ yhH+5tn+tOb9nxHlj4QRvH9compase/Pu8riV0vnzAIW0J2gDQ4LJvKCaGoY6vvOZ3er UQVFuHIGkCV9t6ON7jTcbmAmBt6FEz2nU0KAg37QRP7npxuPHWCsKVglAazZGp2UFU9p LANYUhfMTJuoaC6cp4V/HlBMGuFjvQPP14LFiPdab3zbPuzgw6CELtL0v5xsmGxn/Dp7 duf0G396auA/3Q7GDrllmkghojB7b9nbrl1R9MqqoRTWYgFdPxtPscSTfBBqbdDAKyM2 +GSg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mh13-20020a17090b4acd00b001bccfaa0461si9208509pjb.173.2022.02.28.01.02.43; Mon, 28 Feb 2022 01:02:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234100AbiB1IyO (ORCPT + 99 others); Mon, 28 Feb 2022 03:54:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229634AbiB1IyM (ORCPT ); Mon, 28 Feb 2022 03:54:12 -0500 Received: from smtpbgbr2.qq.com (smtpbgbr2.qq.com [54.207.22.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D0C8BA1 for ; Mon, 28 Feb 2022 00:53:31 -0800 (PST) X-QQ-mid: bizesmtp65t1646038403tua3280w Received: from localhost.localdomain (unknown [58.240.82.166]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 28 Feb 2022 16:53:17 +0800 (CST) X-QQ-SSF: 01400000002000C0F000C00A0000000 X-QQ-FEAT: SD+t2IR+F7O+YhhETfxAYyN2jG/VLDjQ8rddYiB6TdZ9/1JUCMC2Y+I+yAWG3 Ehx7ULKn/eqJypYXTr2Z8BaJZpmnZuADiefGszrQzSxTuURZd2QQfqwfeoYNplapcj21T7/ NC19q5RGFmDcGzaz+CTnQtuB8TBdZ2n+htJ+4lWfJ9xBjVmLvphnUQGNgAFwUjGt52iCQ9P LyrLeHIiYWCSZfeTXWOXUQiD40lZJM2lIlMkCBJqb1QtwP8H9XpaCK46NY6Ca/CAbFSnS87 uSyMrb5GQyjCgAWkuiRpYINyNPNZXfXwFPrTa6V0v5Dx/ILuySJ2PMb4zGUen/VQCjeYYmM DYLv03a7zCb22x9AJSyr4bL06ppgHR6yoSAAtc5N/wtR6RQvbD1d5PIAoOI1w== X-QQ-GoodBg: 2 From: Meng Tang To: marcel@holtmann.org, johan.hedberg@gmail.com, luiz.dentz@gmail.com Cc: linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, Meng Tang Subject: [PATCH] Bluetooth: btrtl: Fix incorrect bin loading by MODULE_FIRMWARE Date: Mon, 28 Feb 2022 16:53:16 +0800 Message-Id: <20220228085316.26856-1-tangmeng@uniontech.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:uniontech.com:qybgforeign:qybgforeign2 X-QQ-Bgrelay: 1 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In brctl, there are some problems which are as follows: 1. The bin name of MODULE_FIRMWARE is incorrect or the bin does not exist. 2. The bin used in ic_id_table have not added MODULE_FIRMWARE declarations. 3. Sorting confusion. Thus, modify incorrect bin names and delete some non-existing bin names, add MODULE_FIRMWARE for bins that used in ic_id_table and sort by MODULE_FIRMWARE(ctl_bt/*.bin). Signed-off-by: Meng Tang --- drivers/bluetooth/btrtl.c | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c index c2030f7e25b4..e34b0a29f230 100644 --- a/drivers/bluetooth/btrtl.c +++ b/drivers/bluetooth/btrtl.c @@ -88,14 +88,14 @@ static const struct id_table ic_id_table[] = { .config_needed = true, .has_rom_version = true, .fw_name = "rtl_bt/rtl8723bs_fw.bin", - .cfg_name = "rtl_bt/rtl8723bs_config" }, + .cfg_name = "rtl_bt/rtl8723bs_config-OBDA8723" }, /* 8723B */ { IC_INFO(RTL_ROM_LMP_8723B, 0xb, 0x6, HCI_USB), .config_needed = false, .has_rom_version = true, .fw_name = "rtl_bt/rtl8723b_fw.bin", - .cfg_name = "rtl_bt/rtl8723b_config" }, + .cfg_name = NULL }, /* 8723D */ { IC_INFO(RTL_ROM_LMP_8723B, 0xd, 0x8, HCI_USB), @@ -104,19 +104,12 @@ static const struct id_table ic_id_table[] = { .fw_name = "rtl_bt/rtl8723d_fw.bin", .cfg_name = "rtl_bt/rtl8723d_config" }, - /* 8723DS */ - { IC_INFO(RTL_ROM_LMP_8723B, 0xd, 0x8, HCI_UART), - .config_needed = true, - .has_rom_version = true, - .fw_name = "rtl_bt/rtl8723ds_fw.bin", - .cfg_name = "rtl_bt/rtl8723ds_config" }, - /* 8821A */ { IC_INFO(RTL_ROM_LMP_8821A, 0xa, 0x6, HCI_USB), .config_needed = false, .has_rom_version = true, .fw_name = "rtl_bt/rtl8821a_fw.bin", - .cfg_name = "rtl_bt/rtl8821a_config" }, + .cfg_name = NULL }, /* 8821C */ { IC_INFO(RTL_ROM_LMP_8821A, 0xc, 0x8, HCI_USB), @@ -131,7 +124,7 @@ static const struct id_table ic_id_table[] = { .config_needed = false, .has_rom_version = true, .fw_name = "rtl_bt/rtl8761a_fw.bin", - .cfg_name = "rtl_bt/rtl8761a_config" }, + .cfg_name = NULL }, /* 8761B */ { IC_INFO(RTL_ROM_LMP_8761A, 0xb, 0xa, HCI_UART), @@ -922,15 +915,23 @@ MODULE_LICENSE("GPL"); MODULE_FIRMWARE("rtl_bt/rtl8723a_fw.bin"); MODULE_FIRMWARE("rtl_bt/rtl8723b_fw.bin"); MODULE_FIRMWARE("rtl_bt/rtl8723b_config.bin"); +MODULE_FIRMWARE("rtl_bt/rtl8723bs_config-OBDA8723.bin"); MODULE_FIRMWARE("rtl_bt/rtl8723bs_fw.bin"); -MODULE_FIRMWARE("rtl_bt/rtl8723bs_config.bin"); -MODULE_FIRMWARE("rtl_bt/rtl8723ds_fw.bin"); -MODULE_FIRMWARE("rtl_bt/rtl8723ds_config.bin"); +MODULE_FIRMWARE("rtl_bt/rtl8723d_config.bin"); +MODULE_FIRMWARE("rtl_bt/rtl8723d_fw.bin"); MODULE_FIRMWARE("rtl_bt/rtl8761a_fw.bin"); -MODULE_FIRMWARE("rtl_bt/rtl8761a_config.bin"); +MODULE_FIRMWARE("rtl_bt/rtl8761b_config.bin"); +MODULE_FIRMWARE("rtl_bt/rtl8761b_fw.bin"); +MODULE_FIRMWARE("rtl_bt/rtl8761bu_config.bin"); +MODULE_FIRMWARE("rtl_bt/rtl8761bu_fw.bin"); MODULE_FIRMWARE("rtl_bt/rtl8821a_fw.bin"); -MODULE_FIRMWARE("rtl_bt/rtl8821a_config.bin"); -MODULE_FIRMWARE("rtl_bt/rtl8822b_fw.bin"); +MODULE_FIRMWARE("rtl_bt/rtl8821c_config.bin"); +MODULE_FIRMWARE("rtl_bt/rtl8821c_fw.bin"); MODULE_FIRMWARE("rtl_bt/rtl8822b_config.bin"); -MODULE_FIRMWARE("rtl_bt/rtl8852au_fw.bin"); +MODULE_FIRMWARE("rtl_bt/rtl8822b_fw.bin"); +MODULE_FIRMWARE("rtl_bt/rtl8822cs_config.bin"); +MODULE_FIRMWARE("rtl_bt/rtl8822cs_fw.bin"); +MODULE_FIRMWARE("rtl_bt/rtl8822cu_config.bin"); +MODULE_FIRMWARE("rtl_bt/rtl8822cu_fw.bin"); MODULE_FIRMWARE("rtl_bt/rtl8852au_config.bin"); +MODULE_FIRMWARE("rtl_bt/rtl8852au_fw.bin"); -- 2.20.1