Skip to content

Commit a2bbaff

Browse files
committed
Merge tag 'for-net-2025-07-17' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth
Luiz Augusto von Dentz says: ==================== bluetooth pull request for net: - hci_sync: fix connectable extended advertising when using static random address - hci_core: fix typos in macros - hci_core: add missing braces when using macro parameters - hci_core: replace 'quirks' integer by 'quirk_flags' bitmap - SMP: If an unallowed command is received consider it a failure - SMP: Fix using HCI_ERROR_REMOTE_USER_TERM on timeout - L2CAP: Fix null-ptr-deref in l2cap_sock_resume_cb() - L2CAP: Fix attempting to adjust outgoing MTU - btintel: Check if controller is ISO capable on btintel_classify_pkt_type - btusb: QCA: Fix downloading wrong NVM for WCN6855 GF variant without board ID * tag 'for-net-2025-07-17' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth: Bluetooth: L2CAP: Fix attempting to adjust outgoing MTU Bluetooth: btusb: QCA: Fix downloading wrong NVM for WCN6855 GF variant without board ID Bluetooth: hci_dev: replace 'quirks' integer by 'quirk_flags' bitmap Bluetooth: hci_core: add missing braces when using macro parameters Bluetooth: hci_core: fix typos in macros Bluetooth: SMP: Fix using HCI_ERROR_REMOTE_USER_TERM on timeout Bluetooth: SMP: If an unallowed command is received consider it a failure Bluetooth: btintel: Check if controller is ISO capable on btintel_classify_pkt_type Bluetooth: hci_sync: fix connectable extended advertising when using static random address Bluetooth: Fix null-ptr-deref in l2cap_sock_resume_cb() ==================== Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents 3224744 + d24e4a7 commit a2bbaff

36 files changed

+289
-240
lines changed

drivers/bluetooth/bfusb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ static int bfusb_probe(struct usb_interface *intf, const struct usb_device_id *i
670670
hdev->flush = bfusb_flush;
671671
hdev->send = bfusb_send_frame;
672672

673-
set_bit(HCI_QUIRK_BROKEN_LOCAL_COMMANDS, &hdev->quirks);
673+
hci_set_quirk(hdev, HCI_QUIRK_BROKEN_LOCAL_COMMANDS);
674674

675675
if (hci_register_dev(hdev) < 0) {
676676
BT_ERR("Can't register HCI device");

drivers/bluetooth/bpa10x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ static int bpa10x_probe(struct usb_interface *intf,
398398
hdev->send = bpa10x_send_frame;
399399
hdev->set_diag = bpa10x_set_diag;
400400

401-
set_bit(HCI_QUIRK_RESET_ON_CLOSE, &hdev->quirks);
401+
hci_set_quirk(hdev, HCI_QUIRK_RESET_ON_CLOSE);
402402

403403
err = hci_register_dev(hdev);
404404
if (err < 0) {

drivers/bluetooth/btbcm.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ int btbcm_check_bdaddr(struct hci_dev *hdev)
135135
if (btbcm_set_bdaddr_from_efi(hdev) != 0) {
136136
bt_dev_info(hdev, "BCM: Using default device address (%pMR)",
137137
&bda->bdaddr);
138-
set_bit(HCI_QUIRK_INVALID_BDADDR, &hdev->quirks);
138+
hci_set_quirk(hdev, HCI_QUIRK_INVALID_BDADDR);
139139
}
140140
}
141141

@@ -467,7 +467,7 @@ static int btbcm_print_controller_features(struct hci_dev *hdev)
467467

468468
/* Read DMI and disable broken Read LE Min/Max Tx Power */
469469
if (dmi_first_match(disable_broken_read_transmit_power))
470-
set_bit(HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER, &hdev->quirks);
470+
hci_set_quirk(hdev, HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER);
471471

472472
return 0;
473473
}
@@ -706,7 +706,7 @@ int btbcm_finalize(struct hci_dev *hdev, bool *fw_load_done, bool use_autobaud_m
706706

707707
btbcm_check_bdaddr(hdev);
708708

709-
set_bit(HCI_QUIRK_STRICT_DUPLICATE_FILTER, &hdev->quirks);
709+
hci_set_quirk(hdev, HCI_QUIRK_STRICT_DUPLICATE_FILTER);
710710

711711
return 0;
712712
}
@@ -769,7 +769,7 @@ int btbcm_setup_apple(struct hci_dev *hdev)
769769
kfree_skb(skb);
770770
}
771771

772-
set_bit(HCI_QUIRK_STRICT_DUPLICATE_FILTER, &hdev->quirks);
772+
hci_set_quirk(hdev, HCI_QUIRK_STRICT_DUPLICATE_FILTER);
773773

774774
return 0;
775775
}

drivers/bluetooth/btintel.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ int btintel_check_bdaddr(struct hci_dev *hdev)
8888
if (!bacmp(&bda->bdaddr, BDADDR_INTEL)) {
8989
bt_dev_err(hdev, "Found Intel default device address (%pMR)",
9090
&bda->bdaddr);
91-
set_bit(HCI_QUIRK_INVALID_BDADDR, &hdev->quirks);
91+
hci_set_quirk(hdev, HCI_QUIRK_INVALID_BDADDR);
9292
}
9393

