OSDN Git Service

Bluetooth: Fix reason code used for rejecting SCO connections
authorJohan Hedberg <johan.hedberg@intel.com>
Wed, 24 Sep 2014 10:14:46 +0000 (13:14 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 24 Sep 2014 12:03:32 +0000 (14:03 +0200)
commitd41c15cf95bd91b9c333f6f749670e22c8a47ad9
tree15d9e261f3f7699e723d933812683938de6c8eaa
parent2b0bf6c85a4940e00516f68ff7103329abf8512d
Bluetooth: Fix reason code used for rejecting SCO connections

The core specification defines valid values for the
HCI_Reject_Synchronous_Connection_Request command to be 0x0D-0x0F. So
far the code has been using HCI_ERROR_REMOTE_USER_TERM (0x13) which is
not a valid value and is therefore being rejected by some controllers:

 > HCI Event: Connect Request (0x04) plen 10
bdaddr 40:6F:2A:6A:E5:E0 class 0x000000 type eSCO
 < HCI Command: Reject Synchronous Connection (0x01|0x002a) plen 7
bdaddr 40:6F:2A:6A:E5:E0 reason 0x13
Reason: Remote User Terminated Connection
 > HCI Event: Command Status (0x0f) plen 4
Reject Synchronous Connection (0x01|0x002a) status 0x12 ncmd 1
Error: Invalid HCI Command Parameters

This patch introduces a new define for a value from the valid range
(0x0d == Connection Rejected Due To Limited Resources) and uses it
instead for rejecting incoming connections.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
include/net/bluetooth/hci.h
net/bluetooth/hci_conn.c