Commit 3fd71a0a authored by Mat Martineau's avatar Mat Martineau Committed by Gustavo Padovan

Bluetooth: Add move confirm response handling

The move confirm response concludes the channel move command sequence.
Receipt of this command indicates that data may begin to flow again.
Signed-off-by: default avatarMat Martineau <mathewm@codeaurora.org>
Acked-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Acked-by: default avatarAndrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
parent 1500109b
...@@ -4650,6 +4650,7 @@ static inline int l2cap_move_channel_confirm_rsp(struct l2cap_conn *conn, ...@@ -4650,6 +4650,7 @@ static inline int l2cap_move_channel_confirm_rsp(struct l2cap_conn *conn,
u16 cmd_len, void *data) u16 cmd_len, void *data)
{ {
struct l2cap_move_chan_cfm_rsp *rsp = data; struct l2cap_move_chan_cfm_rsp *rsp = data;
struct l2cap_chan *chan;
u16 icid; u16 icid;
if (cmd_len != sizeof(*rsp)) if (cmd_len != sizeof(*rsp))
...@@ -4659,6 +4660,23 @@ static inline int l2cap_move_channel_confirm_rsp(struct l2cap_conn *conn, ...@@ -4659,6 +4660,23 @@ static inline int l2cap_move_channel_confirm_rsp(struct l2cap_conn *conn,
BT_DBG("icid 0x%4.4x", icid); BT_DBG("icid 0x%4.4x", icid);
chan = l2cap_get_chan_by_scid(conn, icid);
if (!chan)
return 0;
__clear_chan_timer(chan);
if (chan->move_state == L2CAP_MOVE_WAIT_CONFIRM_RSP) {
chan->local_amp_id = chan->move_id;
if (!chan->local_amp_id && chan->hs_hchan)
__release_logical_link(chan);
l2cap_move_done(chan);
}
l2cap_chan_unlock(chan);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment