Skip to content

Commit

Permalink
Bluetooth: Fix not using LE_ADV_NONCONN_IND for instance 0
Browse files Browse the repository at this point in the history
Instance 0 is controlled by stack itself and always set the local name
in the scan response.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
Luiz Augusto von Dentz authored and Marcel Holtmann committed Oct 26, 2019
1 parent 10bbffa commit 492ad78
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions net/bluetooth/hci_request.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 492ad78

Please sign in to comment.