mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
Bluetooth: AMP: Remove hci_conn receiving error command status
When receiving HCI Event: Command Status for Create Physical Link with Error code remove AMP hcon. Signed-off-by: Andrei Emeltchenko <[email protected]> Acked-by: Marcel Holtmann <[email protected]> Signed-off-by: Gustavo Padovan <[email protected]>
This commit is contained in:
parent
9eef6b3a9e
commit
e58917b990
1 changed files with 13 additions and 4 deletions
|
|
@ -1809,14 +1809,23 @@ static void hci_cs_create_phylink(struct hci_dev *hdev, u8 status)
|
|||
|
||||
BT_DBG("%s status 0x%2.2x", hdev->name, status);
|
||||
|
||||
if (status)
|
||||
return;
|
||||
|
||||
cp = hci_sent_cmd_data(hdev, HCI_OP_CREATE_PHY_LINK);
|
||||
if (!cp)
|
||||
return;
|
||||
|
||||
amp_write_remote_assoc(hdev, cp->phy_handle);
|
||||
hci_dev_lock(hdev);
|
||||
|
||||
if (status) {
|
||||
struct hci_conn *hcon;
|
||||
|
||||
hcon = hci_conn_hash_lookup_handle(hdev, cp->phy_handle);
|
||||
if (hcon)
|
||||
hci_conn_del(hcon);
|
||||
} else {
|
||||
amp_write_remote_assoc(hdev, cp->phy_handle);
|
||||
}
|
||||
|
||||
hci_dev_unlock(hdev);
|
||||
}
|
||||
|
||||
static void hci_cs_accept_phylink(struct hci_dev *hdev, u8 status)
|
||||
|
|
|
|||
Loading…
Reference in a new issue