Commit 525cd185 authored by Gustavo F. Padovan's avatar Gustavo F. Padovan

Bluetooth: Move conn_state to struct l2cap_chan

This is part of "moving things to l2cap_chan". As one the first move it
triggered a big number of changes in the funcions parameters, basically
changing the struct sock param to struct l2cap_chan.
Signed-off-by: default avatarGustavo F. Padovan <padovan@profusion.mobi>
parent 710f9b0a
...@@ -286,6 +286,8 @@ struct l2cap_chan { ...@@ -286,6 +286,8 @@ struct l2cap_chan {
__u8 num_conf_req; __u8 num_conf_req;
__u8 num_conf_rsp; __u8 num_conf_rsp;
__u16 conn_state;
struct list_head list; struct list_head list;
}; };
...@@ -350,7 +352,6 @@ struct l2cap_pinfo { ...@@ -350,7 +352,6 @@ struct l2cap_pinfo {
__u8 flushable; __u8 flushable;
__u8 conf_state; __u8 conf_state;
__u16 conn_state;
__u8 next_tx_seq; __u8 next_tx_seq;
__u8 expected_ack_seq; __u8 expected_ack_seq;
...@@ -456,7 +457,7 @@ struct sk_buff *l2cap_create_iframe_pdu(struct sock *sk, struct msghdr *msg, siz ...@@ -456,7 +457,7 @@ struct sk_buff *l2cap_create_iframe_pdu(struct sock *sk, struct msghdr *msg, siz
int l2cap_sar_segment_sdu(struct sock *sk, struct msghdr *msg, size_t len); int l2cap_sar_segment_sdu(struct sock *sk, struct msghdr *msg, size_t len);
void l2cap_do_send(struct sock *sk, struct sk_buff *skb); void l2cap_do_send(struct sock *sk, struct sk_buff *skb);
void l2cap_streaming_send(struct sock *sk); void l2cap_streaming_send(struct sock *sk);
int l2cap_ertm_send(struct sock *sk); int l2cap_ertm_send(struct l2cap_chan *chan);
void l2cap_sock_set_timer(struct sock *sk, long timeout); void l2cap_sock_set_timer(struct sock *sk, long timeout);
void l2cap_sock_clear_timer(struct sock *sk); void l2cap_sock_clear_timer(struct sock *sk);
......
This diff is collapsed.
...@@ -778,14 +778,16 @@ static int l2cap_sock_sendmsg(struct kiocb *iocb, struct socket *sock, struct ms ...@@ -778,14 +778,16 @@ static int l2cap_sock_sendmsg(struct kiocb *iocb, struct socket *sock, struct ms
if (pi->mode == L2CAP_MODE_STREAMING) { if (pi->mode == L2CAP_MODE_STREAMING) {
l2cap_streaming_send(sk); l2cap_streaming_send(sk);
} else { err = len;
if ((pi->conn_state & L2CAP_CONN_REMOTE_BUSY) && break;
(pi->conn_state & L2CAP_CONN_WAIT_F)) { }
err = len;
break; if ((pi->chan->conn_state & L2CAP_CONN_REMOTE_BUSY) &&
} (pi->chan->conn_state & L2CAP_CONN_WAIT_F)) {
err = l2cap_ertm_send(sk); err = len;
break;
} }
err = l2cap_ertm_send(pi->chan);
if (err >= 0) if (err >= 0)
err = len; err = len;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment