summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/a2mp.c
diff options
context:
space:
mode:
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>2012-05-29 12:59:17 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2012-06-05 05:34:14 +0200
commit97e8e89d2d8185b7644c9941636d3682eedc517b (patch)
treeb9db250da912d6185c03f2a93145ef9f69d4c32a /net/bluetooth/a2mp.c
parentBluetooth: A2MP: Handling fixed channels (diff)
downloadlinux-97e8e89d2d8185b7644c9941636d3682eedc517b.tar.xz
linux-97e8e89d2d8185b7644c9941636d3682eedc517b.zip
Bluetooth: A2MP: Manage incoming connections
Handle incoming A2MP connection by creating AMP manager and processing A2MP messages. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth/a2mp.c')
-rw-r--r--net/bluetooth/a2mp.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/net/bluetooth/a2mp.c b/net/bluetooth/a2mp.c
index f1ec1b1d308f..e08ca2ac31aa 100644
--- a/net/bluetooth/a2mp.c
+++ b/net/bluetooth/a2mp.c
@@ -569,3 +569,19 @@ static struct amp_mgr *amp_mgr_create(struct l2cap_conn *conn)
return mgr;
}
+
+struct l2cap_chan *a2mp_channel_create(struct l2cap_conn *conn,
+ struct sk_buff *skb)
+{
+ struct amp_mgr *mgr;
+
+ mgr = amp_mgr_create(conn);
+ if (!mgr) {
+ BT_ERR("Could not create AMP manager");
+ return NULL;
+ }
+
+ BT_DBG("mgr: %p chan %p", mgr, mgr->a2mp_chan);
+
+ return mgr->a2mp_chan;
+}