aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/a2mp.c
diff options
context:
space:
mode:
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>2012-05-29 06:59:10 -0400
committerJohan Hedberg <johan.hedberg@intel.com>2012-06-04 23:34:13 -0400
commit329d81af29344a2ad2f9595310be74644421797a (patch)
treea217c20759c272174a2502505d03a97cb4270ba2 /net/bluetooth/a2mp.c
parent8598d064cbf22b2d84c7cd8a9fcb97138baffe3f (diff)
Bluetooth: A2MP: Process A2MP Change Notify
Placeholder for A2MP Change Notify handler. 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.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/net/bluetooth/a2mp.c b/net/bluetooth/a2mp.c
index 1cc920a62b0f..6cdaa85ab5e9 100644
--- a/net/bluetooth/a2mp.c
+++ b/net/bluetooth/a2mp.c
@@ -161,6 +161,22 @@ static int a2mp_discover_req(struct amp_mgr *mgr, struct sk_buff *skb,
161 return 0; 161 return 0;
162} 162}
163 163
164static int a2mp_change_notify(struct amp_mgr *mgr, struct sk_buff *skb,
165 struct a2mp_cmd *hdr)
166{
167 struct a2mp_cl *cl = (void *) skb->data;
168
169 while (skb->len >= sizeof(*cl)) {
170 BT_DBG("Controller id %d type %d status %d", cl->id, cl->type,
171 cl->status);
172 cl = (struct a2mp_cl *) skb_pull(skb, sizeof(*cl));
173 }
174
175 /* TODO send A2MP_CHANGE_RSP */
176
177 return 0;
178}
179
164/* Handle A2MP signalling */ 180/* Handle A2MP signalling */
165static int a2mp_chan_recv_cb(struct l2cap_chan *chan, struct sk_buff *skb) 181static int a2mp_chan_recv_cb(struct l2cap_chan *chan, struct sk_buff *skb)
166{ 182{
@@ -195,6 +211,9 @@ static int a2mp_chan_recv_cb(struct l2cap_chan *chan, struct sk_buff *skb)
195 break; 211 break;
196 212
197 case A2MP_CHANGE_NOTIFY: 213 case A2MP_CHANGE_NOTIFY:
214 err = a2mp_change_notify(mgr, skb, hdr);
215 break;
216
198 case A2MP_GETINFO_REQ: 217 case A2MP_GETINFO_REQ:
199 case A2MP_GETAMPASSOC_REQ: 218 case A2MP_GETAMPASSOC_REQ:
200 case A2MP_CREATEPHYSLINK_REQ: 219 case A2MP_CREATEPHYSLINK_REQ: