Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3525922pxp; Tue, 8 Mar 2022 16:38:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJxcO9zl4vUx3oq6fCVVFyvZ1QAuOV48FMYxoWcdHdx5HgId2bMnx9ddWsrSkhEbGGKvgwvS X-Received: by 2002:aa7:88d5:0:b0:4f7:1b6a:8673 with SMTP id k21-20020aa788d5000000b004f71b6a8673mr9474351pff.5.1646786318605; Tue, 08 Mar 2022 16:38:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646786318; cv=none; d=google.com; s=arc-20160816; b=oXbDFWP+kUUSfDkioeVnhfofy/bzGcowkLGlrjMx6tMWOMGvVfrQRA11M5+sC1/ENP IR48jn2nAnS4NfbHEE+E8tBMlX9kx/cyQ/Ph8Cpvhu+XsI9BjfvY4wSGoy4lIxvJFpz4 mBsmY83191dZubyUrJy5NXLFjcz9aUb5SD3AMG3MRTkKtdSkj0cMOK8vw6wImN2VDpAl QsfaPSOXlQNM0O00tsab33A8nwvZVqevNGImjKgXkkMWw313yN2zeCYjLXpHKqfT2yK1 3GSmksC4RRLwIYH+UM659//mHDERuEZhiyJhP8+2ANe6Zf+wpGpiDb+F/tAXoi1Nd6/u kmBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:mime-version:dkim-signature; bh=S4gJ5WSgOm6UPb/Jf/ZU25tmWFHW5ov82wrvElSdaTo=; b=bVDHMR3CrFwGW5ksHzl9770YpmaZBr3IS2L/jQzD6OY+IH5KqhyLLm6AEdkSCucVyX IpqfplSeqrKeECDDgv7oYCqZsp9Tt+ztTY9eG59yAwmi4tcL1R/Qb4s0fDwp0W1O8/YI v1aM9GlwHr9JVR6CJmQ5Wpynm9C5iVCDq1ojw0MYSG4wERHn9m6VdPw6WR/d/s2aUhVq IoST/oZHZlhUOgMfmeNlopsRzYjV6Dqmw5OExmRjBZjiXZSi+s+zUqpuKtnde2ePVV7R T9NEPFK+11/p3fN7Yuw8WW23GiotTX4fj8WcbKVnSHV8VhaQDLDsPDC2M21d35AER52u H2xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=KThcTFXs; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id z37-20020a630a65000000b003732cdefdabsi327544pgk.379.2022.03.08.16.38.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 16:38:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=KThcTFXs; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BF7171275E8; Tue, 8 Mar 2022 15:54:44 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243341AbiCGS6J (ORCPT + 99 others); Mon, 7 Mar 2022 13:58:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244902AbiCGS6I (ORCPT ); Mon, 7 Mar 2022 13:58:08 -0500 Received: from mail-yb1-xb2c.google.com (mail-yb1-xb2c.google.com [IPv6:2607:f8b0:4864:20::b2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6EB293196 for ; Mon, 7 Mar 2022 10:57:13 -0800 (PST) Received: by mail-yb1-xb2c.google.com with SMTP id u61so32910836ybi.11 for ; Mon, 07 Mar 2022 10:57:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:from:date:message-id:subject:to:cc :content-transfer-encoding; bh=S4gJ5WSgOm6UPb/Jf/ZU25tmWFHW5ov82wrvElSdaTo=; b=KThcTFXsJ+AU0ZRn03LuNejg6+aoPqcsoaoF4yq8m42UT8tWF/sA3JCs1m1/cIW8eB yHa+PMUvYAADsVOavcandn6ddDRnIPq34rGWzJPMsszKzfAjURd+zLWQmMr+ee7Yk6ta H+VZkYDownNLc48SuDrnnY+U0eJ5Znrk1wuPQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc :content-transfer-encoding; bh=S4gJ5WSgOm6UPb/Jf/ZU25tmWFHW5ov82wrvElSdaTo=; b=Cp3C4ZnLtQOUxmeRd9FLQEK3S+a3rOQ5t9maEkWtG+YVPhp1WURQXg9EVA2vPLhVM9 EAHgF6MD4IoA3QmSIKI4Wq38xLW3yMZ7iLITDX2wGBI3jxNo+HvOWn1hlQmwEsHT4JpS ugy75X/zzDT7p6rRz7y4p2u8TFL27RLsAVNh9z6l+G0pwA1ba8doDlxWk3HgbaXR6FBT /4QCs2okLiyq6Q0LP7pIu8gSQRe71fCvCjAGMRR7HwgAMgr90aO1PPbs9M7EK8Y9gMYT Zam6LFol2/OCAzMHs01FBqlrE1xFQ/SiJtNYAYq2WTjLYROMWOx3pcXgv5jBAoK3eOqG sf+Q== X-Gm-Message-State: AOAM530pyu7FVRtItb19gs5tFNYbnMD+X9LrYc1c5HS06glBNrF9r9vJ IgFsqV087ahOrbh9H6MecuGGQMXmlW3bBzIAQOzUWGZNuQxuig== X-Received: by 2002:a25:7804:0:b0:628:ec4c:989b with SMTP id t4-20020a257804000000b00628ec4c989bmr8794539ybc.428.1646679433000; Mon, 07 Mar 2022 10:57:13 -0800 (PST) MIME-Version: 1.0 From: Katherine Lai Date: Mon, 7 Mar 2022 10:57:02 -0800 Message-ID: Subject: [RFC] Bluetooth: Adding support for /etc/bluetooth/main.conf.d To: linux-bluetooth@vger.kernel.org Cc: Sonny Sasaka Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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-bluetooth@vger.kernel.org Background It was found that a change to the default settings for MinConnectionInterval and MaxConnectionInterval in main.conf broke some of ChromeOS=E2=80=99s keyboard HID tests for only certain Bluetooth controllers. These keyboards aren=E2=80=99t able to connect to the device. Since those connection parameters improve the connection interval for most other chipsets, we want to leave the default values but have a way to have an optional override to address problematic models. Proposed Solution Adding support to bluetoothd for an additional config directory /etc/bluetooth/main.conf.d containing multiple files which will override common params. Override order will be lexically sorted filename order. This pattern is already used by Linux distros, for example there is /etc/sudoers.d which files will override common params in /etc/sudoers. Users can add override config files to /etc/bluetooth/main.conf.d rather than directly editing /etc/bluetooth/main.conf. This is more friendly to package managers since BlueZ package updates won't cause conflict to /etc/bluetooth/main.conf. In bluez=E2=80=99s main.c, merge the params for each *.conf file from /etc/bluetooth/main.conf.d with the existing /etc/bluetooth/main.conf in lexical filename order /etc/bluetooth/main.conf.d will be configurable at build time, e.g. with ./configure --main-conf-dir