Re: [PATCH v2 1/2] Bluetooth: btbcm: disable read tx power for BeagleV-Ahead

From: Thomas Gerner

Date: Sat Nov 21 2026 - 05:50:53 EST


Am 21.11.26 um 00:53 schrieb Drew Fustini:
On Tue, Oct 20, 2026 at 03:26:03PM +0200, Thomas Gerner wrote:
The bluetooth module of the Ampak AP6203BM is identified by the btbcm
driver as BCM4362A2.

The firmware of the bluetooth module on the BeagleV-Ahead reports a
capability of reading LE tx power. However reading fails. To get
bluetooth working it is necessary to disable reading of LE tx power on
the BeagleV-Ahead board. The disable is implemented in a similar way as
for several Apple boards but uses the board compatible identification
from the DTB as there is no DMI.
Thanks for sending this patch. Do you know if this is a problem on any
other boards with the AP6203BM?

Unfortunately I don't know of other boards with the AP6203BM.

Also, is there an error message for the failed read?


Without the quirk I get this message:

Bluetooth: hci0: unexpected cc 0x204b length: 1 < 3
Bluetooth: hci0: Opcode 0x204b failed: -38

As a result the hci driver stops initializing and Bluetooth is not working.


Signed-off-by: Thomas Gerner <thomas.gerner@xxxxxxxxxxxxxxxx>
---
No changes in v2

drivers/bluetooth/btbcm.c | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c
index 463d59890bef..2d02cc1863d0 100644
--- a/drivers/bluetooth/btbcm.c
+++ b/drivers/bluetooth/btbcm.c
[..]
-static const char *btbcm_get_board_name(struct device *dev)
+static const char *btbcm_get_board_name(struct hci_dev *hdev)
{
#ifdef CONFIG_OF
struct device_node *root __free(device_node) = of_find_node_by_path("/");
char *board_type;
const char *tmp;
+ const char **s;
if (!root)
return NULL;
@@ -550,8 +556,15 @@ static const char *btbcm_get_board_name(struct device *dev)
if (of_property_read_string_index(root, "compatible", 0, &tmp))
return NULL;
+ /* disable broken Read LE Min/Max Tx Power on first board found in list */
+ for (s = board_broken_read_transmit_power; *s; s++)
+ if (!strcmp(tmp, *s)) {
+ hci_set_quirk(hdev, HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER);
+ break;
+ }
It seems that btbcm_get_board_name() only looks up the board name for
the firmware file so I think it could be unexpected to set a quirk here.
Maybe this would work better?

static const char * const board_broken_read_transmit_power[] = {
"beagle,beaglev-ahead",
NULL
};
[..]

if (dmi_first_match(disable_broken_read_transmit_power))
hci_set_quirk(hdev, HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER);

if (of_machine_compatible_match(board_broken_read_transmit_power))
hci_set_quirk(hdev, HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER);


However, I am not very familiar with Bluetooth drivers so I am hoping
Marcel or Luiz can comment too.

My idea was to use the board name at btbcm_get_board_name() as it is already available. However, this suggestion looks is it is more common than my idea.

Thanks,
Drew


Best regadrs