Bluetooth: L2CAP: Add RTX timer for 'disconnect' command

Gets armed disconnect channel command on BR/EDR transport with RTX timer.
There's no need to implcitly cancel the timer in the response
since it's always called by channel 'destroy' handler indirectly.

Change-Id: I6e0a777be670f49a517b1145b2e012831214c539
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
This commit is contained in:
Arkadiusz Lichwa 2016-08-03 15:47:17 +02:00 committed by Johan Hedberg
commit 5287f4c49a

View file

@ -57,6 +57,7 @@
#define L2CAP_BR_INFO_TIMEOUT SECONDS(4)
#define L2CAP_BR_CFG_TIMEOUT SECONDS(4)
#define L2CAP_BR_DISCONN_TIMEOUT SECONDS(1)
/*
* L2CAP extended feature mask:
@ -1159,7 +1160,7 @@ int bt_l2cap_br_chan_disconnect(struct bt_l2cap_chan *chan)
req->dcid = sys_cpu_to_le16(ch->tx.cid);
req->scid = sys_cpu_to_le16(ch->rx.cid);
bt_l2cap_send(chan->conn, BT_L2CAP_CID_BR_SIG, buf);
l2cap_br_chan_send_req(ch, buf, L2CAP_BR_DISCONN_TIMEOUT);
l2cap_br_state_set(chan, BT_L2CAP_DISCONNECT);
return 0;