Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72077
b: refs/heads/master
c: 876d948
h: refs/heads/master
i:
  72075: d32cf61
v: v3
  • Loading branch information
Marcel Holtmann authored and David S. Miller committed Oct 22, 2007
1 parent 5ca2eb3 commit 91f7145
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a9de9248064bfc8eb0a183a6a951a4e7b5ca10a4
refs/heads/master: 876d9484edf77d228adb42aecd4debd58d7739d6
16 changes: 10 additions & 6 deletions trunk/net/bluetooth/l2cap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1370,8 +1370,10 @@ static int l2cap_parse_conf_req(struct sock *sk, void *data)

if (pi->conf_mtu < pi->omtu)
result = L2CAP_CONF_UNACCEPT;
else
else {
pi->omtu = pi->conf_mtu;
pi->conf_state |= L2CAP_CONF_OUTPUT_DONE;
}

l2cap_add_conf_opt(&ptr, L2CAP_CONF_MTU, 2, pi->omtu);
}
Expand Down Expand Up @@ -1577,16 +1579,19 @@ static inline int l2cap_config_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr

l2cap_send_cmd(conn, cmd->ident, L2CAP_CONF_RSP, len, rsp);

/* Output config done. */
l2cap_pi(sk)->conf_state |= L2CAP_CONF_OUTPUT_DONE;

/* Reset config buffer. */
l2cap_pi(sk)->conf_len = 0;

if (!(l2cap_pi(sk)->conf_state & L2CAP_CONF_OUTPUT_DONE))
goto unlock;

if (l2cap_pi(sk)->conf_state & L2CAP_CONF_INPUT_DONE) {
sk->sk_state = BT_CONNECTED;
l2cap_chan_ready(sk);
} else if (!(l2cap_pi(sk)->conf_state & L2CAP_CONF_REQ_SENT)) {
goto unlock;
}

if (!(l2cap_pi(sk)->conf_state & L2CAP_CONF_REQ_SENT)) {
u8 req[64];
l2cap_send_cmd(conn, l2cap_get_ident(conn), L2CAP_CONF_REQ,
l2cap_build_conf_req(sk, req), req);
Expand Down Expand Up @@ -1646,7 +1651,6 @@ static inline int l2cap_config_rsp(struct l2cap_conn *conn, struct l2cap_cmd_hdr
if (flags & 0x01)
goto done;

/* Input config done */
l2cap_pi(sk)->conf_state |= L2CAP_CONF_INPUT_DONE;

if (l2cap_pi(sk)->conf_state & L2CAP_CONF_OUTPUT_DONE) {
Expand Down

0 comments on commit 91f7145

Please sign in to comment.