* [PATCH] Define AMP HCI commands
@ 2012-05-25 11:13 Andrei Emeltchenko
2012-05-25 11:14 ` [PATCH] Bluetooth: Define HCI AMP cmd struct Andrei Emeltchenko
0 siblings, 1 reply; 6+ messages in thread
From: Andrei Emeltchenko @ 2012-05-25 11:13 UTC (permalink / raw)
To: linux-bluetooth
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
I am sending this definitions in advance since they are used in softamp
in wireless code.
Andrei Emeltchenko (1):
Bluetooth: Define HCI AMP cmd struct
include/net/bluetooth/hci.h | 83 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 83 insertions(+)
--
1.7.9.5
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] Bluetooth: Define HCI AMP cmd struct
2012-05-25 11:13 [PATCH] Define AMP HCI commands Andrei Emeltchenko
@ 2012-05-25 11:14 ` Andrei Emeltchenko
2012-05-25 11:29 ` Marcel Holtmann
0 siblings, 1 reply; 6+ messages in thread
From: Andrei Emeltchenko @ 2012-05-25 11:14 UTC (permalink / raw)
To: linux-bluetooth
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Add HCI commands to deal with Bluetooth AMP controllers.
Those commands will be used by bluetooth and softamp code.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
---
include/net/bluetooth/hci.h | 83 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 83 insertions(+)
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index edb6639..afd9594 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -31,6 +31,7 @@
#define HCI_MAX_FRAME_SIZE (HCI_MAX_ACL_SIZE + 4)
#define HCI_LINK_KEY_SIZE 16
+#define HCI_AMP_LINK_KEY_SIZE (2 * HCI_LINK_KEY_SIZE)
/* HCI dev events */
#define HCI_DEV_REG 1
@@ -525,6 +526,28 @@ struct hci_cp_io_capability_neg_reply {
__u8 reason;
} __packed;
+#define HCI_OP_CREATE_PHY_LINK 0x0435
+struct hci_cp_create_phy_link {
+ __u8 phy_handle;
+ __u8 key_len;
+ __u8 key_type;
+ __u8 key[HCI_AMP_LINK_KEY_SIZE];
+} __packed;
+
+#define HCI_OP_ACCEPT_PHY_LINK 0x0436
+struct hci_cp_accept_phy_link {
+ __u8 phy_handle;
+ __u8 key_len;
+ __u8 key_type;
+ __u8 key[HCI_AMP_LINK_KEY_SIZE];
+} __packed;
+
+#define HCI_OP_DISC_PHY_LINK 0x0437
+struct hci_cp_disc_phy_link {
+ __u8 phy_handle;
+ __u8 reason;
+} __packed;
+
#define HCI_OP_SNIFF_MODE 0x0803
struct hci_cp_sniff_mode {
__le16 handle;
@@ -820,6 +843,33 @@ struct hci_rp_read_local_amp_info {
__le32 be_flush_to;
} __packed;
+#define HCI_OP_READ_LOCAL_AMP_ASSOC 0x140a
+struct hci_cp_read_local_amp_assoc {
+ __u8 handle;
+ __le16 len_so_far;
+ __le16 max_len;
+} __packed;
+
+struct hci_rp_read_local_amp_assoc {
+ __u8 status;
+ __u8 handle;
+ __le16 rem_len;
+ __u8 frag[0];
+} __packed;
+
+#define HCI_OP_WRITE_REMOTE_AMP_ASSOC 0x140b
+struct hci_cp_write_remote_amp_assoc {
+ __u8 handle;
+ __le16 len_so_far;
+ __le16 rem_len;
+ __u8 frag[0];
+} __packed;
+
+struct hci_rp_write_remote_amp_assoc {
+ __u8 status;
+ __u8 handle;
+} __packed;
+
#define HCI_OP_LE_SET_EVENT_MASK 0x2001
struct hci_cp_le_set_event_mask {
__u8 mask[8];
@@ -1192,6 +1242,39 @@ struct hci_ev_le_meta {
__u8 subevent;
} __packed;
+#define HCI_EV_PHY_LINK_COMPLETE 0x40
+struct hci_ev_phy_link_complete {
+ __u8 status;
+ __u8 phy_handle;
+} __packed;
+
+#define HCI_EV_CHANNEL_SELECTED 0x41
+struct hci_ev_channel_selected {
+ __u8 phy_handle;
+} __packed;
+
+#define HCI_EV_DISC_PHY_LINK_COMPLETE 0x42
+struct hci_ev_disc_phy_link_complete {
+ __u8 status;
+ __u8 phy_handle;
+ __u8 reason;
+} __packed;
+
+#define HCI_EV_LOG_LINK_COMPLETE 0x45
+struct hci_ev_log_link_complete {
+ __u8 status;
+ __le16 log_handle;
+ __u8 phy_handle;
+ __u8 flow_spec_id;
+} __packed;
+
+#define HCI_EV_DISC_LOG_LINK_COMPLETE 0x46
+struct hci_ev_disconn_log_link_complete {
+ __u8 status;
+ __le16 log_handle;
+ __u8 reason;
+} __packed;
+
#define HCI_EV_NUM_COMP_BLOCKS 0x48
struct hci_comp_blocks_info {
__le16 handle;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] Bluetooth: Define HCI AMP cmd struct
2012-05-25 11:14 ` [PATCH] Bluetooth: Define HCI AMP cmd struct Andrei Emeltchenko
@ 2012-05-25 11:29 ` Marcel Holtmann
2012-05-25 11:44 ` Andrei Emeltchenko
2012-05-25 12:09 ` Andrei Emeltchenko
0 siblings, 2 replies; 6+ messages in thread
From: Marcel Holtmann @ 2012-05-25 11:29 UTC (permalink / raw)
To: Andrei Emeltchenko; +Cc: linux-bluetooth
Hi Andrei,
> Add HCI commands to deal with Bluetooth AMP controllers.
> Those commands will be used by bluetooth and softamp code.
>
> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> ---
> include/net/bluetooth/hci.h | 83 +++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 83 insertions(+)
>
> diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
> index edb6639..afd9594 100644
> --- a/include/net/bluetooth/hci.h
> +++ b/include/net/bluetooth/hci.h
> @@ -31,6 +31,7 @@
> #define HCI_MAX_FRAME_SIZE (HCI_MAX_ACL_SIZE + 4)
>
> #define HCI_LINK_KEY_SIZE 16
> +#define HCI_AMP_LINK_KEY_SIZE (2 * HCI_LINK_KEY_SIZE)
>
> /* HCI dev events */
> #define HCI_DEV_REG 1
> @@ -525,6 +526,28 @@ struct hci_cp_io_capability_neg_reply {
> __u8 reason;
> } __packed;
>
> +#define HCI_OP_CREATE_PHY_LINK 0x0435
> +struct hci_cp_create_phy_link {
> + __u8 phy_handle;
> + __u8 key_len;
> + __u8 key_type;
> + __u8 key[HCI_AMP_LINK_KEY_SIZE];
> +} __packed;
> +
> +#define HCI_OP_ACCEPT_PHY_LINK 0x0436
> +struct hci_cp_accept_phy_link {
> + __u8 phy_handle;
> + __u8 key_len;
> + __u8 key_type;
> + __u8 key[HCI_AMP_LINK_KEY_SIZE];
> +} __packed;
> +
> +#define HCI_OP_DISC_PHY_LINK 0x0437
> +struct hci_cp_disc_phy_link {
we should use disconn or disconnect for this.
> + __u8 phy_handle;
> + __u8 reason;
> +} __packed;
> +
> #define HCI_OP_SNIFF_MODE 0x0803
> struct hci_cp_sniff_mode {
> __le16 handle;
> @@ -820,6 +843,33 @@ struct hci_rp_read_local_amp_info {
> __le32 be_flush_to;
> } __packed;
>
> +#define HCI_OP_READ_LOCAL_AMP_ASSOC 0x140a
> +struct hci_cp_read_local_amp_assoc {
> + __u8 handle;
> + __le16 len_so_far;
> + __le16 max_len;
> +} __packed;
> +
No empty line here if the belong together.
> +struct hci_rp_read_local_amp_assoc {
> + __u8 status;
> + __u8 handle;
> + __le16 rem_len;
> + __u8 frag[0];
> +} __packed;
> +
> +#define HCI_OP_WRITE_REMOTE_AMP_ASSOC 0x140b
> +struct hci_cp_write_remote_amp_assoc {
> + __u8 handle;
> + __le16 len_so_far;
> + __le16 rem_len;
> + __u8 frag[0];
> +} __packed;
> +
Same here. No empty line.
> +struct hci_rp_write_remote_amp_assoc {
> + __u8 status;
> + __u8 handle;
> +} __packed;
> +
> #define HCI_OP_LE_SET_EVENT_MASK 0x2001
> struct hci_cp_le_set_event_mask {
> __u8 mask[8];
> @@ -1192,6 +1242,39 @@ struct hci_ev_le_meta {
> __u8 subevent;
> } __packed;
>
> +#define HCI_EV_PHY_LINK_COMPLETE 0x40
> +struct hci_ev_phy_link_complete {
> + __u8 status;
> + __u8 phy_handle;
> +} __packed;
> +
> +#define HCI_EV_CHANNEL_SELECTED 0x41
> +struct hci_ev_channel_selected {
> + __u8 phy_handle;
> +} __packed;
> +
> +#define HCI_EV_DISC_PHY_LINK_COMPLETE 0x42
> +struct hci_ev_disc_phy_link_complete {
Use disconn here.
> + __u8 status;
> + __u8 phy_handle;
> + __u8 reason;
> +} __packed;
> +
> +#define HCI_EV_LOG_LINK_COMPLETE 0x45
> +struct hci_ev_log_link_complete {
Do you wanna go with log instead of logical. I would use logical to not
get confused here.
> + __u8 status;
> + __le16 log_handle;
Just use handle here.
> + __u8 phy_handle;
> + __u8 flow_spec_id;
> +} __packed;
> +
> +#define HCI_EV_DISC_LOG_LINK_COMPLETE 0x46
> +struct hci_ev_disconn_log_link_complete {
> + __u8 status;
> + __le16 log_handle;
Just handle.
> + __u8 reason;
> +} __packed;
> +
> #define HCI_EV_NUM_COMP_BLOCKS 0x48
> struct hci_comp_blocks_info {
> __le16 handle;
Regards
Marcel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Bluetooth: Define HCI AMP cmd struct
2012-05-25 11:29 ` Marcel Holtmann
@ 2012-05-25 11:44 ` Andrei Emeltchenko
2012-05-25 12:09 ` Andrei Emeltchenko
1 sibling, 0 replies; 6+ messages in thread
From: Andrei Emeltchenko @ 2012-05-25 11:44 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: linux-bluetooth
Hi Marcel,
On Fri, May 25, 2012 at 01:29:11PM +0200, Marcel Holtmann wrote:
> > +#define HCI_OP_DISC_PHY_LINK 0x0437
> > +struct hci_cp_disc_phy_link {
>
> we should use disconn or disconnect for this.
OK
> > +#define HCI_OP_READ_LOCAL_AMP_ASSOC 0x140a
> > +struct hci_cp_read_local_amp_assoc {
> > + __u8 handle;
> > + __le16 len_so_far;
> > + __le16 max_len;
> > +} __packed;
> > +
>
> No empty line here if the belong together.
OK
> > +#define HCI_EV_LOG_LINK_COMPLETE 0x45
> > +struct hci_ev_log_link_complete {
>
> Do you wanna go with log instead of logical. I would use logical to not
> get confused here.
OK
>
> > + __u8 status;
> > + __le16 log_handle;
>
> Just use handle here.
Ok, so I rename log_handle to handle and leave phy_handles as is.
Best regards
Andrei Emeltchenko
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] Bluetooth: Define HCI AMP cmd struct
2012-05-25 11:29 ` Marcel Holtmann
2012-05-25 11:44 ` Andrei Emeltchenko
@ 2012-05-25 12:09 ` Andrei Emeltchenko
2012-05-25 12:14 ` Marcel Holtmann
1 sibling, 1 reply; 6+ messages in thread
From: Andrei Emeltchenko @ 2012-05-25 12:09 UTC (permalink / raw)
To: linux-bluetooth
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Add HCI commands to deal with Bluetooth AMP controllers.
Those commands will be used by bluetooth and softamp code.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
---
include/net/bluetooth/hci.h | 81 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 81 insertions(+)
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index edb6639..de09a26 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -31,6 +31,7 @@
#define HCI_MAX_FRAME_SIZE (HCI_MAX_ACL_SIZE + 4)
#define HCI_LINK_KEY_SIZE 16
+#define HCI_AMP_LINK_KEY_SIZE (2 * HCI_LINK_KEY_SIZE)
/* HCI dev events */
#define HCI_DEV_REG 1
@@ -525,6 +526,28 @@ struct hci_cp_io_capability_neg_reply {
__u8 reason;
} __packed;
+#define HCI_OP_CREATE_PHY_LINK 0x0435
+struct hci_cp_create_phy_link {
+ __u8 phy_handle;
+ __u8 key_len;
+ __u8 key_type;
+ __u8 key[HCI_AMP_LINK_KEY_SIZE];
+} __packed;
+
+#define HCI_OP_ACCEPT_PHY_LINK 0x0436
+struct hci_cp_accept_phy_link {
+ __u8 phy_handle;
+ __u8 key_len;
+ __u8 key_type;
+ __u8 key[HCI_AMP_LINK_KEY_SIZE];
+} __packed;
+
+#define HCI_OP_DISCONN_PHY_LINK 0x0437
+struct hci_cp_disconn_phy_link {
+ __u8 phy_handle;
+ __u8 reason;
+} __packed;
+
#define HCI_OP_SNIFF_MODE 0x0803
struct hci_cp_sniff_mode {
__le16 handle;
@@ -820,6 +843,31 @@ struct hci_rp_read_local_amp_info {
__le32 be_flush_to;
} __packed;
+#define HCI_OP_READ_LOCAL_AMP_ASSOC 0x140a
+struct hci_cp_read_local_amp_assoc {
+ __u8 phy_handle;
+ __le16 len_so_far;
+ __le16 max_len;
+} __packed;
+struct hci_rp_read_local_amp_assoc {
+ __u8 status;
+ __u8 phy_handle;
+ __le16 rem_len;
+ __u8 frag[0];
+} __packed;
+
+#define HCI_OP_WRITE_REMOTE_AMP_ASSOC 0x140b
+struct hci_cp_write_remote_amp_assoc {
+ __u8 phy_handle;
+ __le16 len_so_far;
+ __le16 rem_len;
+ __u8 frag[0];
+} __packed;
+struct hci_rp_write_remote_amp_assoc {
+ __u8 status;
+ __u8 phy_handle;
+} __packed;
+
#define HCI_OP_LE_SET_EVENT_MASK 0x2001
struct hci_cp_le_set_event_mask {
__u8 mask[8];
@@ -1192,6 +1240,39 @@ struct hci_ev_le_meta {
__u8 subevent;
} __packed;
+#define HCI_EV_PHY_LINK_COMPLETE 0x40
+struct hci_ev_phy_link_complete {
+ __u8 status;
+ __u8 phy_handle;
+} __packed;
+
+#define HCI_EV_CHANNEL_SELECTED 0x41
+struct hci_ev_channel_selected {
+ __u8 phy_handle;
+} __packed;
+
+#define HCI_EV_DISCONN_PHY_LINK_COMPLETE 0x42
+struct hci_ev_disconn_phy_link_complete {
+ __u8 status;
+ __u8 phy_handle;
+ __u8 reason;
+} __packed;
+
+#define HCI_EV_LOGICAL_LINK_COMPLETE 0x45
+struct hci_ev_logical_link_complete {
+ __u8 status;
+ __le16 handle;
+ __u8 phy_handle;
+ __u8 flow_spec_id;
+} __packed;
+
+#define HCI_EV_DISCONN_LOGICAL_LINK_COMPLETE 0x46
+struct hci_ev_disconn_logical_link_complete {
+ __u8 status;
+ __le16 handle;
+ __u8 reason;
+} __packed;
+
#define HCI_EV_NUM_COMP_BLOCKS 0x48
struct hci_comp_blocks_info {
__le16 handle;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] Bluetooth: Define HCI AMP cmd struct
2012-05-25 12:09 ` Andrei Emeltchenko
@ 2012-05-25 12:14 ` Marcel Holtmann
0 siblings, 0 replies; 6+ messages in thread
From: Marcel Holtmann @ 2012-05-25 12:14 UTC (permalink / raw)
To: Andrei Emeltchenko; +Cc: linux-bluetooth
Hi Andrei,
> Add HCI commands to deal with Bluetooth AMP controllers.
> Those commands will be used by bluetooth and softamp code.
>
> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> ---
> include/net/bluetooth/hci.h | 81 +++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 81 insertions(+)
patch has been applied to bluetooth-next tree.
Regards
Marcel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-05-25 12:14 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-25 11:13 [PATCH] Define AMP HCI commands Andrei Emeltchenko
2012-05-25 11:14 ` [PATCH] Bluetooth: Define HCI AMP cmd struct Andrei Emeltchenko
2012-05-25 11:29 ` Marcel Holtmann
2012-05-25 11:44 ` Andrei Emeltchenko
2012-05-25 12:09 ` Andrei Emeltchenko
2012-05-25 12:14 ` Marcel Holtmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox