summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/amp.c
diff options
context:
space:
mode:
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>2012-10-05 15:56:56 +0200
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>2012-10-08 00:21:51 +0200
commita0c234fe8972aa6a5afe2db6c27a3f5d5fbd88e7 (patch)
treea47cdeec7101d6b06537174b3d41358a572ebd1f /net/bluetooth/amp.c
parentBluetooth: AMP: Factor out amp_ctrl_add (diff)
downloadlinux-a0c234fe8972aa6a5afe2db6c27a3f5d5fbd88e7.tar.xz
linux-a0c234fe8972aa6a5afe2db6c27a3f5d5fbd88e7.zip
Bluetooth: AMP: Factor out phylink_add
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>
Diffstat (limited to 'net/bluetooth/amp.c')
-rw-r--r--net/bluetooth/amp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/bluetooth/amp.c b/net/bluetooth/amp.c
index 2fc5562a84b9..59da0f15818e 100644
--- a/net/bluetooth/amp.c
+++ b/net/bluetooth/amp.c
@@ -108,7 +108,7 @@ static u8 __next_handle(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)
{
bdaddr_t *dst = mgr->l2cap_conn->dst;
struct hci_conn *hcon;
@@ -117,12 +117,14 @@ struct hci_conn *phylink_add(struct hci_dev *hdev, struct amp_mgr *mgr,
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;
}