|
@@ -269,6 +269,19 @@ static void hci_conn_idle(unsigned long arg)
|
|
|
hci_conn_enter_sniff_mode(conn);
|
|
|
}
|
|
|
|
|
|
+static void hci_conn_auto_accept(unsigned long arg)
|
|
|
+{
|
|
|
+ struct hci_conn *conn = (void *) arg;
|
|
|
+ struct hci_dev *hdev = conn->hdev;
|
|
|
+
|
|
|
+ hci_dev_lock(hdev);
|
|
|
+
|
|
|
+ hci_send_cmd(hdev, HCI_OP_USER_CONFIRM_REPLY, sizeof(conn->dst),
|
|
|
+ &conn->dst);
|
|
|
+
|
|
|
+ hci_dev_unlock(hdev);
|
|
|
+}
|
|
|
+
|
|
|
struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst)
|
|
|
{
|
|
|
struct hci_conn *conn;
|
|
@@ -312,6 +325,8 @@ struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst)
|
|
|
|
|
|
setup_timer(&conn->disc_timer, hci_conn_timeout, (unsigned long)conn);
|
|
|
setup_timer(&conn->idle_timer, hci_conn_idle, (unsigned long)conn);
|
|
|
+ setup_timer(&conn->auto_accept_timer, hci_conn_auto_accept,
|
|
|
+ (unsigned long) conn);
|
|
|
|
|
|
atomic_set(&conn->refcnt, 0);
|
|
|
|
|
@@ -342,6 +357,8 @@ int hci_conn_del(struct hci_conn *conn)
|
|
|
|
|
|
del_timer(&conn->disc_timer);
|
|
|
|
|
|
+ del_timer(&conn->auto_accept_timer);
|
|
|
+
|
|
|
if (conn->type == ACL_LINK) {
|
|
|
struct hci_conn *sco = conn->link;
|
|
|
if (sco)
|