diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index b096f5f73789ad19c4a9180d976962108fb6753a..f4650a8c11943972fea8f5b062a172f5c1da0f58 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h @@ -125,6 +125,7 @@ enum { HCI_ADVERTISING, HCI_CONNECTABLE, HCI_DISCOVERABLE, + HCI_LIMITED_DISCOVERABLE, HCI_LINK_SECURITY, HCI_PERIODIC_INQ, HCI_FAST_CONNECTABLE, diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 285d571eee6b9c14f93194e87000107409e89b49..d5eaa28bfd520644a2bdbc941ae96fa2e9644ce8 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -724,6 +724,9 @@ static void update_class(struct hci_request *req) cod[1] = hdev->major_class; cod[2] = get_service_classes(hdev); + if (test_bit(HCI_LIMITED_DISCOVERABLE, &hdev->dev_flags)) + cod[1] |= 0x20; + if (memcmp(cod, hdev->dev_class, 3) == 0) return;