From: Johan Hedberg Date: Wed, 9 Mar 2016 15:30:33 +0000 (+0200) Subject: Bluetooth: Fix adding discoverable to adv instance flags X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d43efbd0d545f476be0bbef30cbe18234f8a9631;p=linux.git Bluetooth: Fix adding discoverable to adv instance flags When lookup up the advertising instance flags for the default advertising instance (0) the discoverable flag should be filled in based on the HCI_DISCOVERABLE flag. Signed-off-by: Johan Hedberg Signed-off-by: Marcel Holtmann --- diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c index c78ee2dc93237..77be344efd181 100644 --- a/net/bluetooth/hci_request.c +++ b/net/bluetooth/hci_request.c @@ -866,6 +866,9 @@ static u32 get_adv_instance_flags(struct hci_dev *hdev, u8 instance) if (hci_dev_test_flag(hdev, HCI_ADVERTISING_CONNECTABLE)) flags |= MGMT_ADV_FLAG_CONNECTABLE; + if (hci_dev_test_flag(hdev, HCI_DISCOVERABLE)) + flags |= MGMT_ADV_FLAG_DISCOV; + return flags; }