mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-15 16:24:28 +08:00
Add the missing HCI error codes
This commit is contained in:
parent
34fb9e6256
commit
c3b2524a78
@ -186,6 +186,15 @@ enum {
|
||||
#define HCI_QOS_NOT_SUPPORTED 0x27
|
||||
#define HCI_INSTANT_PASSED 0x28
|
||||
#define HCI_PAIRING_NOT_SUPPORTED 0x29
|
||||
#define HCI_TRANSACTION_COLLISION 0x2a
|
||||
#define HCI_QOS_UNACCEPTABLE_PARAMETER 0x2c
|
||||
#define HCI_QOS_REJECTED 0x2d
|
||||
#define HCI_CLASSIFICATION_NOT_SUPPORTED 0x2e
|
||||
#define HCI_INSUFFICIENT_SECURITY 0x2f
|
||||
#define HCI_PARAMETER_OUT_OF_RANGE 0x30
|
||||
#define HCI_ROLE_SWITCH_PENDING 0x32
|
||||
#define HCI_SLOT_VIOLATION 0x34
|
||||
#define HCI_ROLE_SWITCH_FAILED 0x35
|
||||
|
||||
/* ACL flags */
|
||||
#define ACL_CONT 0x01
|
||||
|
@ -133,19 +133,25 @@ int bt_error(uint16_t code)
|
||||
case HCI_ACL_CONNECTION_EXISTS:
|
||||
return EALREADY;
|
||||
case HCI_COMMAND_DISALLOWED:
|
||||
case HCI_TRANSACTION_COLLISION:
|
||||
case HCI_ROLE_SWITCH_PENDING:
|
||||
return EBUSY;
|
||||
case HCI_REJECTED_LIMITED_RESOURCES:
|
||||
case HCI_REJECTED_SECURITY:
|
||||
case HCI_REJECTED_PERSONAL:
|
||||
case HCI_QOS_REJECTED:
|
||||
return ECONNREFUSED;
|
||||
case HCI_HOST_TIMEOUT:
|
||||
return ETIMEDOUT;
|
||||
case HCI_UNSUPPORTED_FEATURE:
|
||||
case HCI_QOS_NOT_SUPPORTED:
|
||||
case HCI_PAIRING_NOT_SUPPORTED:
|
||||
case HCI_CLASSIFICATION_NOT_SUPPORTED:
|
||||
case HCI_UNSUPPORTED_LMP_PARAMETER_VALUE:
|
||||
case HCI_PARAMETER_OUT_OF_RANGE:
|
||||
case HCI_QOS_UNACCEPTABLE_PARAMETER:
|
||||
return EOPNOTSUPP;
|
||||
case HCI_INVALID_PARAMETERS:
|
||||
case HCI_SLOT_VIOLATION:
|
||||
return EINVAL;
|
||||
case HCI_OE_USER_ENDED_CONNECTION:
|
||||
case HCI_OE_LOW_RESOURCES:
|
||||
@ -155,7 +161,9 @@ int bt_error(uint16_t code)
|
||||
return ECONNABORTED;
|
||||
case HCI_REPEATED_ATTEMPTS:
|
||||
return ELOOP;
|
||||
case HCI_REJECTED_SECURITY:
|
||||
case HCI_PAIRING_NOT_ALLOWED:
|
||||
case HCI_INSUFFICIENT_SECURITY:
|
||||
return EACCES;
|
||||
case HCI_UNSUPPORTED_REMOTE_FEATURE:
|
||||
return EPROTONOSUPPORT;
|
||||
|
Loading…
Reference in New Issue
Block a user