Bluetooth: Remove check for supported mode
authorGustavo F. Padovan <padovan@profusion.mobi>
Wed, 9 Jun 2010 19:39:05 +0000 (16:39 -0300)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 21 Jul 2010 17:39:08 +0000 (10:39 -0700)
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>
net/bluetooth/l2cap.c

index c5904082392c26659d82d10b09d00cce430c0107..2fb45c481762dd2189707f71d35c48fc43ebc1f1 100644 (file)
@@ -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;