Bluetooth: Add support for L2CAP Extended Flow Spec option.

Add send and receive of Extended Flow Spec option during L2CAP
lockstep configuration and passing the flow specs to HCI.

Signed-off-by: Peter Krystad <pkrystad@codeaurora.org>

Conflicts:

	include/net/bluetooth/hci.h
	include/net/bluetooth/hci_core.h
	net/bluetooth/l2cap_core.c
This commit is contained in:
Peter Krystad 2011-07-19 17:23:34 -07:00 committed by Stephen Boyd
parent 25b7dead80
commit 360e44a15c

View file

@ -3523,22 +3523,10 @@ done:
if (pi->conf_state & L2CAP_CONF_LOCKSTEP_PEND &&
pi->amp_id) {
struct hci_chan *chan;
/* Trigger logical link creation only on AMP */
struct hci_chan *chan;
u8 amp_id = A2MP_HCI_ID(pi->amp_id);
BT_DBG("Set up logical link");
if (bt_sk(sk)->parent) {
/* Incoming connection */
chan = hci_chan_accept(amp_id,
pi->conn->dst);
} else {
/* Outgoing connection */
chan = hci_chan_create(amp_id,
pi->conn->dst);
}
chan = l2cap_chan_admit(pi->amp_id, pi);
if (!chan)
return -ECONNREFUSED;
@ -4361,7 +4349,7 @@ static inline int l2cap_config_rsp(struct l2cap_conn *conn, struct l2cap_cmd_hdr
pi->conf_state |= L2CAP_CONF_LOCKSTEP_PEND;
/* Check Extended Flow Specification */
l2cap_conf_ext_fs_get(sk, rsp->data, len);
if (pi->amp_id && pi->conf_state & L2CAP_CONF_PEND_SENT) {
struct hci_chan *chan;
@ -4369,18 +4357,7 @@ static inline int l2cap_config_rsp(struct l2cap_conn *conn, struct l2cap_cmd_hdr
/* Already sent a 'pending' response, so set up
* the logical link now
*/
BT_DBG("Set up logical link");
if (bt_sk(sk)->parent) {
/* Incoming connection */
chan = hci_chan_accept(A2MP_HCI_ID(pi->amp_id),
pi->conn->dst);
} else {
/* Outgoing connection */
chan = hci_chan_create(A2MP_HCI_ID(pi->amp_id),
pi->conn->dst);
}
chan = l2cap_chan_admit(pi->amp_id, pi);
if (!chan) {
l2cap_send_disconn_req(pi->conn, sk,
ECONNRESET);