Skip to content

Commit 3fd71a0

Browse files
Mat MartineauGustavo Padovan
authored andcommitted
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: Mat Martineau <mathewm@codeaurora.org> Acked-by: Marcel Holtmann <marcel@holtmann.org> Acked-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
1 parent 1500109 commit 3fd71a0

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

‎net/bluetooth/l2cap_core.c‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4650,6 +4650,7 @@ static inline int l2cap_move_channel_confirm_rsp(struct l2cap_conn *conn,
46504650
u16 cmd_len, void *data)
46514651
{
46524652
struct l2cap_move_chan_cfm_rsp *rsp = data;
4653+
struct l2cap_chan *chan;
46534654
u16 icid;
46544655

46554656
if (cmd_len != sizeof(*rsp))
@@ -4659,6 +4660,23 @@ static inline int l2cap_move_channel_confirm_rsp(struct l2cap_conn *conn,
46594660

46604661
BT_DBG("icid 0x%4.4x", icid);
46614662

4663+
chan = l2cap_get_chan_by_scid(conn, icid);
4664+
if (!chan)
4665+
return 0;
4666+
4667+
__clear_chan_timer(chan);
4668+
4669+
if (chan->move_state == L2CAP_MOVE_WAIT_CONFIRM_RSP) {
4670+
chan->local_amp_id = chan->move_id;
4671+
4672+
if (!chan->local_amp_id && chan->hs_hchan)
4673+
__release_logical_link(chan);
4674+
4675+
l2cap_move_done(chan);
4676+
}
4677+
4678+
l2cap_chan_unlock(chan);
4679+
46624680
return 0;
46634681
}
46644682

0 commit comments

Comments
 (0)