Skip to content

Commit 94386b6

Browse files
jaganathkrholtmann
authored andcommitted
Bluetooth: Remove redundant disable_advertising()
There is already __hci_req_disable_advertising() function for disabling, so use it. Signed-off-by: Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
1 parent 8a95079 commit 94386b6

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

net/bluetooth/hci_request.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1985,13 +1985,6 @@ static void le_scan_restart_work(struct work_struct *work)
19851985
hci_dev_unlock(hdev);
19861986
}
19871987

1988-
static void disable_advertising(struct hci_request *req)
1989-
{
1990-
u8 enable = 0x00;
1991-
1992-
hci_req_add(req, HCI_OP_LE_SET_ADV_ENABLE, sizeof(enable), &enable);
1993-
}
1994-
19951988
static int active_scan(struct hci_request *req, unsigned long opt)
19961989
{
19971990
uint16_t interval = opt;
@@ -2017,7 +2010,7 @@ static int active_scan(struct hci_request *req, unsigned long opt)
20172010
cancel_adv_timeout(hdev);
20182011
hci_dev_unlock(hdev);
20192012

2020-
disable_advertising(req);
2013+
__hci_req_disable_advertising(req);
20212014
}
20222015

20232016
/* If controller is scanning, it means the background scanning is

0 commit comments

Comments
 (0)