summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_conn.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2014-06-27 13:45:09 +0200
committerMarcel Holtmann <marcel@holtmann.org>2014-07-03 17:42:48 +0200
commit40051e4686d6fa8743a38933727604f75bef05cf (patch)
tree6ee90f22be3f31e041f154402c7a220a2ceddf89 /net/bluetooth/hci_conn.c
parenta2b1976b8e0184635a1119f8511fc3e68902e429 (diff)
downloadblackbird-obmc-linux-40051e4686d6fa8743a38933727604f75bef05cf.tar.gz
blackbird-obmc-linux-40051e4686d6fa8743a38933727604f75bef05cf.zip
Bluetooth: Remove unneeded hci_conn_disconnect abstraction
The abstraction of disconnect operation via hci_conn_disconnect is not needed and it does not add any readability. Handle the difference of AMP physical channels and BR/EDR/LE connection in the timeout callback. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/hci_conn.c')
-rw-r--r--net/bluetooth/hci_conn.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index cc64fbe952fa..6d0fe3df2fa5 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -271,21 +271,6 @@ void hci_sco_setup(struct hci_conn *conn, __u8 status)
}
}
-static void hci_conn_disconnect(struct hci_conn *conn)
-{
- __u8 reason;
-
- switch (conn->type) {
- case AMP_LINK:
- hci_amp_disconn(conn);
- break;
- default:
- reason = hci_proto_disconn_ind(conn);
- hci_disconnect(conn, reason);
- break;
- }
-}
-
static void hci_conn_timeout(struct work_struct *work)
{
struct hci_conn *conn = container_of(work, struct hci_conn,
@@ -320,7 +305,12 @@ static void hci_conn_timeout(struct work_struct *work)
break;
case BT_CONFIG:
case BT_CONNECTED:
- hci_conn_disconnect(conn);
+ if (conn->type == AMP_LINK) {
+ hci_amp_disconn(conn);
+ } else {
+ __u8 reason = hci_proto_disconn_ind(conn);
+ hci_disconnect(conn, reason);
+ }
break;
default:
conn->state = BT_CLOSED;
OpenPOWER on IntegriCloud