diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/hci_conn.c | 22 |
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) | |||
271 | } | 271 | } |
272 | } | 272 | } |
273 | 273 | ||
274 | static void hci_conn_disconnect(struct hci_conn *conn) | ||
275 | { | ||
276 | __u8 reason; | ||
277 | |||
278 | switch (conn->type) { | ||
279 | case AMP_LINK: | ||
280 | hci_amp_disconn(conn); | ||
281 | break; | ||
282 | default: | ||
283 | reason = hci_proto_disconn_ind(conn); | ||
284 | hci_disconnect(conn, reason); | ||
285 | break; | ||
286 | } | ||
287 | } | ||
288 | |||
289 | static void hci_conn_timeout(struct work_struct *work) | 274 | static void hci_conn_timeout(struct work_struct *work) |
290 | { | 275 | { |
291 | struct hci_conn *conn = container_of(work, struct hci_conn, | 276 | struct hci_conn *conn = container_of(work, struct hci_conn, |
@@ -320,7 +305,12 @@ static void hci_conn_timeout(struct work_struct *work) | |||
320 | break; | 305 | break; |
321 | case BT_CONFIG: | 306 | case BT_CONFIG: |
322 | case BT_CONNECTED: | 307 | case BT_CONNECTED: |
323 | hci_conn_disconnect(conn); | 308 | if (conn->type == AMP_LINK) { |
309 | hci_amp_disconn(conn); | ||
310 | } else { | ||
311 | __u8 reason = hci_proto_disconn_ind(conn); | ||
312 | hci_disconnect(conn, reason); | ||
313 | } | ||
324 | break; | 314 | break; |
325 | default: | 315 | default: |
326 | conn->state = BT_CLOSED; | 316 | conn->state = BT_CLOSED; |