Skip to content

Commit 0bd1fb5

Browse files
fdanis-ossVudentz
authored andcommitted
Bluetooth: mgmt: Fix limited discoverable off timeout
LIMITED_DISCOVERABLE flag is not reset from Class of Device and advertisement on limited discoverable timeout. This prevents to pass PTS test GAP/DISC/LIMM/BV-02-C Calling set_discoverable_sync as when the limited discovery is set correctly update the Class of Device and advertisement. Signed-off-by: Frédéric Danis <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent 61a5ab7 commit 0bd1fb5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

net/bluetooth/mgmt.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1045,6 +1045,8 @@ static void rpa_expired(struct work_struct *work)
10451045
hci_cmd_sync_queue(hdev, rpa_expired_sync, NULL, NULL);
10461046
}
10471047

1048+
static int set_discoverable_sync(struct hci_dev *hdev, void *data);
1049+
10481050
static void discov_off(struct work_struct *work)
10491051
{
10501052
struct hci_dev *hdev = container_of(work, struct hci_dev,
@@ -1063,7 +1065,7 @@ static void discov_off(struct work_struct *work)
10631065
hci_dev_clear_flag(hdev, HCI_DISCOVERABLE);
10641066
hdev->discov_timeout = 0;
10651067

1066-
hci_update_discoverable(hdev);
1068+
hci_cmd_sync_queue(hdev, set_discoverable_sync, NULL, NULL);
10671069

10681070
mgmt_new_settings(hdev);
10691071

0 commit comments

Comments
 (0)