aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorGustavo F. Padovan <padovan@profusion.mobi>2011-12-14 10:02:51 -0500
committerGustavo F. Padovan <padovan@profusion.mobi>2011-12-16 15:16:14 -0500
commit2c33c06a8fd2f784ca763ad150d5d63c3c49946e (patch)
treec8ccf68c9df1f1d8cdc7ef8da2a182b25f584a8a /include/net
parent5a13b09531420d230616bd524b68a5b0c23cd487 (diff)
Bluetooth: remove struct hci_chan_hash
Only the list member of the struct was used, so we now fold it into hci_conn. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/bluetooth/hci_core.h33
1 files changed, 2 insertions, 31 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index e34cd71a586e..fb2cce2b633f 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -67,12 +67,6 @@ struct hci_conn_hash {
67 unsigned int le_num; 67 unsigned int le_num;
68}; 68};
69 69
70struct hci_chan_hash {
71 struct list_head list;
72 spinlock_t lock;
73 unsigned int num;
74};
75
76struct bdaddr_list { 70struct bdaddr_list {
77 struct list_head list; 71 struct list_head list;
78 bdaddr_t bdaddr; 72 bdaddr_t bdaddr;
@@ -301,7 +295,7 @@ struct hci_conn {
301 unsigned int sent; 295 unsigned int sent;
302 296
303 struct sk_buff_head data_q; 297 struct sk_buff_head data_q;
304 struct hci_chan_hash chan_hash; 298 struct list_head chan_list;
305 299
306 struct timer_list disc_timer; 300 struct timer_list disc_timer;
307 struct timer_list idle_timer; 301 struct timer_list idle_timer;
@@ -390,7 +384,6 @@ static inline void hci_conn_hash_init(struct hci_dev *hdev)
390{ 384{
391 struct hci_conn_hash *h = &hdev->conn_hash; 385 struct hci_conn_hash *h = &hdev->conn_hash;
392 INIT_LIST_HEAD(&h->list); 386 INIT_LIST_HEAD(&h->list);
393 spin_lock_init(&h->lock);
394 h->acl_num = 0; 387 h->acl_num = 0;
395 h->sco_num = 0; 388 h->sco_num = 0;
396} 389}
@@ -492,28 +485,6 @@ static inline struct hci_conn *hci_conn_hash_lookup_state(struct hci_dev *hdev,
492 return NULL; 485 return NULL;
493} 486}
494 487
495static inline void hci_chan_hash_init(struct hci_conn *c)
496{
497 struct hci_chan_hash *h = &c->chan_hash;
498 INIT_LIST_HEAD(&h->list);
499 spin_lock_init(&h->lock);
500 h->num = 0;
501}
502
503static inline void hci_chan_hash_add(struct hci_conn *c, struct hci_chan *chan)
504{
505 struct hci_chan_hash *h = &c->chan_hash;
506 list_add(&chan->list, &h->list);
507 h->num++;
508}
509
510static inline void hci_chan_hash_del(struct hci_conn *c, struct hci_chan *chan)
511{
512 struct hci_chan_hash *h = &c->chan_hash;
513 list_del(&chan->list);
514 h->num--;
515}
516
517void hci_acl_connect(struct hci_conn *conn); 488void hci_acl_connect(struct hci_conn *conn);
518void hci_acl_disconn(struct hci_conn *conn, __u8 reason); 489void hci_acl_disconn(struct hci_conn *conn, __u8 reason);
519void hci_add_sco(struct hci_conn *conn, __u16 handle); 490void hci_add_sco(struct hci_conn *conn, __u16 handle);
@@ -527,7 +498,7 @@ void hci_conn_check_pending(struct hci_dev *hdev);
527 498
528struct hci_chan *hci_chan_create(struct hci_conn *conn); 499struct hci_chan *hci_chan_create(struct hci_conn *conn);
529int hci_chan_del(struct hci_chan *chan); 500int hci_chan_del(struct hci_chan *chan);
530void hci_chan_hash_flush(struct hci_conn *conn); 501void hci_chan_list_flush(struct hci_conn *conn);
531 502
532struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst, 503struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst,
533 __u8 sec_level, __u8 auth_type); 504 __u8 sec_level, __u8 auth_type);