From: Gustavo F. Padovan Date: Wed, 9 Jun 2010 19:39:05 +0000 (-0300) Subject: Bluetooth: Remove check for supported mode X-Git-Tag: v3.12-rc1~9497^2~64^2~48^2~32 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2ba13ed678775195e8255b4e503c59d48b615bd8;p=kernel%2Fkernel-generic.git Bluetooth: Remove check for supported mode Since now we have checks for the supported mode before on l2cap_info_rsp we can remove the check for it here. Signed-off-by: Gustavo F. Padovan Signed-off-by: Marcel Holtmann --- diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index c590408..2fb45c4 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c @@ -2473,15 +2473,10 @@ static int l2cap_build_conf_req(struct sock *sk, void *data) switch (pi->mode) { case L2CAP_MODE_STREAMING: case L2CAP_MODE_ERTM: - if (!(pi->conf_state & L2CAP_CONF_STATE2_DEVICE)) { - pi->mode = l2cap_select_mode(rfc.mode, - pi->conn->feat_mask); + if (pi->conf_state & L2CAP_CONF_STATE2_DEVICE) break; - } - if (!l2cap_mode_supported(pi->mode, pi->conn->feat_mask)) - l2cap_send_disconn_req(pi->conn, sk, ECONNRESET); - break; + /* fall through */ default: pi->mode = l2cap_select_mode(rfc.mode, pi->conn->feat_mask); break;