android_kernel_xiaomi_sm7250/net/bluetooth
Luiz Augusto von Dentz 9e726b1742 Bluetooth: Fix rejected connection not disconnecting ACL link
When using DEFER_SETUP on a RFCOMM socket, a SABM frame triggers
authorization which when rejected send a DM response. This is fine
according to the RFCOMM spec:

    the responding implementation may replace the "proper" response
    on the Multiplexer Control channel with a DM frame, sent on the
    referenced DLCI to indicate that the DLCI is not open, and that
    the responder would not grant a request to open it later either.

But some stacks doesn't seems to cope with this leaving DLCI 0 open after
receiving DM frame.

To fix it properly a timer was introduced to rfcomm_session which is used
to set a timeout when the last active DLC of a session is unlinked, this
will give the remote stack some time to reply with a proper DISC frame on
DLCI 0 avoiding both sides sending DISC to each other on stacks that
follow the specification and taking care of those who don't by taking
down DLCI 0.

Signed-off-by: Luiz Augusto von Dentz <luiz.dentz@openbossa.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2009-08-22 15:05:58 -07:00
..
bnep net: use NETDEV_TX_OK instead of 0 in ndo_start_xmit() functions 2009-07-05 19:16:04 -07:00
cmtp isdn: rename capi_ctr_reseted() to capi_ctr_down() 2009-06-08 00:45:50 -07:00
hidp Bluetooth: Let HIDP grab the device reference for connections 2009-08-22 14:22:15 -07:00
rfcomm Bluetooth: Fix rejected connection not disconnecting ACL link 2009-08-22 15:05:58 -07:00
af_bluetooth.c net: mark read-only arrays as const 2009-08-05 10:42:58 -07:00
hci_conn.c Bluetooth: Add extra device reference counting for connections 2009-08-22 14:19:26 -07:00
hci_core.c Bluetooth: Convert hdev->req_lock to a mutex 2009-08-22 14:35:02 -07:00
hci_event.c Bluetooth: Add extra device reference counting for connections 2009-08-22 14:19:26 -07:00
hci_sock.c Bluetooth: Enable per-module dynamic debug messages 2008-11-30 12:17:28 +01:00
hci_sysfs.c Bluetooth: Remove useless flush_work() causing lockdep warnings 2009-05-27 09:15:57 +02:00
Kconfig Bluetooth: Fix Kconfig issue with RFKILL integration 2009-06-14 15:30:51 +02:00
l2cap.c Bluetooth: Full support for receiving L2CAP SREJ frames 2009-08-22 15:03:43 -07:00
lib.c [NET] BLUETOOTH: Fix whitespace errors. 2007-02-10 23:19:20 -08:00
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sco.c Bluetooth: Add proper shutdown support to SCO sockets 2009-08-22 14:11:46 -07:00