Skip to content

Commit

Permalink
Bluetooth: mgmt: Move status parameters into the cmd_complete header
Browse files Browse the repository at this point in the history
Instead of having status paramters part of each individual command
response it's simpler to just have the status as part of the command
complete header. This patch updates the code to follow this convention
and thereby also ensures compliance with the latest mgmt API
specification.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
Johan Hedberg committed Feb 19, 2012
1 parent 3c6b764 commit aee9b21
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 59 deletions.
8 changes: 1 addition & 7 deletions include/net/bluetooth/mgmt.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ struct mgmt_cp_disconnect {
} __packed;
struct mgmt_rp_disconnect {
struct mgmt_addr_info addr;
__u8 status;
} __packed;

#define MGMT_OP_GET_CONNECTIONS 0x0015
Expand All @@ -201,7 +200,6 @@ struct mgmt_cp_pin_code_reply {
} __packed;
struct mgmt_rp_pin_code_reply {
struct mgmt_addr_info addr;
uint8_t status;
} __packed;

#define MGMT_OP_PIN_CODE_NEG_REPLY 0x0017
Expand All @@ -221,7 +219,6 @@ struct mgmt_cp_pair_device {
} __packed;
struct mgmt_rp_pair_device {
struct mgmt_addr_info addr;
__u8 status;
} __packed;

#define MGMT_OP_CANCEL_PAIR_DEVICE 0x001A
Expand All @@ -233,7 +230,6 @@ struct mgmt_cp_unpair_device {
} __packed;
struct mgmt_rp_unpair_device {
struct mgmt_addr_info addr;
__u8 status;
};

#define MGMT_OP_USER_CONFIRM_REPLY 0x001C
Expand All @@ -242,7 +238,6 @@ struct mgmt_cp_user_confirm_reply {
} __packed;
struct mgmt_rp_user_confirm_reply {
struct mgmt_addr_info addr;
__u8 status;
} __packed;

#define MGMT_OP_USER_CONFIRM_NEG_REPLY 0x001D
Expand All @@ -257,7 +252,6 @@ struct mgmt_cp_user_passkey_reply {
} __packed;
struct mgmt_rp_user_passkey_reply {
struct mgmt_addr_info addr;
__u8 status;
} __packed;

#define MGMT_OP_USER_PASSKEY_NEG_REPLY 0x001F
Expand Down Expand Up @@ -297,7 +291,6 @@ struct mgmt_cp_confirm_name {
} __packed;
struct mgmt_rp_confirm_name {
struct mgmt_addr_info addr;
__u8 status;
} __packed;

#define MGMT_OP_BLOCK_DEVICE 0x0026
Expand All @@ -313,6 +306,7 @@ struct mgmt_cp_unblock_device {
#define MGMT_EV_CMD_COMPLETE 0x0001
struct mgmt_ev_cmd_complete {
__le16 opcode;
__u8 status;
__u8 data[0];
} __packed;

Expand Down
Loading

0 comments on commit aee9b21

Please sign in to comment.