diff options
-rw-r--r-- | include/net/bluetooth/hci_core.h | 4 | ||||
-rw-r--r-- | net/bluetooth/mgmt.c | 13 |
2 files changed, 7 insertions, 10 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 62e2fc1bc7cc..429969fdb9f3 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -1106,8 +1106,8 @@ int mgmt_device_connected(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, | |||
1106 | u8 *dev_class); | 1106 | u8 *dev_class); |
1107 | int mgmt_device_disconnected(struct hci_dev *hdev, bdaddr_t *bdaddr, | 1107 | int mgmt_device_disconnected(struct hci_dev *hdev, bdaddr_t *bdaddr, |
1108 | u8 link_type, u8 addr_type, u8 reason); | 1108 | u8 link_type, u8 addr_type, u8 reason); |
1109 | int mgmt_disconnect_failed(struct hci_dev *hdev, bdaddr_t *bdaddr, | 1109 | void mgmt_disconnect_failed(struct hci_dev *hdev, bdaddr_t *bdaddr, |
1110 | u8 link_type, u8 addr_type, u8 status); | 1110 | u8 link_type, u8 addr_type, u8 status); |
1111 | int mgmt_connect_failed(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, | 1111 | int mgmt_connect_failed(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, |
1112 | u8 addr_type, u8 status); | 1112 | u8 addr_type, u8 status); |
1113 | int mgmt_pin_code_request(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 secure); | 1113 | int mgmt_pin_code_request(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 secure); |
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 5da7464e57a5..a35f28e9172e 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -4143,29 +4143,26 @@ int mgmt_device_disconnected(struct hci_dev *hdev, bdaddr_t *bdaddr, | |||
4143 | return err; | 4143 | return err; |
4144 | } | 4144 | } |
4145 | 4145 | ||
4146 | int mgmt_disconnect_failed(struct hci_dev *hdev, bdaddr_t *bdaddr, | 4146 | void mgmt_disconnect_failed(struct hci_dev *hdev, bdaddr_t *bdaddr, |
4147 | u8 link_type, u8 addr_type, u8 status) | 4147 | u8 link_type, u8 addr_type, u8 status) |
4148 | { | 4148 | { |
4149 | struct mgmt_rp_disconnect rp; | 4149 | struct mgmt_rp_disconnect rp; |
4150 | struct pending_cmd *cmd; | 4150 | struct pending_cmd *cmd; |
4151 | int err; | ||
4152 | 4151 | ||
4153 | mgmt_pending_foreach(MGMT_OP_UNPAIR_DEVICE, hdev, unpair_device_rsp, | 4152 | mgmt_pending_foreach(MGMT_OP_UNPAIR_DEVICE, hdev, unpair_device_rsp, |
4154 | hdev); | 4153 | hdev); |
4155 | 4154 | ||
4156 | cmd = mgmt_pending_find(MGMT_OP_DISCONNECT, hdev); | 4155 | cmd = mgmt_pending_find(MGMT_OP_DISCONNECT, hdev); |
4157 | if (!cmd) | 4156 | if (!cmd) |
4158 | return -ENOENT; | 4157 | return; |
4159 | 4158 | ||
4160 | bacpy(&rp.addr.bdaddr, bdaddr); | 4159 | bacpy(&rp.addr.bdaddr, bdaddr); |
4161 | rp.addr.type = link_to_bdaddr(link_type, addr_type); | 4160 | rp.addr.type = link_to_bdaddr(link_type, addr_type); |
4162 | 4161 | ||
4163 | err = cmd_complete(cmd->sk, cmd->index, MGMT_OP_DISCONNECT, | 4162 | cmd_complete(cmd->sk, cmd->index, MGMT_OP_DISCONNECT, |
4164 | mgmt_status(status), &rp, sizeof(rp)); | 4163 | mgmt_status(status), &rp, sizeof(rp)); |
4165 | 4164 | ||
4166 | mgmt_pending_remove(cmd); | 4165 | mgmt_pending_remove(cmd); |
4167 | |||
4168 | return err; | ||
4169 | } | 4166 | } |
4170 | 4167 | ||
4171 | int mgmt_connect_failed(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, | 4168 | int mgmt_connect_failed(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, |