From: Luiz Augusto von Dentz Date: Thu, 24 Oct 2019 13:15:43 +0000 (+0300) Subject: Bluetooth: Fix not using LE_ADV_NONCONN_IND for instance 0 X-Git-Tag: v5.10.7~3838^2~126^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=492ad783a150cd352abba8723e5942521d938c8d;p=platform%2Fkernel%2Flinux-rpi.git Bluetooth: Fix not using LE_ADV_NONCONN_IND for instance 0 Instance 0 is controlled by stack itself and always set the local name in the scan response. Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann --- diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c index 3a2ec34..ba99c29 100644 --- a/net/bluetooth/hci_request.c +++ b/net/bluetooth/hci_request.c @@ -904,9 +904,9 @@ static u8 get_adv_instance_scan_rsp_len(struct hci_dev *hdev, u8 instance) { struct adv_info *adv_instance; - /* Ignore instance 0 */ + /* Instance 0x00 always set local name */ if (instance == 0x00) - return 0; + return 1; adv_instance = hci_find_adv_instance(hdev, instance); if (!adv_instance) @@ -923,9 +923,9 @@ static u8 get_cur_adv_instance_scan_rsp_len(struct hci_dev *hdev) u8 instance = hdev->cur_adv_instance; struct adv_info *adv_instance; - /* Ignore instance 0 */ + /* Instance 0x00 always set local name */ if (instance == 0x00) - return 0; + return 1; adv_instance = hci_find_adv_instance(hdev, instance); if (!adv_instance)