Skip to content

Commit 492ad78

Browse files
Vudentzholtmann
authored andcommitted
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 <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
1 parent 10bbffa commit 492ad78

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

net/bluetooth/hci_request.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -904,9 +904,9 @@ static u8 get_adv_instance_scan_rsp_len(struct hci_dev *hdev, u8 instance)
904904
{
905905
struct adv_info *adv_instance;
906906

907-
/* Ignore instance 0 */
907+
/* Instance 0x00 always set local name */
908908
if (instance == 0x00)
909-
return 0;
909+
return 1;
910910

911911
adv_instance = hci_find_adv_instance(hdev, instance);
912912
if (!adv_instance)
@@ -923,9 +923,9 @@ static u8 get_cur_adv_instance_scan_rsp_len(struct hci_dev *hdev)
923923
u8 instance = hdev->cur_adv_instance;
924924
struct adv_info *adv_instance;
925925

926-
/* Ignore instance 0 */
926+
/* Instance 0x00 always set local name */
927927
if (instance == 0x00)
928-
return 0;
928+
return 1;
929929

930930
adv_instance = hci_find_adv_instance(hdev, instance);
931931
if (!adv_instance)

0 commit comments

Comments
 (0)