@@ -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
20332033download :
@@ -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 )
@@ -2719,7 +2719,7 @@ static int btintel_uefi_get_dsbr(u32 *dsbr_var)
27192719 } __packed data ;
27202720
27212721 efi_status_t status ;
2722- unsigned long data_size = 0 ;
2722+ unsigned long data_size = sizeof ( data ) ;
27232723 efi_guid_t guid = EFI_GUID (0xe65d8884 , 0xd4af , 0x4b20 , 0x8d , 0x03 ,
27242724 0x77 , 0x2e , 0xcc , 0x3d , 0xa5 , 0x31 );
27252725
@@ -2729,16 +2729,10 @@ static int btintel_uefi_get_dsbr(u32 *dsbr_var)
27292729 if (!efi_rt_services_supported (EFI_RT_SUPPORTED_GET_VARIABLE ))
27302730 return - EOPNOTSUPP ;
27312731
2732- status = efi .get_variable (BTINTEL_EFI_DSBR , & guid , NULL , & data_size ,
2733- NULL );
2734-
2735- if (status != EFI_BUFFER_TOO_SMALL || !data_size )
2736- return - EIO ;
2737-
27382732 status = efi .get_variable (BTINTEL_EFI_DSBR , & guid , NULL , & data_size ,
27392733 & data );
27402734
2741- if (status != EFI_SUCCESS )
2735+ if (status != EFI_SUCCESS || data_size != sizeof ( data ) )
27422736 return - ENXIO ;
27432737
27442738 * dsbr_var = data .dsbr ;
@@ -3441,9 +3435,9 @@ static int btintel_setup_combined(struct hci_dev *hdev)
34413435 }
34423436
34433437 /* Apply the common HCI quirks for Intel device */
3444- set_bit ( HCI_QUIRK_STRICT_DUPLICATE_FILTER , & hdev -> quirks );
3445- set_bit ( HCI_QUIRK_SIMULTANEOUS_DISCOVERY , & hdev -> quirks );
3446- 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 );
34473441
34483442 /* Set up the quality report callback for Intel devices */
34493443 hdev -> set_quality_report = btintel_set_quality_report ;
@@ -3481,8 +3475,8 @@ static int btintel_setup_combined(struct hci_dev *hdev)
34813475 */
34823476 if (!btintel_test_flag (hdev ,
34833477 INTEL_ROM_LEGACY_NO_WBS_SUPPORT ))
3484- set_bit ( HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED ,
3485- & hdev -> quirks );
3478+ hci_set_quirk ( hdev ,
3479+ HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED );
34863480
34873481 err = btintel_legacy_rom_setup (hdev , & ver );
34883482 break ;
@@ -3497,11 +3491,11 @@ static int btintel_setup_combined(struct hci_dev *hdev)
34973491 *
34983492 * All Legacy bootloader devices support WBS
34993493 */
3500- set_bit ( HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED ,
3501- & hdev -> quirks );
3494+ hci_set_quirk ( hdev ,
3495+ HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED );
35023496
35033497 /* These variants don't seem to support LE Coded PHY */
3504- set_bit ( HCI_QUIRK_BROKEN_LE_CODED , & hdev -> quirks );
3498+ hci_set_quirk ( hdev , HCI_QUIRK_BROKEN_LE_CODED );
35053499
35063500 /* Setup MSFT Extension support */
35073501 btintel_set_msft_opcode (hdev , ver .hw_variant );
@@ -3577,10 +3571,10 @@ static int btintel_setup_combined(struct hci_dev *hdev)
35773571 *
35783572 * All Legacy bootloader devices support WBS
35793573 */
3580- set_bit ( HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED , & hdev -> quirks );
3574+ hci_set_quirk ( hdev , HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED );
35813575
35823576 /* These variants don't seem to support LE Coded PHY */
3583- set_bit ( HCI_QUIRK_BROKEN_LE_CODED , & hdev -> quirks );
3577+ hci_set_quirk ( hdev , HCI_QUIRK_BROKEN_LE_CODED );
35843578
35853579 /* Setup MSFT Extension support */
35863580 btintel_set_msft_opcode (hdev , ver .hw_variant );
@@ -3606,7 +3600,7 @@ static int btintel_setup_combined(struct hci_dev *hdev)
36063600 *
36073601 * All TLV based devices support WBS
36083602 */
3609- set_bit ( HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED , & hdev -> quirks );
3603+ hci_set_quirk ( hdev , HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED );
36103604
36113605 /* Setup MSFT Extension support */
36123606 btintel_set_msft_opcode (hdev ,
@@ -3688,7 +3682,7 @@ int btintel_configure_setup(struct hci_dev *hdev, const char *driver_name)
36883682}
36893683EXPORT_SYMBOL_GPL (btintel_configure_setup );
36903684
3691- int btintel_diagnostics (struct hci_dev * hdev , struct sk_buff * skb )
3685+ static int btintel_diagnostics (struct hci_dev * hdev , struct sk_buff * skb )
36923686{
36933687 struct intel_tlv * tlv = (void * )& skb -> data [5 ];
36943688
@@ -3716,7 +3710,6 @@ int btintel_diagnostics(struct hci_dev *hdev, struct sk_buff *skb)
37163710recv_frame :
37173711 return hci_recv_frame (hdev , skb );
37183712}
3719- EXPORT_SYMBOL_GPL (btintel_diagnostics );
37203713
37213714int btintel_recv_event (struct hci_dev * hdev , struct sk_buff * skb )
37223715{
0 commit comments