From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.51 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796312065; b=u1zqxUn21lymysrMxeqjXgmHO/9hPNiQmgOYnfBYS2mpYfTFOIilpkdk920i8vmT449V RpSPjbuIRiv5FPIk1PnGdUPMY4Ly0qNzGKLtmF22EtOiPMMzT+nBR7IQZvqpu/VUtasSH kbEAZYA6r2yKqiYtkQJlKVXwRNvqE4IbHhEPOTVpa7uPYDiw6sEevJfp+9yPlX9wiiezI TfTvtpUJgWSmkWBVI+CVvZdea3K89FdPg6hwJRVZ3Osr/9CPqHW68/bIiuP7xNO0YeTRG rygN6lCY1CSuX1rC0FZp0384W/1LsFJY3s5RQT6uQg3UziwTNGhMVUsjpbnfSS086gw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796312065; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject: Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=jgsj2ogcqQMICt3KigfV7O0O/M7No/YGY9JAxL//8ao=; b=uOCV7Bsfr82gWwl0ZOhskgDLAJY+nNW1buRhQP1Guoqcph8ZfY+R2GUgPtvyfZDB6lyK H10Y6momIrubmX//FoiOxRJBb6Ghljqvs5s8Vs9IazpLjTb1A2F3WlrTUQmOoC7uyGtxS TDbdZfFBZ78rj0ItbpzxjZxUnZZysOgiBK1kso3hhrdYRL98oD3TvnH3vp23TF/Dke1p6 9VsD4KSXK+FFqSXLfA0FmZuDEMIlF9wNPnSFFOp1RaecmMc0WKMoiSQtPX3M/boPauICI cWl195ptBtJBR9VSANrPT7wYEAOUJHAyZWiaeIAZIY1U2Ln0320mVb559UgCd0ACl6Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=googlemail.com; spf=pass smtp.mailfrom=googlemail.com; dkim=pass header.d=googlemail.com header.i=@googlemail.com header.a=rsa-sha256 header.s=20260707 header.b=jnYoBAmg; arc=none smtp.remote-ip=209.85.221.51 Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B0E6B606A32F for ; Thu, 3 Dec 2026 15:34:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B0E6B606A32F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=googlemail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=googlemail.com header.i=@googlemail.com header.a=rsa-sha256 header.s=20260707 header.b=jnYoBAmg Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-492690dd5daso11239746f8f.1 for ; Thu, 03 Dec 2026 07:34:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20260707; t=1796312063; x=1796916863; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=jgsj2ogcqQMICt3KigfV7O0O/M7No/YGY9JAxL//8ao=; b=jnYoBAmgqRBRVVBw4GxDIq7HLxwVuwVWwUQ8t2GHap5iEQK+P+u7KxmbIExXcLOYAC 6l/fl+N8SA23xQQbMtzE5spriBEO4Aqq/WKffMsgsDzJ8E0iJcW6foD1tTDP7r0zuPre yLncyKLq31NK2rA2innCyteU2OumiFbQras046M5KkvaGc9RxWW6OQscQFSjcF717m2u NkOiTPrRvG6/gTd0XAmJwyvLWVUKwh99gHLsLsyeMcNhwxZCMAZn1VuY0K8n2lEDAA2P zg3YiBLqnVukTH+Vv2bUMi8uCLcGalrX5xy/GIbpgmNUzitUHqj6GMa+Je6D6HW9NGmP WlXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796312063; x=1796916863; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=jgsj2ogcqQMICt3KigfV7O0O/M7No/YGY9JAxL//8ao=; b=D7cHK2gA+0nQcqfuQXf7Q+NprPsQXmmKWDvTYKrivUdiA+JX+w6Be0L/L/SuGI2Qky YeleOhCegh2fkhrgLORAAs5zQDHB+HI9lmqTpDYWl5rp4142hpatAy2alc4vTucRqPvr 4wSGwaKaVp5MNphq7sReG603ldUnLaHLfbzRjLZUO0D0pv0Una40fMjMUYJGX9WdqrQF y5BWMLjHGzzRn/nQZRmhwfFKloKKlj7NY/MiB50Gif/XgLB9lbsGxoys1NE850OUFtXL bLraOKxmKaI6pSurLkAI4kBikkRw18YYmIXfDTE2lcUdWDg0yEkXjK/XzgOtiZlsebnN cdSA== X-Gm-Message-State: APuU4Z8s8s6I11HIaoyPStElaVT7sw5V/VEjCyC5fr4QFGe0EJL3bJfe ptYQxRDIYN87ujPUSdaTybbo8d6+ymkvOKQ/sAQdkY5qtytB0WX2ZnQtWmHErJG5 X-Gm-Gg: AZFdTZdQ+lPag9u7ZA8VwUpfvFL9VDjxBT4y01e8bfXyB9G0dSFrqo47Ijm5YYgsqow 2SqeskU4HGaXZqkrpJixWarVYaaBl7T62bCjruqVQICDc8bh5XfvPXxCXz3rBGFmK/Bh2Yt8Bgy 4er/mfO/p4DXkPRz8SzX2CdmGRO7EboOvFY6IVcns96dMCvrIb1ZUL9MiJYYI1P21zEGa0bHeAf XRQtlrj6AXIM/7ZqXcsZdZiqdXeYMTda7fAEPQXqN5dyHI94ZoAZO0ej0X8wRHtHCo2IJcZQKCC XS4eZObGAlnvylk+D2PHPyzVuEk9f+aFaK3yb1FaiLL9cKPPHzv0srWm8YUnYQ4MeUALK1eKC/h F6a0Udgfb2Ik0MiYqUhCy+zsdEO6ouor6qalmyyPWfd/qtxaweY+YcBpF/ZuZ0Lu7xhQN6pkUbB nGRg0q4XdonHRju+rXPF+PR9xa5Iz4/Ump64agSDMqsUB2uusuKBEvvnBQq1PhOIX2ml/wn/FZm y3z/e2pBLOa6k51M+KHFMd3C4Bc9RKRivV3mfqOXXknr0+Ykfg0ix8hHRzOWIUSCRW6i00ePUfv vo9txTc401NjhAa2rnZ/lQlRQVn86yotlsU6aNnvLDbHtPesy9L2Z7M6XYc= X-Received: by 2002:a05:6000:1889:b0:48d:ee35:b3fe with SMTP id ffacd0b85a97d-4abab5ea3b3mr103540182f8f.8.1796312062955; Thu, 03 Dec 2026 07:34:22 -0800 (PST) Received: from sp8 (213-146-237-228.ptr.skytron.de. [213.146.237.228]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4ab65cb42absm83352896f8f.1.2026.12.03.07.34.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2026 07:34:22 -0800 (PST) From: Sebastian To: linux-bluetooth@vger.kernel.org Cc: Sebastian Subject: [PATCH v3 2/6] main.conf: Add LongReportMap option to [Input] Date: Thu, 3 Dec 2026 16:34:04 +0100 Message-ID: <20261203153408.31769-3-seb.witt@googlemail.com> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261203153408.31769-1-seb.witt@googlemail.com> References: <20261203153408.31769-1-seb.witt@googlemail.com> X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add an option to accept HID over GATT Report Maps longer than the 512 octets an attribute value may have, as exposed by some non-compliant devices. It defaults to true, as other operating systems accept them, or to false when Testing is enabled so the limit is enforced for qualification. --- src/btd.h | 5 +++++ src/main.c | 26 +++++++++++++++++++++++++- src/main.conf | 7 +++++++ 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/src/btd.h b/src/btd.h index 9bf310271..378c567c3 100644 --- a/src/btd.h +++ b/src/btd.h @@ -126,6 +126,10 @@ struct btd_avrcp_opts { bool volume_category; }; +struct btd_input_opts { + bool long_report_map; +}; + struct btd_advmon_opts { uint8_t rssi_sampling_period; }; @@ -172,6 +176,7 @@ struct btd_opts { struct btd_avdtp_opts avdtp; struct btd_avrcp_opts avrcp; + struct btd_input_opts input; uint8_t key_size; diff --git a/src/main.c b/src/main.c index 3a051c5a4..8c7e5206f 100644 --- a/src/main.c +++ b/src/main.c @@ -185,6 +185,11 @@ static const char *avrcp_options[] = { NULL }; +static const char * const input_options[] = { + "LongReportMap", + NULL +}; + static const char *advmon_options[] = { "RSSISamplingPeriod", NULL @@ -210,6 +215,7 @@ static const struct group_table { { "CSIS", csip_options }, { "AVDTP", avdtp_options }, { "AVRCP", avrcp_options }, + { "Input", input_options }, { "ChannelSounding", bcs_options }, { "AdvMon", advmon_options }, { "HDT", hdt_options }, @@ -1400,6 +1406,18 @@ static void parse_avrcp(GKeyFile *config) &btd_opts.avrcp.volume_category); } +static void parse_input(GKeyFile *config) +{ + /* Cap the Report Map to 512 octets by default when testing, e.g. + * for qualification. + */ + btd_opts.input.long_report_map = !btd_opts.testing; + + if (config) + parse_config_bool(config, "Input", "LongReportMap", + &btd_opts.input.long_report_map); +} + static void parse_advmon(GKeyFile *config) { parse_config_u8(config, "AdvMon", "RSSISamplingPeriod", @@ -1442,8 +1460,11 @@ static void parse_hdt(GKeyFile *config) static void parse_config(GKeyFile *config) { - if (!config) + if (!config) { + /* Apply the defaults depending on Testing, set with -T */ + parse_input(NULL); return; + } check_config(config); @@ -1457,6 +1478,7 @@ static void parse_config(GKeyFile *config) parse_csis(config); parse_avdtp(config); parse_avrcp(config); + parse_input(config); parse_le_cs_config(config); parse_advmon(config); parse_hdt(config); @@ -1514,6 +1536,8 @@ static void init_defaults(void) btd_opts.avrcp.volume_without_target = false; btd_opts.avrcp.volume_category = true; + btd_opts.input.long_report_map = true; + btd_opts.advmon.rssi_sampling_period = 0xFF; btd_opts.csis.encrypt = true; diff --git a/src/main.conf b/src/main.conf index c9906148d..451a5281f 100644 --- a/src/main.conf +++ b/src/main.conf @@ -419,6 +419,13 @@ # notifications. #VolumeCategory = true +[Input] +# Accept HID over GATT Report Maps longer than the 512 octets an attribute +# value may have, as exposed by some non-compliant devices, which other +# operating systems accept as well. +# Defaults to true, or false when Testing is enabled. +#LongReportMap = true + [Policy] # # The ReconnectUUIDs defines the set of remote services that should try -- 2.56.1