mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
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:
parent
25b7dead80
commit
360e44a15c
1 changed files with 4 additions and 27 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue