diff options
author | Jaganath Kanakkassery <jaganath.k.os@gmail.com> | 2017-12-11 09:56:47 -0500 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2017-12-12 18:28:42 -0500 |
commit | 94386b6a5b2c2102e832507ced90a14e6e3568eb (patch) | |
tree | c326b9a8898f69f1ed3d83c9dc266434d819d521 /net/bluetooth/hci_request.c | |
parent | 8a950794484480641b3f3fceb89b7f6e2d1e1328 (diff) |
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>
Diffstat (limited to 'net/bluetooth/hci_request.c')
-rw-r--r-- | net/bluetooth/hci_request.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c index abc0f3224dd1..da59f82754bc 100644 --- a/net/bluetooth/hci_request.c +++ b/net/bluetooth/hci_request.c | |||
@@ -1985,13 +1985,6 @@ unlock: | |||
1985 | hci_dev_unlock(hdev); | 1985 | hci_dev_unlock(hdev); |
1986 | } | 1986 | } |
1987 | 1987 | ||
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 | |||
1995 | static int active_scan(struct hci_request *req, unsigned long opt) | 1988 | static int active_scan(struct hci_request *req, unsigned long opt) |
1996 | { | 1989 | { |
1997 | uint16_t interval = opt; | 1990 | uint16_t interval = opt; |
@@ -2017,7 +2010,7 @@ static int active_scan(struct hci_request *req, unsigned long opt) | |||
2017 | cancel_adv_timeout(hdev); | 2010 | cancel_adv_timeout(hdev); |
2018 | hci_dev_unlock(hdev); | 2011 | hci_dev_unlock(hdev); |
2019 | 2012 | ||
2020 | disable_advertising(req); | 2013 | __hci_req_disable_advertising(req); |
2021 | } | 2014 | } |
2022 | 2015 | ||
2023 | /* If controller is scanning, it means the background scanning is | 2016 | /* If controller is scanning, it means the background scanning is |