Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1021939pxy; Thu, 22 Apr 2021 20:54:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2aEbARhBF9pFUsidMhcfBfrRQDVKjRK38Zkj0OcZLnKp8D0y//Kw1KS/GiX5ruZsOAZZa X-Received: by 2002:a62:1888:0:b029:262:de45:b458 with SMTP id 130-20020a6218880000b0290262de45b458mr1905753pfy.20.1619150078373; Thu, 22 Apr 2021 20:54:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619150078; cv=none; d=google.com; s=arc-20160816; b=XBlW4l83ZRl7d/nq2mX4WqdhJlKUlVf/Lmn+jBHNEkzAETq1HcwAxqRb/GbA40e4KZ N2F/M6Fyt2PqlDrbDK0KRzNhpliq2wf5GqIAmIIxuJyZsaNWCGVFxlH3ZHg/VZabFdx4 BIWLOd9T4IswIIASdraExs3iAM5Pd4v/uPn46P2wJa46f14lTDFXKD7or/U0/bl/Ma2/ K8U7Kr8Ppy9CqVf70YIAYKOhNLPv9ZdE7aZEfjVG1CcnLOVz9C4XUPSWewoEWPgTpMV+ RUFl9JsLGlhoiqnZcmI0CxQOINOoUpn43xlh4id+6/17wcVpcpm1GJ04sihom6BuB/r9 DlUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:authenticated-by; bh=yxN3C1Moy7NeccY9lZ73mbu9lrEn7dY1kH4sS4Hccm4=; b=nMQvT6Gf/Cm/nUouTJPAdd1IcOjxCb0jXH9D1aKvJxbwXa8fZJPX4fwrLVM2Qq/nw8 HQuEhp7DvowF3DJYHZpBOJYEAgEFBZlus5rzUjYKJXnRX4VE4Q5Idb1DtMkpRVCo+vYC HLWfK18Md3o1v+pnaq74PW2t2kRD/7Jp2VVhomyI3pQcPM/6O74g5nhAp5GCKGy+/C77 gBy6tzYGDV6/yaE3aHgedMy/HNqW7IfjFKY/3OMrE7C1h6QpaLZZ9oF/bRlfv3ykxfCl 8kYQ9kquvy3Va4Wrb0K5iCxpjjmXlv35QGd52VEdMbuUEX54yZzgyU4JXfgnIJE+tged Kabw== ARC-Authentication-Results: i=1; mx.google.com; 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 k136si7038992pgc.87.2021.04.22.20.54.26; Thu, 22 Apr 2021 20:54:38 -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; 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 S240380AbhDWDx1 (ORCPT + 99 others); Thu, 22 Apr 2021 23:53:27 -0400 Received: from rtits2.realtek.com ([211.75.126.72]:41282 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231261AbhDWDxY (ORCPT ); Thu, 22 Apr 2021 23:53:24 -0400 Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.73 with qID 13N3qdfiF021903, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36502.realtek.com.tw[172.21.6.25]) by rtits2.realtek.com.tw (8.15.2/2.71/5.88) with ESMTPS id 13N3qdfiF021903 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Fri, 23 Apr 2021 11:52:39 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXH36502.realtek.com.tw (172.21.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Fri, 23 Apr 2021 11:52:38 +0800 Received: from localhost.localdomain (172.21.132.99) by RTEXMBS04.realtek.com.tw (172.21.6.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Fri, 23 Apr 2021 11:52:37 +0800 From: To: CC: , , , , , , , , Subject: [PATCH v3 1/2] Bluetooth: btrtl: Adjust the position of strcut definition Date: Fri, 23 Apr 2021 11:52:28 +0800 Message-ID: <20210423035229.27513-2-hildawu@realtek.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210423035229.27513-1-hildawu@realtek.com> References: <20210423035229.27513-1-hildawu@realtek.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.21.132.99] X-ClientProxiedBy: RTEXMBS01.realtek.com.tw (172.21.6.94) To RTEXMBS04.realtek.com.tw (172.21.6.97) X-KSE-ServerInfo: RTEXMBS04.realtek.com.tw, 9 X-KSE-Antivirus-Interceptor-Info: scan successful X-KSE-Antivirus-Info: =?big5?B?Q2xlYW4sIGJhc2VzOiAyMDIxLzQvMjMgpFekyCAwMToxMjowMA==?= X-KSE-Attachment-Filter-Triggered-Rules: Clean X-KSE-Attachment-Filter-Triggered-Filters: Clean X-KSE-BulkMessagesFiltering-Scan-Result: protection disabled X-KSE-AntiSpam-Outbound-Interceptor-Info: scan successful X-KSE-AntiSpam-Version: 5.9.20, Database issued on: 04/23/2021 03:40:47 X-KSE-AntiSpam-Status: KAS_STATUS_NOT_DETECTED X-KSE-AntiSpam-Method: none X-KSE-AntiSpam-Rate: 10 X-KSE-AntiSpam-Info: Lua profiles 163299 [Apr 22 2021] X-KSE-AntiSpam-Info: Version: 5.9.20.0 X-KSE-AntiSpam-Info: Envelope from: hildawu@realtek.com X-KSE-AntiSpam-Info: LuaCore: 443 443 d64ad0ad6f66abd85f8fb55fe5d831fdcc4c44a0 X-KSE-AntiSpam-Info: {Prob_from_in_msgid} X-KSE-AntiSpam-Info: {Tracking_from_domain_doesnt_match_to} X-KSE-AntiSpam-Info: 127.0.0.199:7.1.2;realtek.com:7.1.1;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1 X-KSE-AntiSpam-Info: {Track_Chinese_Simplified, headers_charset} X-KSE-AntiSpam-Info: Rate: 10 X-KSE-AntiSpam-Info: Status: not_detected X-KSE-AntiSpam-Info: Method: none X-KSE-AntiSpam-Info: Auth:dkim=none X-KSE-Antiphishing-Info: Clean X-KSE-Antiphishing-ScanningType: Heuristic X-KSE-Antiphishing-Method: None X-KSE-Antiphishing-Bases: 04/23/2021 03:44:00 X-KSE-ServerInfo: RTEXH36502.realtek.com.tw, 9 X-KSE-Attachment-Filter-Triggered-Rules: Clean X-KSE-Attachment-Filter-Triggered-Filters: Clean X-KSE-BulkMessagesFiltering-Scan-Result: protection disabled X-KSE-AntiSpam-Outbound-Interceptor-Info: scan successful X-KSE-AntiSpam-Version: 5.9.20, Database issued on: 04/23/2021 03:40:47 X-KSE-AntiSpam-Status: KAS_STATUS_NOT_DETECTED X-KSE-AntiSpam-Method: none X-KSE-AntiSpam-Rate: 10 X-KSE-AntiSpam-Info: Lua profiles 163299 [Apr 22 2021] X-KSE-AntiSpam-Info: Version: 5.9.20.0 X-KSE-AntiSpam-Info: Envelope from: hildawu@realtek.com X-KSE-AntiSpam-Info: LuaCore: 443 443 d64ad0ad6f66abd85f8fb55fe5d831fdcc4c44a0 X-KSE-AntiSpam-Info: {Prob_from_in_msgid} X-KSE-AntiSpam-Info: {Tracking_from_domain_doesnt_match_to} X-KSE-AntiSpam-Info: d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;realtek.com:7.1.1;127.0.0.199:7.1.2 X-KSE-AntiSpam-Info: Rate: 10 X-KSE-AntiSpam-Info: Status: not_detected X-KSE-AntiSpam-Info: Method: none X-KSE-AntiSpam-Info: Auth:dkim=none X-KSE-Antiphishing-Info: Clean X-KSE-Antiphishing-ScanningType: Heuristic X-KSE-Antiphishing-Method: None X-KSE-Antiphishing-Bases: 04/23/2021 03:44:00 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: hildawu Adjust the position of strcut definition for btrtl and hci_h5. The purpose is to avoid re-defining some chip features and let UART devices get relevant information too. Signed-off-by: hildawu --- drivers/bluetooth/btrtl.c | 36 ------------------------------------ drivers/bluetooth/btrtl.h | 36 +++++++++++++++++++++++++++++++++++- 2 files changed, 35 insertions(+), 37 deletions(-) diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c index e7fe5fb22753..94d1e7885aee 100644 --- a/drivers/bluetooth/btrtl.c +++ b/drivers/bluetooth/btrtl.c @@ -38,42 +38,6 @@ .hci_ver = (hciv), \ .hci_bus = (bus) -enum btrtl_chip_id { - CHIP_ID_8723A, - CHIP_ID_8723B, - CHIP_ID_8821A, - CHIP_ID_8761A, - CHIP_ID_8822B = 8, - CHIP_ID_8723D, - CHIP_ID_8821C, - CHIP_ID_8822C = 13, - CHIP_ID_8761B, - CHIP_ID_8852A = 18, -}; - -struct id_table { - __u16 match_flags; - __u16 lmp_subver; - __u16 hci_rev; - __u8 hci_ver; - __u8 hci_bus; - bool config_needed; - bool has_rom_version; - char *fw_name; - char *cfg_name; -}; - -struct btrtl_device_info { - const struct id_table *ic_info; - u8 rom_version; - u8 *fw_data; - int fw_len; - u8 *cfg_data; - int cfg_len; - bool drop_fw; - int project_id; -}; - static const struct id_table ic_id_table[] = { /* 8723A */ { IC_INFO(RTL_ROM_LMP_8723A, 0xb, 0x6, HCI_USB), diff --git a/drivers/bluetooth/btrtl.h b/drivers/bluetooth/btrtl.h index 2a582682136d..08bda0597c0c 100644 --- a/drivers/bluetooth/btrtl.h +++ b/drivers/bluetooth/btrtl.h @@ -12,7 +12,41 @@ #define rtl_dev_info(dev, fmt, ...) bt_dev_info(dev, "RTL: " fmt, ##__VA_ARGS__) #define rtl_dev_dbg(dev, fmt, ...) bt_dev_dbg(dev, "RTL: " fmt, ##__VA_ARGS__) -struct btrtl_device_info; +enum btrtl_chip_id { + CHIP_ID_8723A, + CHIP_ID_8723B, + CHIP_ID_8821A, + CHIP_ID_8761A, + CHIP_ID_8822B = 8, + CHIP_ID_8723D, + CHIP_ID_8821C, + CHIP_ID_8822C = 13, + CHIP_ID_8761B, + CHIP_ID_8852A = 18, +}; + +struct id_table { + __u16 match_flags; + __u16 lmp_subver; + __u16 hci_rev; + __u8 hci_ver; + __u8 hci_bus; + bool config_needed; + bool has_rom_version; + char *fw_name; + char *cfg_name; +}; + +struct btrtl_device_info { + const struct id_table *ic_info; + u8 rom_version; + u8 *fw_data; + int fw_len; + u8 *cfg_data; + int cfg_len; + bool drop_fw; + int project_id; +}; struct rtl_download_cmd { __u8 index; -- 2.17.1