diff options
author | Mat Martineau <mathewm@codeaurora.org> | 2012-10-23 18:24:13 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2012-10-23 22:16:23 -0400 |
commit | 168df8e57e7c1afce3f86a86ae106f82ff7c18d8 (patch) | |
tree | 9d2c169f1fb88c52391b3b4f267af1ed3ce0bf03 | |
parent | 5f3847a4788e7205a6ad2ac363f968c9618074f1 (diff) |
Bluetooth: Add state to hci_chan
On an AMP controller, hci_chan maps to a logical link. When a channel
is being moved, the logical link may or may not be connected already.
The hci_chan->state is used to determine the existance of a useable
logical link so the link can be either used or requested.
Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Acked-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
-rw-r--r-- | include/net/bluetooth/hci_core.h | 1 | ||||
-rw-r--r-- | net/bluetooth/hci_conn.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 9fe8e2dec870..00abc5246cbf 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -355,6 +355,7 @@ struct hci_chan { | |||
355 | struct hci_conn *conn; | 355 | struct hci_conn *conn; |
356 | struct sk_buff_head data_q; | 356 | struct sk_buff_head data_q; |
357 | unsigned int sent; | 357 | unsigned int sent; |
358 | __u8 state; | ||
358 | }; | 359 | }; |
359 | 360 | ||
360 | extern struct list_head hci_dev_list; | 361 | extern struct list_head hci_dev_list; |
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index fe646211c61f..6dcf4523df3c 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c | |||
@@ -959,6 +959,7 @@ struct hci_chan *hci_chan_create(struct hci_conn *conn) | |||
959 | 959 | ||
960 | chan->conn = conn; | 960 | chan->conn = conn; |
961 | skb_queue_head_init(&chan->data_q); | 961 | skb_queue_head_init(&chan->data_q); |
962 | chan->state = BT_CONNECTED; | ||
962 | 963 | ||
963 | list_add_rcu(&chan->list, &conn->chan_list); | 964 | list_add_rcu(&chan->list, &conn->chan_list); |
964 | 965 | ||