linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Krystad <pkrystad@codeaurora.org>
To: linux-bluetooth@vger.kernel.org
Cc: Peter Krystad <pkrystad@codeaurora.org>
Subject: [PATCH bluez 2/2] Add A2MP definitions
Date: Mon, 24 Oct 2011 16:06:19 -0700	[thread overview]
Message-ID: <1319497579-8859-3-git-send-email-pkrystad@codeaurora.org> (raw)
In-Reply-To: <1319497579-8859-1-git-send-email-pkrystad@codeaurora.org>

---
 lib/a2mp.h |  131 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 131 insertions(+), 0 deletions(-)
 create mode 100644 lib/a2mp.h

diff --git a/lib/a2mp.h b/lib/a2mp.h
new file mode 100644
index 0000000..87babb3
--- /dev/null
+++ b/lib/a2mp.h
@@ -0,0 +1,131 @@
+/*
+ *
+ *	BlueZ - Bluetooth protocol stack for Linux
+ *
+ *	Copyright (C) 2010-2011 Code Aurora Forum.  All rights reserved.
+ *
+ *	This program is free software; you can redistribute it and/or modify
+ *	it under the terms of the GNU General Public License version 2 and
+ *	only version 2 as published by the Free Software Foundation.
+ *
+ *	This program is distributed in the hope that it will be useful,
+ *	but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *	GNU General Public License for more details.
+ *
+ */
+
+#ifndef __A2MP_H
+#define __A2MP_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* AMP manager codes */
+#define AMP_COMMAND_REJ		0x01
+#define AMP_DISCOVER_REQ	0x02
+#define AMP_DISCOVER_RSP	0x03
+#define AMP_CHANGE_NOTIFY	0x04
+#define AMP_CHANGE_RSP		0x05
+#define AMP_INFO_REQ		0x06
+#define AMP_INFO_RSP		0x07
+#define AMP_ASSOC_REQ		0x08
+#define AMP_ASSOC_RSP		0x09
+#define AMP_LINK_REQ		0x0a
+#define AMP_LINK_RSP		0x0b
+#define AMP_DISCONN_REQ		0x0c
+#define AMP_DISCONN_RSP		0x0d
+
+typedef struct {
+	uint8_t		code;
+	uint8_t		ident;
+	uint16_t	len;
+} __attribute__ ((packed)) amp_mgr_hdr;
+#define AMP_MGR_HDR_SIZE 4
+
+/* AMP ASSOC structure */
+typedef struct {
+	uint8_t		type_id;
+	uint16_t	len;
+	uint8_t		data[0];
+} __attribute__ ((packed)) amp_assoc_tlv;
+
+typedef struct {
+	uint16_t	reason;
+} __attribute__ ((packed)) amp_cmd_rej_parms;
+
+typedef struct {
+	uint16_t	mtu;
+	uint16_t	mask;
+} __attribute__ ((packed)) amp_discover_req_parms;
+
+typedef struct {
+	uint16_t	mtu;
+	uint16_t	mask;
+	uint8_t		controller_list[0];
+} __attribute__ ((packed)) amp_discover_rsp_parms;
+
+typedef struct {
+	uint8_t		id;
+} __attribute__ ((packed)) amp_info_req_parms;
+
+typedef struct {
+	uint8_t		id;
+	uint8_t		status;
+	uint32_t	total_bandwidth;
+	uint32_t	max_bandwidth;
+	uint32_t	min_latency;
+	uint16_t	pal_caps;
+	uint16_t	assoc_size;
+} __attribute__ ((packed)) amp_info_rsp_parms;
+
+typedef struct {
+	uint8_t		id;
+	uint8_t		status;
+	amp_assoc_tlv	assoc;
+} __attribute__ ((packed)) amp_assoc_rsp_parms;
+
+typedef struct {
+	uint8_t		local_id;
+	uint8_t		remote_id;
+	amp_assoc_tlv	assoc;
+} __attribute__ ((packed)) amp_link_req_parms;
+
+typedef struct {
+	uint8_t		local_id;
+	uint8_t		remote_id;
+	uint8_t		status;
+} __attribute__ ((packed)) amp_link_rsp_parms;
+
+typedef struct {
+	uint8_t		local_id;
+	uint8_t		remote_id;
+} __attribute__ ((packed)) amp_disconn_req_parms;
+
+#define AMP_COMMAND_NOT_RECOGNIZED 0x0000
+
+/* AMP controller status */
+#define AMP_CT_POWERED_DOWN		0x00
+#define AMP_CT_BLUETOOTH_ONLY		0x01
+#define AMP_CT_NO_CAPACITY		0x02
+#define AMP_CT_LOW_CAPACITY		0x03
+#define AMP_CT_MEDIUM_CAPACITY		0x04
+#define AMP_CT_HIGH_CAPACITY		0x05
+#define AMP_CT_FULL_CAPACITY		0x06
+
+/* AMP response status */
+#define AMP_STATUS_SUCCESS				0x00
+#define AMP_STATUS_INVALID_CTRL_ID			0x01
+#define AMP_STATUS_UNABLE_START_LINK_CREATION		0x02
+#define AMP_STATUS_NO_PHYSICAL_LINK_EXISTS		0x02
+#define AMP_STATUS_COLLISION_OCCURED			0x03
+#define AMP_STATUS_DISCONN_REQ_RECVD			0x04
+#define AMP_STATUS_PHYS_LINK_EXISTS			0x05
+#define AMP_STATUS_SECURITY_VIOLATION			0x06
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __A2MP_H */
-- 
1.7.7

