* [RFC] Bluetooth: Allow getting SCO options for not connected sockets
@ 2013-01-02 14:47 Vinicius Costa Gomes
2013-01-09 21:41 ` Gustavo Padovan
0 siblings, 1 reply; 2+ messages in thread
From: Vinicius Costa Gomes @ 2013-01-02 14:47 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Vinicius Costa Gomes
Now, that we have proper support for deferred setup for SCO sockets it
is very convenient that we are able to get the socket options for
sockets that are not in the 'connected' state.
And makes the behaviour more consistent with what L2CAP does, for
example.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
---
Sending this as a RFC, because even though I couldn't think of any cases
that this new behaviour would surprise userspace applications, there
may be still be some.
net/bluetooth/sco.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
index 531a93d..271320c 100644
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -730,11 +730,6 @@ static int sco_sock_getsockopt_old(struct socket *sock, int optname, char __user
switch (optname) {
case SCO_OPTIONS:
- if (sk->sk_state != BT_CONNECTED) {
- err = -ENOTCONN;
- break;
- }
-
opts.mtu = sco_pi(sk)->conn->mtu;
BT_DBG("mtu %d", opts.mtu);
--
1.8.0.2
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [RFC] Bluetooth: Allow getting SCO options for not connected sockets
2013-01-02 14:47 [RFC] Bluetooth: Allow getting SCO options for not connected sockets Vinicius Costa Gomes
@ 2013-01-09 21:41 ` Gustavo Padovan
0 siblings, 0 replies; 2+ messages in thread
From: Gustavo Padovan @ 2013-01-09 21:41 UTC (permalink / raw)
To: Vinicius Costa Gomes; +Cc: linux-bluetooth
Hi Vinicius,
* Vinicius Costa Gomes <vinicius.gomes@openbossa.org> [2013-01-02 11:47:35 -0300]:
> Now, that we have proper support for deferred setup for SCO sockets it
> is very convenient that we are able to get the socket options for
> sockets that are not in the 'connected' state.
>
> And makes the behaviour more consistent with what L2CAP does, for
> example.
>
> Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
> ---
>
> Sending this as a RFC, because even though I couldn't think of any cases
> that this new behaviour would surprise userspace applications, there
> may be still be some.
>
> net/bluetooth/sco.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
> index 531a93d..271320c 100644
> --- a/net/bluetooth/sco.c
> +++ b/net/bluetooth/sco.c
> @@ -730,11 +730,6 @@ static int sco_sock_getsockopt_old(struct socket *sock, int optname, char __user
>
> switch (optname) {
> case SCO_OPTIONS:
> - if (sk->sk_state != BT_CONNECTED) {
> - err = -ENOTCONN;
> - break;
> - }
> -
> opts.mtu = sco_pi(sk)->conn->mtu;
>
> BT_DBG("mtu %d", opts.mtu);
I'm ok with this patch, if someone else has something against it, please tell
me.
Gustavo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-01-09 21:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-02 14:47 [RFC] Bluetooth: Allow getting SCO options for not connected sockets Vinicius Costa Gomes
2013-01-09 21:41 ` Gustavo Padovan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox