Bluetooth: Update conf_state before send config_req out
authorHaijun Liu <haijun.liu@atheros.com>
Thu, 30 Sep 2010 08:52:40 +0000 (16:52 +0800)
committerGustavo F. Padovan <padovan@profusion.mobi>
Tue, 12 Oct 2010 15:44:53 +0000 (12:44 -0300)
Update conf_state with L2CAP_CONF_REQ_SENT before send config_req out in
l2cap_config_req().

Signed-off-by: Haijun Liu <haijun.liu@atheros.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
net/bluetooth/l2cap.c

index 01c476239dd677abaec3148946a9eebc1cf31307..16049de498960534aa165e7febfc700b0b32439d 100644 (file)
@@ -3171,6 +3171,7 @@ static inline int l2cap_config_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr
 
        if (!(l2cap_pi(sk)->conf_state & L2CAP_CONF_REQ_SENT)) {
                u8 buf[64];
+               l2cap_pi(sk)->conf_state |= L2CAP_CONF_REQ_SENT;
                l2cap_send_cmd(conn, l2cap_get_ident(conn), L2CAP_CONF_REQ,
                                        l2cap_build_conf_req(sk, buf), buf);
                l2cap_pi(sk)->num_conf_req++;