@@ -642,6 +642,11 @@ struct hci_dev {
void (*cmd_timeout)(struct hci_dev *hdev);
bool (*wakeup)(struct hci_dev *hdev);
int (*set_quality_report)(struct hci_dev *hdev, bool enable);
+ struct ext_vendor_prefix *(*vendor_get_ext_prefix)(
+ struct hci_dev *hdev);
+ void (*vendor_evt)(struct hci_dev *hdev, struct sk_buff *skb);
+ int (*hci_recv_quality_report)(struct hci_dev *hdev, void *data,
+ u32 data_len, u8 quality_spec);
int (*get_data_path_id)(struct hci_dev *hdev, __u8 *data_path);
int (*get_codec_config_data)(struct hci_dev *hdev, __u8 type,
struct bt_codec *codec, __u8 *vnd_len,
@@ -2650,6 +2650,7 @@ int hci_register_dev(struct hci_dev *hdev)
idr_init(&hdev->adv_monitors_idr);
msft_register(hdev);
+ hdev->hci_recv_quality_report = mgmt_quality_report;
return id;
@@ -4260,6 +4260,20 @@ static void hci_num_comp_blocks_evt(struct hci_dev *hdev, void *data,
queue_work(hdev->workqueue, &hdev->tx_work);
}
+static struct ext_vendor_prefix *vendor_get_ext_prefix(struct hci_dev *hdev)
+{
+ if (hdev->vendor_get_ext_prefix)
+ return hdev->vendor_get_ext_prefix(hdev);
+
+ return NULL;
+}
+
+static void vendor_evt(struct hci_dev *hdev, struct sk_buff *skb)
+{
+ if (hdev->vendor_evt)
+ hdev->vendor_evt(hdev, skb);
+}
+
/* Every distinct vendor specification must have a well-defined vendor
* event prefix to determine if a vendor event meets the specification.
* Some vendor prefixes are fixed values while some other vendor prefixes
@@ -4276,6 +4290,11 @@ struct ext_vendor_event_prefix {
{ aosp_get_ext_prefix, aosp_vendor_evt },
{ msft_get_ext_prefix, msft_vendor_evt },
+ /* Any vendor driver that handles particular vendor events should set
+ * up hdev->vendor_get_prefix and hdev->vendor_evt callbacks in driver.
+ */
+ { vendor_get_ext_prefix, vendor_evt },
+
/* end with a null entry */
{},
};