Commit baa7e1fa authored by Gustavo F. Padovan's avatar Gustavo F. Padovan

Bluetooth: Use struct list_head for L2CAP channels list

Use a well known Kernel API is always a good idea than implement your own
list.
In the future we might use RCU on this list.
Signed-off-by: default avatarGustavo F. Padovan <padovan@profusion.mobi>
parent 48454079
...@@ -277,16 +277,9 @@ struct l2cap_conn_param_update_rsp { ...@@ -277,16 +277,9 @@ struct l2cap_conn_param_update_rsp {
#define L2CAP_CONN_PARAM_REJECTED 0x0001 #define L2CAP_CONN_PARAM_REJECTED 0x0001
/* ----- L2CAP channels and connections ----- */ /* ----- L2CAP channels and connections ----- */
struct l2cap_chan { struct l2cap_chan {
struct sock *sk; struct sock *sk;
struct l2cap_chan *next_c; struct list_head list;
struct l2cap_chan *prev_c;
};
struct l2cap_chan_list {
struct l2cap_chan *head;
rwlock_t lock;
}; };
struct l2cap_conn { struct l2cap_conn {
...@@ -312,7 +305,8 @@ struct l2cap_conn { ...@@ -312,7 +305,8 @@ struct l2cap_conn {
__u8 disc_reason; __u8 disc_reason;
struct l2cap_chan_list chan_list; struct list_head chan_l;
rwlock_t chan_lock;
}; };
struct sock_del_list { struct sock_del_list {
......
This diff is collapsed.
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