Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 168df8e5 authored by Mat Martineau's avatar Mat Martineau Committed by Gustavo Padovan
Browse files

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: default avatarMat Martineau <mathewm@codeaurora.org>
Acked-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Acked-by: default avatarAndrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
parent 5f3847a4
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -355,6 +355,7 @@ struct hci_chan {
	struct hci_conn *conn;
	struct hci_conn *conn;
	struct sk_buff_head data_q;
	struct sk_buff_head data_q;
	unsigned int	sent;
	unsigned int	sent;
	__u8		state;
};
};


extern struct list_head hci_dev_list;
extern struct list_head hci_dev_list;
+1 −0
Original line number Original line Diff line number Diff line
@@ -959,6 +959,7 @@ struct hci_chan *hci_chan_create(struct hci_conn *conn)


	chan->conn = conn;
	chan->conn = conn;
	skb_queue_head_init(&chan->data_q);
	skb_queue_head_init(&chan->data_q);
	chan->state = BT_CONNECTED;


	list_add_rcu(&chan->list, &conn->chan_list);
	list_add_rcu(&chan->list, &conn->chan_list);