Bluetooth: Define HCI reasons instead of magic number
Use HCI error reasons instead of magic numbers. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
This commit is contained in:
committed by
Gustavo F. Padovan
parent
36f7fc7e9a
commit
9f5a0d7bf0
@@ -264,6 +264,13 @@ enum {
|
||||
#define HCI_LK_SMP_IRK 0x82
|
||||
#define HCI_LK_SMP_CSRK 0x83
|
||||
|
||||
/* ---- HCI Error Codes ---- */
|
||||
#define HCI_ERROR_AUTH_FAILURE 0x05
|
||||
#define HCI_ERROR_REJ_BAD_ADDR 0x0f
|
||||
#define HCI_ERROR_REMOTE_USER_TERM 0x13
|
||||
#define HCI_ERROR_LOCAL_HOST_TERM 0x16
|
||||
#define HCI_ERROR_PAIRING_NOT_ALLOWED 0x18
|
||||
|
||||
/* ----- HCI Commands ---- */
|
||||
#define HCI_OP_NOP 0x0000
|
||||
|
||||
|
@@ -730,7 +730,7 @@ static inline void hci_proto_connect_cfm(struct hci_conn *conn, __u8 status)
|
||||
static inline int hci_proto_disconn_ind(struct hci_conn *conn)
|
||||
{
|
||||
register struct hci_proto *hp;
|
||||
int reason = 0x13;
|
||||
int reason = HCI_ERROR_REMOTE_USER_TERM;
|
||||
|
||||
hp = hci_proto[HCI_PROTO_L2CAP];
|
||||
if (hp && hp->disconn_ind)
|
||||
|
Reference in New Issue
Block a user