Skip to content

Commit 8c1d787

Browse files
author
Gustavo F. Padovan
committed
Bluetooth: Move conn to struct l2cap_chan
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 <padovan@profusion.mobi>
1 parent fe4128e commit 8c1d787

File tree

5 files changed

+59
-65
lines changed

5 files changed

+59
-65
lines changed

include/net/bluetooth/l2cap.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,9 @@ struct srej_list {
284284

285285
struct l2cap_chan {
286286
struct sock *sk;
287+
288+
struct l2cap_conn *conn;
289+
287290
__le16 psm;
288291
__u16 dcid;
289292
__u16 scid;
@@ -385,8 +388,6 @@ struct l2cap_conn {
385388

386389
struct l2cap_pinfo {
387390
struct bt_sock bt;
388-
389-
struct l2cap_conn *conn;
390391
struct l2cap_chan *chan;
391392
};
392393

@@ -447,7 +448,7 @@ int l2cap_init_sockets(void);
447448
void l2cap_cleanup_sockets(void);
448449

449450
void l2cap_send_cmd(struct l2cap_conn *conn, u8 ident, u8 code, u16 len, void *data);
450-
void __l2cap_connect_rsp_defer(struct sock *sk);
451+
void __l2cap_connect_rsp_defer(struct l2cap_chan *chan);
451452
int __l2cap_wait_ack(struct sock *sk);
452453

453454
struct sk_buff *l2cap_create_connless_pdu(struct l2cap_chan *chan, struct msghdr *msg, size_t len);

0 commit comments

Comments
 (0)