diff options
author | Mat Martineau <mathewm@codeaurora.org> | 2012-10-23 18:24:16 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2012-10-23 22:23:48 -0400 |
commit | 3fd71a0a438aa5bd43f52f3feec24a4cb3b799d3 (patch) | |
tree | aecacc3cb43cd1a00c94f1e1babf1cf742d6853e | |
parent | 1500109bbc6cc42ec6c8445f1cf04d25fa54a57b (diff) |
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>
-rw-r--r-- | net/bluetooth/l2cap_core.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index 4d240c23e9dc..7663a1e6f1cc 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c | |||
@@ -4650,6 +4650,7 @@ static inline int l2cap_move_channel_confirm_rsp(struct l2cap_conn *conn, | |||
4650 | u16 cmd_len, void *data) | 4650 | u16 cmd_len, void *data) |
4651 | { | 4651 | { |
4652 | struct l2cap_move_chan_cfm_rsp *rsp = data; | 4652 | struct l2cap_move_chan_cfm_rsp *rsp = data; |
4653 | struct l2cap_chan *chan; | ||
4653 | u16 icid; | 4654 | u16 icid; |
4654 | 4655 | ||
4655 | if (cmd_len != sizeof(*rsp)) | 4656 | if (cmd_len != sizeof(*rsp)) |
@@ -4659,6 +4660,23 @@ static inline int l2cap_move_channel_confirm_rsp(struct l2cap_conn *conn, | |||
4659 | 4660 | ||
4660 | BT_DBG("icid 0x%4.4x", icid); | 4661 | BT_DBG("icid 0x%4.4x", icid); |
4661 | 4662 | ||
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 | |||
4662 | return 0; | 4680 | return 0; |
4663 | } | 4681 | } |
4664 | 4682 | ||