aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_request.h
diff options
context:
space:
mode:
authorDaniel Winkler <danielwinkler@google.com>2020-07-14 14:16:00 -0700
committerMarcel Holtmann <marcel@holtmann.org>2020-07-15 15:16:09 +0200
commit37adf701dd8790fd019c513b7a892d7178170338 (patch)
tree749896925a8dc1282f8912e5e93ceca17db48b00 /net/bluetooth/hci_request.h
parentBluetooth: Prevent out-of-bounds read in hci_inquiry_result_with_rssi_evt() (diff)
downloadlinux-dev-37adf701dd8790fd019c513b7a892d7178170338.tar.xz
linux-dev-37adf701dd8790fd019c513b7a892d7178170338.zip
Bluetooth: Add per-instance adv disable/remove
Add functionality to disable and remove advertising instances, and use that functionality in MGMT add/remove advertising calls. Currently, advertising is globally-disabled, i.e. all instances are disabled together, even if hardware offloading is available. This patch adds functionality to disable and remove individual adv instances, solving two issues: 1. On new advertisement registration, a global disable was done, and then only the new instance was enabled. This meant only the newest instance was actually enabled. 2. On advertisement removal, the structure was removed, but the instance was never disabled or removed, which is incorrect with hardware offload support. Signed-off-by: Daniel Winkler <danielwinkler@google.com> Reviewed-by: Shyh-In Hwang <josephsih@chromium.org> Reviewed-by: Alain Michaud <alainm@chromium.org> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/hci_request.h')
-rw-r--r--net/bluetooth/hci_request.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/bluetooth/hci_request.h b/net/bluetooth/hci_request.h
index 0e81614d235e..bbe892ab078a 100644
--- a/net/bluetooth/hci_request.h
+++ b/net/bluetooth/hci_request.h
@@ -86,6 +86,8 @@ void hci_req_clear_adv_instance(struct hci_dev *hdev, struct sock *sk,
int __hci_req_setup_ext_adv_instance(struct hci_request *req, u8 instance);
int __hci_req_start_ext_adv(struct hci_request *req, u8 instance);
int __hci_req_enable_ext_advertising(struct hci_request *req, u8 instance);
+int __hci_req_disable_ext_adv_instance(struct hci_request *req, u8 instance);
+int __hci_req_remove_ext_adv_instance(struct hci_request *req, u8 instance);
void __hci_req_clear_ext_adv_sets(struct hci_request *req);
int hci_get_random_address(struct hci_dev *hdev, bool require_privacy,
bool use_rpa, struct adv_info *adv_instance,