dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
Gustavo F. Padovan 2010-06-09 16:39:05 -03:00 committed by Marcel Holtmann
parent 6c2ea7a8f5
commit 2ba13ed678
1 changed files with 2 additions and 7 deletions

View 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;