Message ID | BYAPR20MB24723A54E913F0218DF87F83BCF79@BYAPR20MB2472.namprd20.prod.outlook.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-bluetooth-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96539C433EF for <linux-bluetooth@archiver.kernel.org>; Fri, 22 Apr 2022 16:03:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354454AbiDVQGF (ORCPT <rfc822;linux-bluetooth@archiver.kernel.org>); Fri, 22 Apr 2022 12:06:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232289AbiDVQFz (ORCPT <rfc822;linux-bluetooth@vger.kernel.org>); Fri, 22 Apr 2022 12:05:55 -0400 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12olkn2092.outbound.protection.outlook.com [40.92.21.92]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A45255E149; Fri, 22 Apr 2022 09:02:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JAopLuNi5ko5M29QRawPZImyb9K1aDn7CugSvUcvlDNDwysHZEuWV5JfqLs6xkKNkUHWZ32Qt6WXwC2yoF39MlbMARGbHvwZz18QsYYKhZdEIHNRVad6fPoArvSwDf29Ze2xFSSBIjfxrrWYhEk66cXOCETT51qs2OW4RELGmDY/WkMJLXIGqchKEOfrehkxANTBdeo8arm00SDiC86Aztj/Ej3tkWWGzlK/3gaNZfPvlqILj3TNKadT1xeNpHVWlqJbY82v/XbRQAIkpbz+VZ7704gstjxXbZP3QOMm+XU97PV20gLbVGT9uySsLxwAFq2Ea/hFd0o3wP5+IP14ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=b3bO13YmCabNvWf6OwNKP2sas0CpiP6jg/J18b8Pz0U=; b=IZAc3wOOIOgXwjr5oXuZ+RVOiEi51AcvQKJCBoL6dTDSEbHd27kbJ9o9mCy6X0Kx2lc/vNPegfUUoA98VqhTFJlDC5CcFJaciz2BX0JbQsizLrzoDrRDAwNRGwQowGhsIGInVsM1p4d1cOx+gKFMhghfLuiSJcmwcvG7bcZIpj9NMHmuRmL1uAuH5nDUA4kTbBhjk3XW31Rn9ZRkYfvMVUvi13nrrb9CzTnKdpTyZFXXKUJCcd8d+ctPhm39dZsMyEeb0lsHQqN30amwwFVtcGjHT3kO/nEkN+IKdDsup3YgZ7AxMftlBJ/SkOnDdq3kzJMlCVd2vM4jXAagc55hag== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=b3bO13YmCabNvWf6OwNKP2sas0CpiP6jg/J18b8Pz0U=; b=mxm9Dk3Iy+mMp12lLYYfeKSYjAL/lhFRIllvOWMUrrFB5JUfLN3M4nDsAMshRxRkmR6FAF45U7nD1UmTiYhAfghiNP8X6b+iHoPpNFEHk7lFLtD+dDjBknuGB9raOVK9h5c7rV92nEfGtBWWYRHcktWiyn9AfGorliOQwc//ECiBHRt+V9m27eCC7HNBTY3f5fY61KInkqKxtgPouVDi5Cnbyd2MiEtI6q2AnT4LcqWBn3Q0FvrreKNH/3qC/IPdLT7FKRRbvvq7dHfMNfX2vMHYrCTvGvFBDu5YC75mH2ZGEVj7eAQDoIBIGrI/nLx8S9JI40n2n8eiqTdnSFKBbQ== Received: from BYAPR20MB2472.namprd20.prod.outlook.com (2603:10b6:a03:155::16) by CY4PR2001MB1685.namprd20.prod.outlook.com (2603:10b6:910:68::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.15; Fri, 22 Apr 2022 16:02:58 +0000 Received: from BYAPR20MB2472.namprd20.prod.outlook.com ([fe80::3480:160a:eb92:d6e3]) by BYAPR20MB2472.namprd20.prod.outlook.com ([fe80::3480:160a:eb92:d6e3%6]) with mapi id 15.20.5186.015; Fri, 22 Apr 2022 16:02:58 +0000 From: icenowy@outlook.com To: Marcel Holtmann <marcel@holtmann.org>, Johan Hedberg <johan.hedberg@gmail.com>, Luiz Augusto von Dentz <luiz.dentz@gmail.com> Cc: linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev, Icenowy Zheng <icenowy@sipeed.com> Subject: [PATCH 1/3] Bluetooth: btrtl: try config w/o postfix if postfixed one failed to load Date: Sat, 23 Apr 2022 00:02:29 +0800 Message-ID: <BYAPR20MB24723A54E913F0218DF87F83BCF79@BYAPR20MB2472.namprd20.prod.outlook.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220422160231.1072810-1-icenowy@outlook.com> References: <20220422160231.1072810-1-icenowy@outlook.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-TMN: [GLyOAnXyVB6IjTCN6k0tBy6bpZ0TJQdv] X-ClientProxiedBy: HK2PR04CA0070.apcprd04.prod.outlook.com (2603:1096:202:15::14) To BYAPR20MB2472.namprd20.prod.outlook.com (2603:10b6:a03:155::16) X-Microsoft-Original-Message-ID: <20220422160231.1072810-2-icenowy@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 933fa029-322c-49fc-5382-08da24799129 X-MS-TrafficTypeDiagnostic: CY4PR2001MB1685:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XPvqHwjKGA4AVqI353HHT/lq84Zlm4/36LVYg7cpEwE4I18G2RyDIhQt0+DBAfBtLa2nidbu6Qmi6JZEZpSuMRCQkKTe3whOwV9DQd0DAelCWcB5UFYEwJvs0zwJOfZGDf30LkZ8WkAGlj89HGQFgjGtEJTvclBLrTfUV6vU+lxJGjV/GhNrpI+7J9P/mJ55mYyEC7QntSgw4lmFZ42ISSEbXLdQfugVZ9iwbrKyHhssQJN0rlwf3jY1L83DZkWkjXUTs5uzVPAoOUpZqnUd3OriEExcL2AikW6wBPAOlu2KdT9k4l8KXx2ak+ylGHld0u5nxe5PK8OkcnOUicp+Ya/C0Qu9lsemV6pn53nwvEBpd8oD6O/WQnjqgEe6HedRrj5k+AVbageaGIq8MjCcHnKFH8KaZgexmlzuyld2YkV4rKMVyYrfH7T+InSr2KuX54OJMl2UMUtjU61ZSsXEEbGfS1rmLgJIF2J1MXnT1nO9P8gE+xn85WUQ6963lHF49v5H6NA8pK/YxNrjyIY5pYVoyXvy9TtZbRz115Ris+yOOuMtzlbufSJCcff8o6mxlmQxgbkoCjmBNSh9TVw69Q== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ItorM44UEDUGHTx4Uu74GSwxYyqsrDwNeChU/zm4sJ7cFF3U/RhUZEnZLpx9d7Vj30eHjjDrGah3DZTrFj/gLXkRrODCAvzGt4AmtfUmIyqK6Q1evlCNf43LpQFlTZAAlnCmSFc7k+Om6ZBCaSmKKMH/+cs4d19GN3QlfO/OjJ+MMz8xeqkzuawqbM2azJJPQx2g25qB3cauglAh5YZt/lUH4mU7nt4sCuL1TeNKE2g+q82d49mjhQ7BDkP0kAuMLnksnpBh1zjlWt4V1rrJYP8Wj1IhYX88NNsxMijw0nMi27Ry92e8jfqJfKJKTtD6sfolPoyvS5r6lLQ57QQrgf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J4hskn8E7dGJnmjy34= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 933fa029-322c-49fc-5382-08da24799129 X-MS-Exchange-CrossTenant-AuthSource: BYAPR20MB2472.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Apr 2022 16:02:57.9830 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR2001MB1685 Precedence: bulk List-ID: <linux-bluetooth.vger.kernel.org> X-Mailing-List: linux-bluetooth@vger.kernel.org |
Series |
[1/3] Bluetooth: btrtl: try config w/o postfix if postfixed one failed to load
|
expand
|
diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c index 481d488bca0f..1f834513762b 100644 --- a/drivers/bluetooth/btrtl.c +++ b/drivers/bluetooth/btrtl.c @@ -699,6 +699,12 @@ struct btrtl_device_info *btrtl_initialize(struct hci_dev *hdev, } btrtl_dev->cfg_len = rtl_load_file(hdev, cfg_name, &btrtl_dev->cfg_data); + if (postfix && btrtl_dev->cfg_len <= 0) { + snprintf(cfg_name, sizeof(cfg_name), "%s.bin", + btrtl_dev->ic_info->cfg_name); + btrtl_dev->cfg_len = rtl_load_file(hdev, cfg_name, + &btrtl_dev->cfg_data); + } if (btrtl_dev->ic_info->config_needed && btrtl_dev->cfg_len <= 0) { rtl_dev_err(hdev, "mandatory config file %s not found",