summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo F. Padovan <padovan@profusion.mobi>2010-06-09 23:39:05 +0400
committerMarcel Holtmann <marcel@holtmann.org>2010-07-21 21:39:08 +0400
commit2ba13ed678775195e8255b4e503c59d48b615bd8 (patch)
treebcd27d8898526e2f04ed323bdac494566e2cd7ab
parent6c2ea7a8f5fea67fa20e5825401b8fce5a78dbf6 (diff)
downloadlinux-2ba13ed678775195e8255b4e503c59d48b615bd8.tar.xz
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 <padovan@profusion.mobi> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
-rw-r--r--net/bluetooth/l2cap.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index c5904082392c..2fb45c481762 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;