]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Bluetooth: Store scan response data in HCI device
authorMarcel Holtmann <marcel@holtmann.org>
Wed, 16 Oct 2013 07:16:47 +0000 (00:16 -0700)
committerJohan Hedberg <johan.hedberg@intel.com>
Wed, 16 Oct 2013 07:30:05 +0000 (10:30 +0300)
The scan response data needs to be stored in HCI device and so
add a buffer for it and also ensure to clear it when resetting
the controller.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
include/net/bluetooth/hci_core.h
net/bluetooth/hci_event.c

index 0a3a10a76b6c7329d7568f89e87e4d9b6520f8ac..d987c795ba143a5579b49ead855dbb091ab6e271 100644 (file)
@@ -283,6 +283,8 @@ struct hci_dev {
        __s8                    adv_tx_power;
        __u8                    adv_data[HCI_MAX_AD_LENGTH];
        __u8                    adv_data_len;
+       __u8                    scan_rsp_data[HCI_MAX_AD_LENGTH];
+       __u8                    scan_rsp_data_len;
 
        int (*open)(struct hci_dev *hdev);
        int (*close)(struct hci_dev *hdev);
index 7450626b77049bb5416fb82fa5f27a40acf4dbeb..e71c98fedc9b79da3b1b6647a4f4e6af8d56e972 100644 (file)
@@ -195,6 +195,9 @@ static void hci_cc_reset(struct hci_dev *hdev, struct sk_buff *skb)
 
        memset(hdev->adv_data, 0, sizeof(hdev->adv_data));
        hdev->adv_data_len = 0;
+
+       memset(hdev->scan_rsp_data, 0, sizeof(hdev->scan_rsp_data));
+       hdev->scan_rsp_data_len = 0;
 }
 
 static void hci_cc_write_local_name(struct hci_dev *hdev, struct sk_buff *skb)