From 5287f4c49a00a24fe094bf3278b847ec25dedda3 Mon Sep 17 00:00:00 2001 From: Arkadiusz Lichwa Date: Wed, 3 Aug 2016 15:47:17 +0200 Subject: [PATCH] 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 --- net/bluetooth/l2cap_br.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/bluetooth/l2cap_br.c b/net/bluetooth/l2cap_br.c index a4110589cbe..111ae902ee7 100644 --- a/net/bluetooth/l2cap_br.c +++ b/net/bluetooth/l2cap_br.c @@ -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;