Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Johan Hedberg and committed by
Marcel Holtmann
13a779e4 bc6d2d04

-15
-1
include/net/bluetooth/hci_core.h
··· 1288 1288 int mgmt_powered(struct hci_dev *hdev, u8 powered); 1289 1289 int mgmt_update_adv_data(struct hci_dev *hdev); 1290 1290 void mgmt_discoverable_timeout(struct hci_dev *hdev); 1291 - void mgmt_write_scan_failed(struct hci_dev *hdev, u8 scan, u8 status); 1292 1291 void mgmt_new_link_key(struct hci_dev *hdev, struct link_key *key, 1293 1292 bool persistent); 1294 1293 void mgmt_device_connected(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type,
-1
net/bluetooth/hci_event.c
··· 309 309 hci_dev_lock(hdev); 310 310 311 311 if (status) { 312 - mgmt_write_scan_failed(hdev, param, status); 313 312 hdev->discov_timeout = 0; 314 313 goto done; 315 314 }
-13
net/bluetooth/mgmt.c
··· 6049 6049 hci_dev_unlock(hdev); 6050 6050 } 6051 6051 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 - 6065 6052 void mgmt_new_link_key(struct hci_dev *hdev, struct link_key *key, 6066 6053 bool persistent) 6067 6054 {