Skip to content

Commit 0be289b

Browse files
jhovoldgregkh
authored andcommitted
Bluetooth: hci_bcm4377: do not mark valid bd_addr as invalid
commit c17d2a7 upstream. A recent commit restored the original (and still documented) semantics for the HCI_QUIRK_USE_BDADDR_PROPERTY quirk so that the device address is considered invalid unless an address is provided by firmware. This specifically means that this flag must only be set for devices with invalid addresses, but the Broadcom BCM4377 driver has so far been setting this flag unconditionally. Fortunately the driver already checks for invalid addresses during setup and sets the HCI_QUIRK_INVALID_BDADDR flag, which can simply be replaced with HCI_QUIRK_USE_BDADDR_PROPERTY to indicate that the default address is invalid but can be overridden by firmware (long term, this should probably just always be allowed). Fixes: 6945795 ("Bluetooth: fix use-bdaddr-property quirk") Cc: [email protected] # 6.5 Reported-by: Felix Zhang <[email protected]> Link: https://lore.kernel.org/r/[email protected]/ Signed-off-by: Johan Hovold <[email protected]> Reported-by: Felix Zhang <[email protected]> Reviewed-by: Neal Gompa <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent a4904b3 commit 0be289b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/bluetooth/hci_bcm4377.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -1417,7 +1417,7 @@ static int bcm4377_check_bdaddr(struct bcm4377_data *bcm4377)
14171417

14181418
bda = (struct hci_rp_read_bd_addr *)skb->data;
14191419
if (!bcm4377_is_valid_bdaddr(bcm4377, &bda->bdaddr))
1420-
set_bit(HCI_QUIRK_INVALID_BDADDR, &bcm4377->hdev->quirks);
1420+
set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &bcm4377->hdev->quirks);
14211421

14221422
kfree_skb(skb);
14231423
return 0;
@@ -2368,7 +2368,6 @@ static int bcm4377_probe(struct pci_dev *pdev, const struct pci_device_id *id)
23682368
hdev->set_bdaddr = bcm4377_hci_set_bdaddr;
23692369
hdev->setup = bcm4377_hci_setup;
23702370

2371-
set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks);
23722371
if (bcm4377->hw->broken_mws_transport_config)
23732372
set_bit(HCI_QUIRK_BROKEN_MWS_TRANSPORT_CONFIG, &hdev->quirks);
23742373
if (bcm4377->hw->broken_ext_scan)

0 commit comments

Comments
 (0)