9494
kfree_skb(skb);
@@ -2027,7 +2027,7 @@ static int btintel_download_fw(struct hci_dev *hdev,
20272027
*/
20282028
if (!bacmp(&params->otp_bdaddr, BDADDR_ANY)) {
20292029
bt_dev_info(hdev, "No device address configured");
2030-
set_bit(HCI_QUIRK_INVALID_BDADDR, &hdev->quirks);
2030+
hci_set_quirk(hdev, HCI_QUIRK_INVALID_BDADDR);
20312031
}
20322032

20332033
download:
@@ -2295,7 +2295,7 @@ static int btintel_prepare_fw_download_tlv(struct hci_dev *hdev,
22952295
*/
22962296
if (!bacmp(&ver->otp_bd_addr, BDADDR_ANY)) {
22972297
bt_dev_info(hdev, "No device address configured");
2298-
set_bit(HCI_QUIRK_INVALID_BDADDR, &hdev->quirks);
2298+
hci_set_quirk(hdev, HCI_QUIRK_INVALID_BDADDR);
22992299
}
23002300
}
23012301

@@ -2670,7 +2670,7 @@ static u8 btintel_classify_pkt_type(struct hci_dev *hdev, struct sk_buff *skb)
26702670
* Distinguish ISO data packets form ACL data packets
26712671
* based on their connection handle value range.
26722672
*/
2673-
if (hci_skb_pkt_type(skb) == HCI_ACLDATA_PKT) {
2673+
if (iso_capable(hdev) && hci_skb_pkt_type(skb) == HCI_ACLDATA_PKT) {
26742674
__u16 handle = __le16_to_cpu(hci_acl_hdr(skb)->handle);
26752675

26762676
if (hci_handle(handle) >= BTINTEL_ISODATA_HANDLE_BASE)
@@ -3435,9 +3435,9 @@ static int btintel_setup_combined(struct hci_dev *hdev)
34353435
}
34363436

34373437
/* Apply the common HCI quirks for Intel device */
3438-
set_bit(HCI_QUIRK_STRICT_DUPLICATE_FILTER, &hdev->quirks);
3439-
set_bit(HCI_QUIRK_SIMULTANEOUS_DISCOVERY, &hdev->quirks);
3440-
set_bit(HCI_QUIRK_NON_PERSISTENT_DIAG, &hdev->quirks);
3438+
hci_set_quirk(hdev, HCI_QUIRK_STRICT_DUPLICATE_FILTER);
3439+
hci_set_quirk(hdev, HCI_QUIRK_SIMULTANEOUS_DISCOVERY);
3440+
hci_set_quirk(hdev, HCI_QUIRK_NON_PERSISTENT_DIAG);
34413441

34423442
/* Set up the quality report callback for Intel devices */
34433443
hdev->set_quality_report = btintel_set_quality_report;
@@ -3475,8 +3475,8 @@ static int btintel_setup_combined(struct hci_dev *hdev)
34753475
*/
34763476
if (!btintel_test_flag(hdev,
34773477
INTEL_ROM_LEGACY_NO_WBS_SUPPORT))
3478-
set_bit(HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED,
3479-
&hdev->quirks);
3478+
hci_set_quirk(hdev,
3479+
HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED);
34803480

34813481
err = btintel_legacy_rom_setup(hdev, &ver);
34823482
break;
@@ -3491,11 +3491,11 @@ static int btintel_setup_combined(struct hci_dev *hdev)
34913491
*
34923492
* All Legacy bootloader devices support WBS
34933493
*/
3494-
set_bit(HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED,
3495-
&hdev->quirks);
3494+
hci_set_quirk(hdev,
3495+
HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED);
34963496

34973497
/* These variants don't seem to support LE Coded PHY */
3498-
set_bit(HCI_QUIRK_BROKEN_LE_CODED, &hdev->quirks);
3498+
hci_set_quirk(hdev, HCI_QUIRK_BROKEN_LE_CODED);
34993499

35003500
/* Setup MSFT Extension support */
35013501
btintel_set_msft_opcode(hdev, ver.hw_variant);
@@ -3571,10 +3571,10 @@ static int btintel_setup_combined(struct hci_dev *hdev)
35713571
*
35723572
* All Legacy bootloader devices support WBS
35733573
*/
3574-
set_bit(HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED, &hdev->quirks);
3574+
hci_set_quirk(hdev, HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED);
35753575

35763576
/* These variants don't seem to support LE Coded PHY */
3577-
set_bit(HCI_QUIRK_BROKEN_LE_CODED, &hdev->quirks);
3577+
hci_set_quirk(hdev, HCI_QUIRK_BROKEN_LE_CODED);
35783578

35793579
/* Setup MSFT Extension support */
35803580
btintel_set_msft_opcode(hdev, ver.hw_variant);
@@ -3600,7 +3600,7 @@ static int btintel_setup_combined(struct hci_dev *hdev)
36003600
*
36013601
* All TLV based devices support WBS
36023602
*/
3603-
set_bit(HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED, &hdev->quirks);
3603+
hci_set_quirk(hdev, HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED);
36043604

36053605
/* Setup MSFT Extension support */
36063606
btintel_set_msft_opcode(hdev,

drivers/bluetooth/btintel_pcie.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2081,9 +2081,9 @@ static int btintel_pcie_setup_internal(struct hci_dev *hdev)
20812081
}
20822082

20832083
/* Apply the common HCI quirks for Intel device */
2084-
set_bit(HCI_QUIRK_STRICT_DUPLICATE_FILTER, &hdev->quirks);
2085-
set_bit(HCI_QUIRK_SIMULTANEOUS_DISCOVERY, &hdev->quirks);
2086-
set_bit(HCI_QUIRK_NON_PERSISTENT_DIAG, &hdev->quirks);
2084+
hci_set_quirk(hdev, HCI_QUIRK_STRICT_DUPLICATE_FILTER);
2085+
hci_set_quirk(hdev, HCI_QUIRK_SIMULTANEOUS_DISCOVERY);
2086+
hci_set_quirk(hdev, HCI_QUIRK_NON_PERSISTENT_DIAG);
20872087

20882088
/* Set up the quality report callback for Intel devices */
20892089
hdev->set_quality_report = btintel_set_quality_report;
@@ -2123,7 +2123,7 @@ static int btintel_pcie_setup_internal(struct hci_dev *hdev)
21232123
*
21242124
* All TLV based devices support WBS
21252125
*/
2126-
set_bit(HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED, &hdev->quirks);
2126+
hci_set_quirk(hdev, HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED);
21272127

21282128
/* Setup MSFT Extension support */
21292129
btintel_set_msft_opcode(hdev,

drivers/bluetooth/btmtksdio.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,7 @@ static int btmtksdio_setup(struct hci_dev *hdev)
11411141
}
11421142

11431143
/* Enable WBS with mSBC codec */
1144-
set_bit(HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED, &hdev->quirks);
1144+
hci_set_quirk(hdev, HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED);
11451145

11461146
/* Enable GPIO reset mechanism */
11471147
if (bdev->reset) {
@@ -1384,7 +1384,7 @@ static int btmtksdio_probe(struct sdio_func *func,
13841384
SET_HCIDEV_DEV(hdev, &func->dev);
13851385

13861386
hdev->manufacturer = 70;
1387-
set_bit(HCI_QUIRK_NON_PERSISTENT_SETUP, &hdev->quirks);
1387+
hci_set_quirk(hdev, HCI_QUIRK_NON_PERSISTENT_SETUP);
13881388

13891389
sdio_set_drvdata(func, bdev);
13901390

drivers/bluetooth/btmtkuart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,7 @@ static int btmtkuart_probe(struct serdev_device *serdev)
872872
SET_HCIDEV_DEV(hdev, &serdev->dev);
873873

874874
hdev->manufacturer = 70;
875-
set_bit(HCI_QUIRK_NON_PERSISTENT_SETUP, &hdev->quirks);
875+
hci_set_quirk(hdev, HCI_QUIRK_NON_PERSISTENT_SETUP);
876876

877877
if (btmtkuart_is_standalone(bdev)) {
878878
err = clk_prepare_enable(bdev->osc);

drivers/bluetooth/btnxpuart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1807,7 +1807,7 @@ static int nxp_serdev_probe(struct serdev_device *serdev)
18071807
"local-bd-address",
18081808
(u8 *)&ba, sizeof(ba));
18091809
if (bacmp(&ba, BDADDR_ANY))
1810-
set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks);
1810+
hci_set_quirk(hdev, HCI_QUIRK_USE_BDADDR_PROPERTY);
18111811

18121812
if (hci_register_dev(hdev) < 0) {
18131813
dev_err(&serdev->dev, "Can't register HCI device\n");

drivers/bluetooth/btqca.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ static int qca_check_bdaddr(struct hci_dev *hdev, const struct qca_fw_config *co
739739

740740
bda = (struct hci_rp_read_bd_addr *)skb->data;
741741
if (!bacmp(&bda->bdaddr, &config->bdaddr))
742-
set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks);
742+
hci_set_quirk(hdev, HCI_QUIRK_USE_BDADDR_PROPERTY);
743743

744744
kfree_skb(skb);
745745

drivers/bluetooth/btqcomsmd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ static int btqcomsmd_setup(struct hci_dev *hdev)
117117
/* Devices do not have persistent storage for BD address. Retrieve
118118
* it from the firmware node property.
119119
*/
120-
set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks);
120+
hci_set_quirk(hdev, HCI_QUIRK_USE_BDADDR_PROPERTY);
121121

122122
return 0;
123123
}

0 commit comments

Comments
 (0)