Skip to content

Commit 13a779e

Browse files
jhedbergholtmann
authored andcommitted
Bluetooth: Remove unneeded mgmt_write_scan_failed function
The Set Connectable/Discoverable mgmt handlers use a hci_request with a proper callback to handle the HCI command sending. It makes therefore little sense to have this extra function to be called from hci_event.c for command failures. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
1 parent bc6d2d0 commit 13a779e

3 files changed

Lines changed: 0 additions & 15 deletions

File tree

‎include/net/bluetooth/hci_core.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1288,7 +1288,6 @@ void mgmt_set_powered_failed(struct hci_dev *hdev, int err);
12881288
int mgmt_powered(struct hci_dev *hdev, u8 powered);
12891289
int mgmt_update_adv_data(struct hci_dev *hdev);
12901290
void mgmt_discoverable_timeout(struct hci_dev *hdev);
1291-
void mgmt_write_scan_failed(struct hci_dev *hdev, u8 scan, u8 status);
12921291
void mgmt_new_link_key(struct hci_dev *hdev, struct link_key *key,
12931292
bool persistent);
12941293
void mgmt_device_connected(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type,

‎net/bluetooth/hci_event.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,6 @@ static void hci_cc_write_scan_enable(struct hci_dev *hdev, struct sk_buff *skb)
309309
hci_dev_lock(hdev);
310310

311311
if (status) {
312-
mgmt_write_scan_failed(hdev, param, status);
313312
hdev->discov_timeout = 0;
314313
goto done;
315314
}

‎net/bluetooth/mgmt.c‎

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6049,19 +6049,6 @@ void mgmt_discoverable_timeout(struct hci_dev *hdev)
60496049
hci_dev_unlock(hdev);
60506050
}
60516051

6052-
void mgmt_write_scan_failed(struct hci_dev *hdev, u8 scan, u8 status)
6053-
{
6054-
u8 mgmt_err = mgmt_status(status);
6055-
6056-
if (scan & SCAN_PAGE)
6057-
mgmt_pending_foreach(MGMT_OP_SET_CONNECTABLE, hdev,
6058-
cmd_status_rsp, &mgmt_err);
6059-
6060-
if (scan & SCAN_INQUIRY)
6061-
mgmt_pending_foreach(MGMT_OP_SET_DISCOVERABLE, hdev,
6062-
cmd_status_rsp, &mgmt_err);
6063-
}
6064-
60656052
void mgmt_new_link_key(struct hci_dev *hdev, struct link_key *key,
60666053
bool persistent)
60676054
{

0 commit comments

Comments
 (0)