From: Kiran K Date: Tue, 7 Sep 2021 10:12:41 +0000 (+0530) Subject: Bluetooth: btintel: Define callback to fetch data_path_id X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d586029c282c3ef398cba0d8d55d7ce1e5e40faa;p=linux.git Bluetooth: btintel: Define callback to fetch data_path_id For Intel controllers supporting HFP offload usecase, define a callback function to fetch data_path_id Signed-off-by: Kiran K Reviewed-by: Chethan T N Reviewed-by: Srivatsa Ravishankar Signed-off-by: Luiz Augusto von Dentz --- diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c index 60f9866c6792e..751e0f0b82425 100644 --- a/drivers/bluetooth/btintel.c +++ b/drivers/bluetooth/btintel.c @@ -2158,6 +2158,13 @@ done: 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; @@ -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;