Add direction parameter to phylink_add since it is anyway set later.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
 void amp_ctrl_list_flush(struct amp_mgr *mgr);
 
 struct hci_conn *phylink_add(struct hci_dev *hdev, struct amp_mgr *mgr,
-                            u8 remote_id);
+                            u8 remote_id, bool out);
 
 int phylink_gen_key(struct hci_conn *hcon, u8 *data, u8 *len, u8 *type);
 
 
        if (!hdev)
                return -EINVAL;
 
-       hcon = phylink_add(hdev, mgr, rsp->id);
+       hcon = phylink_add(hdev, mgr, rsp->id, true);
        if (!hcon)
                goto done;
 
                amp_ctrl_put(ctrl);
        }
 
-       hcon = phylink_add(hdev, mgr, req->local_id);
+       hcon = phylink_add(hdev, mgr, req->local_id, false);
        if (hcon) {
                amp_accept_phylink(hdev, mgr, hcon);
                rsp.status = A2MP_STATUS_SUCCESS;
 
 }
 
 struct hci_conn *phylink_add(struct hci_dev *hdev, struct amp_mgr *mgr,
-                            u8 remote_id)
+                            u8 remote_id, bool out)
 {
        bdaddr_t *dst = mgr->l2cap_conn->dst;
        struct hci_conn *hcon;
        if (!hcon)
                return NULL;
 
+       BT_DBG("hcon %p dst %pMR", hcon, dst);
+
        hcon->state = BT_CONNECT;
-       hcon->out = true;
        hcon->attempt++;
        hcon->handle = __next_handle(mgr);
        hcon->remote_id = remote_id;
        hcon->amp_mgr = mgr;
+       hcon->out = out;
 
        return hcon;
 }