Commit 94386b6a authored by Jaganath Kanakkassery's avatar Jaganath Kanakkassery Committed by Marcel Holtmann

Bluetooth: Remove redundant disable_advertising()

There is already __hci_req_disable_advertising() function for disabling,
so use it.
Signed-off-by: default avatarJaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 8a950794
......@@ -1985,13 +1985,6 @@ static void le_scan_restart_work(struct work_struct *work)
hci_dev_unlock(hdev);
}
static void disable_advertising(struct hci_request *req)
{
u8 enable = 0x00;
hci_req_add(req, HCI_OP_LE_SET_ADV_ENABLE, sizeof(enable), &enable);
}
static int active_scan(struct hci_request *req, unsigned long opt)
{
uint16_t interval = opt;
......@@ -2017,7 +2010,7 @@ static int active_scan(struct hci_request *req, unsigned long opt)
cancel_adv_timeout(hdev);
hci_dev_unlock(hdev);
disable_advertising(req);
__hci_req_disable_advertising(req);
}
/* If controller is scanning, it means the background scanning is
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment