diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2006-07-03 10:37:55 +0200 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-07-03 19:54:09 -0700 |
commit | 300b93974ff64f1bef1ac8294547c573954f0300 (patch) | |
tree | 94b33acffd99c50986ba4ede3e61495485a88342 /net/bluetooth | |
parent | 7c2660b00fae0575dd4ce5c7b6bf30762b632045 (diff) | |
download | linux-300b93974ff64f1bef1ac8294547c573954f0300.tar.gz linux-300b93974ff64f1bef1ac8294547c573954f0300.tar.bz2 linux-300b93974ff64f1bef1ac8294547c573954f0300.zip |
[Bluetooth] Add RFCOMM role switch support
This patch adds the support for RFCOMM role switching before the
connection is fully established.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/rfcomm/core.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c index fe18dc2dd3c1..155a2b93760e 100644 --- a/net/bluetooth/rfcomm/core.c +++ b/net/bluetooth/rfcomm/core.c @@ -1150,6 +1150,8 @@ static inline int rfcomm_check_link_mode(struct rfcomm_dlc *d) static void rfcomm_dlc_accept(struct rfcomm_dlc *d) { + struct sock *sk = d->session->sock->sk; + BT_DBG("dlc %p", d); rfcomm_send_ua(d->session, d->dlci); @@ -1159,6 +1161,9 @@ static void rfcomm_dlc_accept(struct rfcomm_dlc *d) d->state_change(d, 0); rfcomm_dlc_unlock(d); + if (d->link_mode & RFCOMM_LM_MASTER) + hci_conn_switch_role(l2cap_pi(sk)->conn->hcon, 0x00); + rfcomm_send_msc(d->session, 1, d->dlci, d->v24_sig); } |