From: Kevin Dewald <kevin@simpleble.org>
To: linux-bluetooth@vger.kernel.org
Cc: Kevin Dewald <kevin@simpleble.org>
Subject: [PATCH BlueZ 1/3] emulator: Remove unused le_ext_adv_type
Date: Mon, 5 Oct 2026 09:21:15 -0700 [thread overview]
Message-ID: <20261005162117.4606-2-kevin@simpleble.org> (raw)
In-Reply-To: <20261005162117.4606-1-kevin@simpleble.org>
Nothing has read le_ext_adv_type since advertising sets got their own
struct le_ext_adv in commit 5145b1ea2e95 ("emulator/btdev: Add support
multiple instance of extended advertising"). Remove it along with
ext_legacy_adv_type, rather than fix that function's mapping of low
duty cycle directed advertising (0x04) to ADV_SCAN_IND.
Assisted-by: Claude:claude-opus-5.5
---
emulator/btdev.c | 27 ---------------------------
1 file changed, 27 deletions(-)
diff --git a/emulator/btdev.c b/emulator/btdev.c
index 26a8aff62..30eb183c0 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
@@ -269,8 +269,6 @@ struct btdev {
uint32_t sync_train_timeout;
uint8_t sync_train_service_data;
- uint16_t le_ext_adv_type;
-
); /* reset_group */
/* Real time length of AL array */
@@ -3773,29 +3771,6 @@ done:
return 0;
}
-static uint16_t ext_legacy_adv_type(uint8_t type)
-{
- switch (type) {
- case 0x00:
- /* Connectable undirected - ADV_IND" */
- return 0x0013;
- case 0x01:
- /* Connectable directed - ADV_DIRECT_IND */
- return 0x0015;
- case 0x02:
- /* Scannable undirected - ADV_SCAN_IND */
- return 0x0012;
- case 0x03:
- /* Non connectable undirected - ADV_NONCONN_IND */
- return 0x0010;
- case 0x04:
- /* Scan response - SCAN_RSP */
- return 0x0012;
- }
-
- return 0x0000;
-}
-
static int cmd_set_adv_params(struct btdev *dev, const void *data, uint8_t len)
{
const struct bt_hci_cmd_le_set_adv_parameters *cmd = data;
@@ -3807,8 +3782,6 @@ static int cmd_set_adv_params(struct btdev *dev, const void *data, uint8_t len)
}
dev->le_adv_type = cmd->type;
- /* Use Legacy PDU if the remote is using EXT Scan */
- dev->le_ext_adv_type = ext_legacy_adv_type(cmd->type);
dev->le_adv_own_addr = cmd->own_addr_type;
dev->le_adv_direct_addr_type = cmd->direct_addr_type;
memcpy(dev->le_adv_direct_addr, cmd->direct_addr, 6);
--
2.54.0 (Apple Git-157)
next prev parent reply other threads:[~2026-10-05 16:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-05 16:21 [PATCH BlueZ 0/3] emulator: Fix extended advertising report types Kevin Dewald
2026-10-05 16:21 ` Kevin Dewald [this message]
2026-10-05 20:12 ` bluez.test.bot
2026-10-05 16:21 ` [PATCH BlueZ 2/3] emulator: Fix extended scan response Event_Type Kevin Dewald
2026-10-05 16:21 ` [PATCH BlueZ 3/3] emulator: Fix report type after a scan response Kevin Dewald
2026-10-07 18:40 ` [PATCH BlueZ 0/3] emulator: Fix extended advertising report types patchwork-bot+bluetooth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261005162117.4606-2-kevin@simpleble.org \
--to=kevin@simpleble.org \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.