Skip to content

Commit

Permalink
Bluetooth: Move conn to struct l2cap_chan
Browse files Browse the repository at this point in the history
There is no need to the socket deal directly with the channel, most of the
time it cares about the channel only.

Signed-off-by: Gustavo F. Padovan <[email protected]>
  • Loading branch information
Gustavo F. Padovan committed Apr 28, 2011
1 parent fe4128e commit 8c1d787
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 65 deletions.
7 changes: 4 additions & 3 deletions include/net/bluetooth/l2cap.h
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,9 @@ struct srej_list {

struct l2cap_chan {
struct sock *sk;

struct l2cap_conn *conn;

__le16 psm;
__u16 dcid;
__u16 scid;
Expand Down Expand Up @@ -385,8 +388,6 @@ struct l2cap_conn {

struct l2cap_pinfo {
struct bt_sock bt;

struct l2cap_conn *conn;
struct l2cap_chan *chan;
};

Expand Down Expand Up @@ -447,7 +448,7 @@ int l2cap_init_sockets(void);
void l2cap_cleanup_sockets(void);

void l2cap_send_cmd(struct l2cap_conn *conn, u8 ident, u8 code, u16 len, void *data);
void __l2cap_connect_rsp_defer(struct sock *sk);
void __l2cap_connect_rsp_defer(struct l2cap_chan *chan);
int __l2cap_wait_ack(struct sock *sk);

struct sk_buff *l2cap_create_connless_pdu(struct l2cap_chan *chan, struct msghdr *msg, size_t len);
Expand Down
Loading

0 comments on commit 8c1d787

Please sign in to comment.