aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2011-11-11 11:10:00 -0500
committerGustavo F. Padovan <padovan@profusion.mobi>2011-11-16 13:07:52 -0500
commitca69b7957bf2e3bc0acc882b837a42617498ece1 (patch)
treee00f2f36d661eb5cef306b940d99f33df5570363 /include/net
parent8680570b0cae8f66ad28c8de227aab1894428ee5 (diff)
Bluetooth: Create a unique mgmt error code hierarchy
The management protocol uses a single byte for error codes (aka command status). In some places this value is directly copied from HCI and in other a POSIX error number is used. This makes it impossible for user-space to uniquily decipher the meaning of an error. To solve this issue a new mgmt-specific set of error codes is added along with a conversion table for HCI status values. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/bluetooth/mgmt.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h
index bfdb04bd780e..bd6995d69931 100644
--- a/include/net/bluetooth/mgmt.h
+++ b/include/net/bluetooth/mgmt.h
@@ -23,6 +23,23 @@
23 23
24#define MGMT_INDEX_NONE 0xFFFF 24#define MGMT_INDEX_NONE 0xFFFF
25 25
26#define MGMT_STATUS_SUCCESS 0x00
27#define MGMT_STATUS_UNKNOWN_COMMAND 0x01
28#define MGMT_STATUS_NOT_CONNECTED 0x02
29#define MGMT_STATUS_FAILED 0x03
30#define MGMT_STATUS_CONNECT_FAILED 0x04
31#define MGMT_STATUS_AUTH_FAILED 0x05
32#define MGMT_STATUS_NOT_PAIRED 0x06
33#define MGMT_STATUS_NO_RESOURCES 0x07
34#define MGMT_STATUS_TIMEOUT 0x08
35#define MGMT_STATUS_ALREADY_CONNECTED 0x09
36#define MGMT_STATUS_BUSY 0x0a
37#define MGMT_STATUS_REJECTED 0x0b
38#define MGMT_STATUS_NOT_SUPPORTED 0x0c
39#define MGMT_STATUS_INVALID_PARAMS 0x0d
40#define MGMT_STATUS_DISCONNECTED 0x0e
41#define MGMT_STATUS_NOT_POWERED 0x0f
42
26struct mgmt_hdr { 43struct mgmt_hdr {
27 __le16 opcode; 44 __le16 opcode;
28 __le16 index; 45 __le16 index;