Skip to content

Commit

Permalink
Bluetooth: Remove check for supported mode
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Gustavo F. Padovan authored and Marcel Holtmann committed Jul 21, 2010
1 parent 6c2ea7a commit 2ba13ed
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions net/bluetooth/l2cap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2ba13ed

Please sign in to comment.