diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2014-07-10 05:09:09 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-07-10 05:14:20 -0400 |
commit | 13a779e42251184d0f53a8f8299ced614faa028f (patch) | |
tree | a51d25cb750a46bf9b72cc13eb09918984806f1f | |
parent | bc6d2d04182877b198c1a945b7c401decbbb8c02 (diff) |
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>
-rw-r--r-- | include/net/bluetooth/hci_core.h | 1 | ||||
-rw-r--r-- | net/bluetooth/hci_event.c | 1 | ||||
-rw-r--r-- | net/bluetooth/mgmt.c | 13 |
3 files changed, 0 insertions, 15 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index b65efb22be54..7e9e95633a85 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -1288,7 +1288,6 @@ void mgmt_set_powered_failed(struct hci_dev *hdev, int err); | |||
1288 | int mgmt_powered(struct hci_dev *hdev, u8 powered); | 1288 | int mgmt_powered(struct hci_dev *hdev, u8 powered); |
1289 | int mgmt_update_adv_data(struct hci_dev *hdev); | 1289 | int mgmt_update_adv_data(struct hci_dev *hdev); |
1290 | void mgmt_discoverable_timeout(struct hci_dev *hdev); | 1290 | void mgmt_discoverable_timeout(struct hci_dev *hdev); |
1291 | void mgmt_write_scan_failed(struct hci_dev *hdev, u8 scan, u8 status); | ||
1292 | void mgmt_new_link_key(struct hci_dev *hdev, struct link_key *key, | 1291 | void mgmt_new_link_key(struct hci_dev *hdev, struct link_key *key, |
1293 | bool persistent); | 1292 | bool persistent); |
1294 | void mgmt_device_connected(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, | 1293 | void mgmt_device_connected(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, |
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 760bbd88f3c5..a62e918d2641 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
@@ -309,7 +309,6 @@ static void hci_cc_write_scan_enable(struct hci_dev *hdev, struct sk_buff *skb) | |||
309 | hci_dev_lock(hdev); | 309 | hci_dev_lock(hdev); |
310 | 310 | ||
311 | if (status) { | 311 | if (status) { |
312 | mgmt_write_scan_failed(hdev, param, status); | ||
313 | hdev->discov_timeout = 0; | 312 | hdev->discov_timeout = 0; |
314 | goto done; | 313 | goto done; |
315 | } | 314 | } |
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 1dad7bffc6af..7703b72653ff 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -6049,19 +6049,6 @@ void mgmt_discoverable_timeout(struct hci_dev *hdev) | |||
6049 | hci_dev_unlock(hdev); | 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 | void mgmt_new_link_key(struct hci_dev *hdev, struct link_key *key, | 6052 | void mgmt_new_link_key(struct hci_dev *hdev, struct link_key *key, |
6066 | bool persistent) | 6053 | bool persistent) |
6067 | { | 6054 | { |