Message ID | 20211214073214.320397-1-hj.tedd.an@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Luiz Von Dentz |
Headers | show |
Series | Bluetooth: btintel: Add missing quirks and msft ext for legacy bootloader | expand |
Context | Check | Description |
---|---|---|
tedd_an/checkpatch | success | Checkpatch PASS |
tedd_an/gitlint | success | Gitlint PASS |
tedd_an/buildkernel | success | Build Kernel PASS |
tedd_an/incremental_build | success | Pass |
tedd_an/testrunnersetup | success | Test Runner Setup PASS |
tedd_an/testrunnerl2cap-tester | success | Total: 40, Passed: 40 (100.0%), Failed: 0, Not Run: 0 |
tedd_an/testrunnerbnep-tester | success | Total: 1, Passed: 1 (100.0%), Failed: 0, Not Run: 0 |
tedd_an/testrunnermgmt-tester | success | Total: 493, Passed: 493 (100.0%), Failed: 0, Not Run: 0 |
tedd_an/testrunnerrfcomm-tester | success | Total: 9, Passed: 9 (100.0%), Failed: 0, Not Run: 0 |
tedd_an/testrunnersco-tester | success | Total: 12, Passed: 12 (100.0%), Failed: 0, Not Run: 0 |
tedd_an/testrunnersmp-tester | success | Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0 |
tedd_an/testrunneruserchan-tester | success | Total: 4, Passed: 4 (100.0%), Failed: 0, Not Run: 0 |
Hi Tedd, On Tue, Dec 14, 2021 at 3:14 AM Tedd Ho-Jeong An <hj.tedd.an@gmail.com> wrote: > > From: Tedd Ho-Jeong An <tedd.an@intel.com> > > This patch add missing HCI quirks and MSFT extension for legacy > bootloader when it is running in the operational firmware. > > Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com> > --- > drivers/bluetooth/btintel.c | 26 ++++++++++++++++++++++---- > 1 file changed, 22 insertions(+), 4 deletions(-) > > diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c > index 8f9109b40961..e1f96df847b8 100644 > --- a/drivers/bluetooth/btintel.c > +++ b/drivers/bluetooth/btintel.c > @@ -2498,10 +2498,14 @@ static int btintel_setup_combined(struct hci_dev *hdev) > case 0x12: /* ThP */ > case 0x13: /* HrP */ > case 0x14: /* CcP */ > - /* Some legacy bootloader devices from JfP supports both old > - * and TLV based HCI_Intel_Read_Version command. But we don't > - * want to use the TLV based setup routines for those legacy > - * bootloader device. > + /* Some legacy bootloader devices starting from JfP, > + * the operational firmware supports both old and TLV based > + * HCI_Intel_Read_Version command based on the command > + * parameter. > + * > + * For upgrading firmware case, the TLV based version cannot > + * be used because the firmware filename for legacy bootloader > + * is based on the old format. > * > * Also, it is not easy to convert TLV based version from the > * legacy version format. > @@ -2513,6 +2517,20 @@ static int btintel_setup_combined(struct hci_dev *hdev) > err = btintel_read_version(hdev, &ver); > if (err) > return err; > + > + /* Apply the device specific HCI quirks > + * > + * All Legacy bootloader devices support WBS > + */ > + set_bit(HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED, &hdev->quirks); > + > + /* Valid LE States quirk for JfP/ThP familiy */ > + if (ver.hw_variant == 0x11 || ver.hw_variant == 0x12) > + set_bit(HCI_QUIRK_VALID_LE_STATES, &hdev->quirks); > + > + /* Setup MSFT Extension support */ > + btintel_set_msft_opcode(hdev, ver.hw_variant); > + > err = btintel_bootloader_setup(hdev, &ver); > break; > case 0x17: > -- > 2.25.1 Applied, thanks.
diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c index 8f9109b40961..e1f96df847b8 100644 --- a/drivers/bluetooth/btintel.c +++ b/drivers/bluetooth/btintel.c @@ -2498,10 +2498,14 @@ static int btintel_setup_combined(struct hci_dev *hdev) case 0x12: /* ThP */ case 0x13: /* HrP */ case 0x14: /* CcP */ - /* Some legacy bootloader devices from JfP supports both old - * and TLV based HCI_Intel_Read_Version command. But we don't - * want to use the TLV based setup routines for those legacy - * bootloader device. + /* Some legacy bootloader devices starting from JfP, + * the operational firmware supports both old and TLV based + * HCI_Intel_Read_Version command based on the command + * parameter. + * + * For upgrading firmware case, the TLV based version cannot + * be used because the firmware filename for legacy bootloader + * is based on the old format. * * Also, it is not easy to convert TLV based version from the * legacy version format. @@ -2513,6 +2517,20 @@ static int btintel_setup_combined(struct hci_dev *hdev) err = btintel_read_version(hdev, &ver); if (err) return err; + + /* Apply the device specific HCI quirks + * + * All Legacy bootloader devices support WBS + */ + set_bit(HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED, &hdev->quirks); + + /* Valid LE States quirk for JfP/ThP familiy */ + if (ver.hw_variant == 0x11 || ver.hw_variant == 0x12) + set_bit(HCI_QUIRK_VALID_LE_STATES, &hdev->quirks); + + /* Setup MSFT Extension support */ + btintel_set_msft_opcode(hdev, ver.hw_variant); + err = btintel_bootloader_setup(hdev, &ver); break; case 0x17: