Skip to content

Commit

Permalink
Bluetooth: btintel: Define callback to fetch data_path_id
Browse files Browse the repository at this point in the history
For Intel controllers supporting HFP offload usecase,
define a callback function to fetch data_path_id

Signed-off-by: Kiran K <kiran.k@intel.com>
Reviewed-by: Chethan T N <chethan.tumkur.narayan@intel.com>
Reviewed-by: Srivatsa Ravishankar <ravishankar.srivatsa@intel.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
  • Loading branch information
Kiran K authored and Luiz Augusto von Dentz committed Sep 7, 2021
1 parent 248733e commit d586029
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/bluetooth/btintel.c
Original file line number Diff line number Diff line change
Expand Up @@ -2158,6 +2158,13 @@ static int btintel_prepare_fw_download_tlv(struct hci_dev *hdev,
return err;
}

static int btintel_get_data_path_id(struct hci_dev *hdev, __u8 *data_path_id)
{
/* Intel uses 1 as data path id for all the usecases */
*data_path_id = 1;
return 0;
}

static int btintel_configure_offload(struct hci_dev *hdev)
{
struct sk_buff *skb;
Expand All @@ -2182,6 +2189,9 @@ static int btintel_configure_offload(struct hci_dev *hdev)
err = -bt_to_errno(skb->data[0]);
goto error;
}

if (use_cases->preset[0] & 0x03)
hdev->get_data_path_id = btintel_get_data_path_id;
error:
kfree_skb(skb);
return err;
Expand Down

0 comments on commit d586029

Please sign in to comment.