Re: [PATCH v1 1/2] Bluetooth: hci_qca: Refactor HFP hardware offload capability handling
From: Mengshi Wu
Date: Mon Jan 26 2026 - 11:21:35 EST
Hi,
On 1/24/2026 3:26 AM, Dmitry Baryshkov wrote:
> On Fri, Jan 23, 2026 at 01:52:42PM +0800, Mengshi Wu wrote:
>> Replace SoC-specific check with capability-based approach for HFP
>> hardware offload configuration. Add QCA_CAP_HFP_HW_OFFLOAD capability
>> flag and support_hfp_hw_offload field to qca_serdev structure.
>>
>> Signed-off-by: Mengshi Wu <mengshi.wu@xxxxxxxxxxxxxxxx>
>> ---
>> drivers/bluetooth/hci_qca.c | 10 +++++++---
>> 1 file changed, 7 insertions(+), 3 deletions(-)
>>
>> @@ -2033,7 +2034,7 @@ static int qca_setup(struct hci_uart *hu)
>> else
>> hu->hdev->set_bdaddr = qca_set_bdaddr;
>>
>> - if (soc_type == QCA_QCA2066)
>> + if (qcadev->support_hfp_hw_offload)
>
> At this point QCA2066 becomes broken until the next commit. This is not
> a proper way to do things. At the very least, squash the first chunk of
> your next commit into this patch.
Thanks for comments. I will fix this.
>
>> qca_configure_hfp_offload(hdev);
>>
>> qca->fw_version = le16_to_cpu(ver.patch_ver);
>> @@ -2502,6 +2503,9 @@ static int qca_serdev_probe(struct serdev_device *serdev)
>>
>> if (!(data->capabilities & QCA_CAP_VALID_LE_STATES))
>> hci_set_quirk(hdev, HCI_QUIRK_BROKEN_LE_STATES);
>> +
>> + if (data->capabilities & QCA_CAP_HFP_HW_OFFLOAD)
>> + qcadev->support_hfp_hw_offload = true;
>> }
>>
>> return 0;
>> --
>> 2.34.1
>>
>
--
Best regards,
Mengshi Wu