From: "jaikumar Ganesh" <jaikumarg@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: Re: conn->state vs conn->sk->sk_state
Date: Wed, 17 Dec 2008 14:07:52 -0800 [thread overview]
Message-ID: <ac290f760812171407te7a079eycf45c36d376b0c5c@mail.gmail.com> (raw)
In-Reply-To: <ac290f760812171405r79473a67l6769913bc7e62d2e@mail.gmail.com>
Folks,
I have a device which supports only SCO connections. So when the
application calls sco_sock_connect -> sco_connect, the conn->state is
set to BT_CONNECT and then bt_sock_state is called waiting for the
conn->sk->sk_state to be set to BT_CONNECTED.
When the HCI Connection Complete event comes, the conn->state is
set to BT_CONNECTED.
In 2.6.25 -> hci_proto_connect_cfm(conn, ev->status) was called
at the end of hci_conn_complete_evt which used to set the
conn->sk->sk_state to BT_CONNECTED in sco_conn_ready.
In 2.6.27-> hci_proto_connect_cfm(conn, ev->status) is called
only if the ev_status is 1.
Hence, the conn->sk->sk_state doesn't get set to
BT_CONNECTED and hence the connect() times out.
Should we be calling sco_conn_ready in sco_connect similar to
sco_connect_cfm if conn != null ?
I didn't see anyone else complain so am I missing something obvious ?
* I am new to this list so please excuse me if the above doesn't
make sense.
Thanks
Jaikumar
next parent reply other threads:[~2008-12-17 22:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <ac290f760812171405r79473a67l6769913bc7e62d2e@mail.gmail.com>
2008-12-17 22:07 ` jaikumar Ganesh [this message]
2008-12-19 2:15 ` conn->state vs conn->sk->sk_state jaikumar Ganesh
2008-12-19 18:58 ` Marcel Holtmann
2008-12-19 18:28 ` jaikumar Ganesh
2008-12-22 16:16 ` Nick Pelly
2008-12-22 19:18 ` Marcel Holtmann
2008-12-22 19:21 ` jaikumar Ganesh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ac290f760812171407te7a079eycf45c36d376b0c5c@mail.gmail.com \
--to=jaikumarg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox