aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGustavo F. Padovan <padovan@profusion.mobi>2011-03-31 15:17:41 -0400
committerGustavo F. Padovan <padovan@profusion.mobi>2011-04-07 17:06:25 -0400
commitbaa7e1fa6d2870462bd744df1c6ddbd497fe86d6 (patch)
tree44b459ce553a586e2fc8e43ba19d1e9a99a339da /include
parent48454079c2d4b9ee65c570a22c5fdfe1827996a4 (diff)
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: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'include')
-rw-r--r--include/net/bluetooth/l2cap.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index 6378bcc94e2b..ddf4bc56a5b5 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -277,16 +277,9 @@ struct l2cap_conn_param_update_rsp {
277#define L2CAP_CONN_PARAM_REJECTED 0x0001 277#define L2CAP_CONN_PARAM_REJECTED 0x0001
278 278
279/* ----- L2CAP channels and connections ----- */ 279/* ----- L2CAP channels and connections ----- */
280
281struct l2cap_chan { 280struct l2cap_chan {
282 struct sock *sk; 281 struct sock *sk;
283 struct l2cap_chan *next_c; 282 struct list_head list;
284 struct l2cap_chan *prev_c;
285};
286
287struct l2cap_chan_list {
288 struct l2cap_chan *head;
289 rwlock_t lock;
290}; 283};
291 284
292struct l2cap_conn { 285struct l2cap_conn {
@@ -312,7 +305,8 @@ struct l2cap_conn {
312 305
313 __u8 disc_reason; 306 __u8 disc_reason;
314 307
315 struct l2cap_chan_list chan_list; 308 struct list_head chan_l;
309 rwlock_t chan_lock;
316}; 310};
317 311
318struct sock_del_list { 312struct sock_del_list {