--
Peter Krystad
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum

  parent reply	other threads:[~2011-10-24 23:06 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-24 23:06 [PATCH bluez 0/2] Add BT 3.0+HS signalling definitions Peter Krystad
2011-10-24 23:06 ` [PATCH bluez 1/2] Add L2CAP Create/Move Channel definitions Peter Krystad
2011-10-24 23:06 ` Peter Krystad [this message]
2011-10-25  1:43 ` Add BT 3.0+HS signalling definitions Timur Mehrvarz
2011-10-25  7:38   ` GATT Dbus API on BlueZ Ganir, Chen
2011-10-25 12:52     ` Claudio Takahasi
2011-10-25 13:19       ` Ganir, Chen
2011-10-26  0:06         ` Claudio Takahasi
2011-10-26  7:20           ` GATT Dbus API on BlueZ - attirbute-api.txt modifications Ganir, Chen
2011-10-27  7:16             ` Mat Martineau
2011-10-27  8:22               ` Ganir, Chen
2011-10-27 11:30                 ` Mat Martineau
2011-10-27 13:31                 ` Luiz Augusto von Dentz
2011-10-27 13:57                   ` Anderson Lizardo
2011-10-27 14:02                     ` Anderson Lizardo
2011-10-27 14:58                       ` Ganir, Chen
2011-10-27 15:13                         ` Anderson Lizardo
2011-10-27 15:18                           ` Ganir, Chen
2011-10-27 15:35                             ` Anderson Lizardo
2011-10-27 15:06                     ` Ganir, Chen
2011-10-27 15:29                       ` Anderson Lizardo
2011-10-27 15:48                         ` Ganir, Chen
2011-10-27 16:29                           ` Anderson Lizardo
2011-10-27 16:47                             ` Ganir, Chen
2011-10-27 17:32                               ` Anderson Lizardo
2011-10-30  6:56                                 ` Ganir, Chen
2011-10-30 14:23                                   ` Anderson Lizardo
2011-10-30 15:48                                     ` Ganir, Chen
2011-10-30 18:02                                       ` Anderson Lizardo
2011-10-31  6:38                                         ` Ajay Pillai
2011-10-31  6:57                                           ` Ganir, Chen
2011-10-31  8:04                                             ` Ajay Pillai
2011-10-31 10:47                                           ` Anderson Lizardo
2011-10-31  7:19                                         ` Ganir, Chen
2011-10-31 11:07                                           ` Anderson Lizardo
2011-10-31 13:35                                             ` Ajay Pillai
2011-10-31 14:53                                               ` Luiz Augusto von Dentz
2011-10-28 16:19                       ` Brian Gix
2011-10-28 20:09                         ` Anderson Lizardo
2011-10-27 13:32             ` Anderson Lizardo
2011-10-31 17:41             ` Tsai, Mike
2012-01-11 14:25           ` GATT Dbus API on BlueZ Vijaykumar Dadmode
2012-01-11 14:57             ` Claudio Takahasi
2011-10-25 14:41   ` Add BT 3.0+HS signalling definitions Peter Krystad
2011-10-26  0:15     ` Timur Mehrvarz
2011-10-26  7:54       ` Andrei Emeltchenko
2011-10-27 13:39         ` BT 3.0+HS Timur Mehrvarz
2011-10-27 16:46           ` tim.howes
2011-11-03 16:38             ` Timur Mehrvarz
2011-10-26  7:36 ` [PATCH bluez 0/2] Add BT 3.0+HS signalling definitions Andrei Emeltchenko
2011-10-26 17:44   ` Peter Krystad
2011-10-27  8:00     ` 'Andrei Emeltchenko'
2011-10-28  0:23       ` Peter Krystad

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1319497579-8859-3-git-send-email-pkrystad@codeaurora.org \
    --to=pkrystad@codeaurora.org \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).