Linux bluetooth development
 help / color / mirror / Atom feed
From: Dohyun Pyun <re20sfree@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: steve.jun@samsung.com, DoHyun Pyun <dh79.pyun@samsung.com>,
	C S Bhargava <cs.bhargava@samsung.com>
Subject: [PATCH v2 4/8] Bluetooth: Add Write Synchronization Train Parameters Command
Date: Wed,  2 Oct 2013 20:10:14 +0900	[thread overview]
Message-ID: <1380712218-9269-5-git-send-email-dh79.pyun@samsung.com> (raw)
In-Reply-To: <1380712218-9269-1-git-send-email-dh79.pyun@samsung.com>

From: DoHyun Pyun <dh79.pyun@samsung.com>

The Write_Synchronization_Train_Parameters command configures
the Synchronization Train functionality in the BR/EDR Controller.

The Core Spec Addendum 4 adds this command in part B Connectionless
Slave Broadcast.

Bluetooth Core Specification Addendum 4 - Page 97

"7.3.90 Write Synchronization Train Parameters Command [New Section]
...
Note: The AFH_Channel_Map used in the Synchronization Train packets is
configured by the Set_AFH_Channel_Classification command and the local
channel classification in the BR/EDR Controller.

Interval_Min and Interval_Max specify the allowed range of
Sync_Train_Interval. Refer to [Vol. 2], Part B, section 2.7.2 for
a detailed description of Sync_Train_Interval. The BR/EDR Controller shall
select an interval from this range and return it in Sync_Train_Interval.
If the Controller is unable to select a value from this range, it shall
return the Invalid HCI Command Parameters (0x12) error code.

Once started (via the Start_Synchronization_Train Command) the
Synchronization Train will continue until synchronization_trainTO slots have
passed or Connectionless Slave Broadcast has been disabled."

Signed-off-by: Dohyun Pyun <dh79.pyun@samsung.com>
Signed-off-by: C S Bhargava <cs.bhargava@samsung.com>
---
 include/net/bluetooth/hci.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 57f73e3..8830bf2 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -873,6 +873,18 @@ struct hci_rp_set_csb_data {
 
 #define HCI_OP_READ_SYNC_TRAIN_PARAMS	0x0c77
 
+#define HCI_OP_WRITE_SYNC_TRAIN_PARAMS	0x0c78
+struct hci_cp_write_sync_train_params {
+	__le16	interval_min;
+	__le16	interval_max;
+	__le32	sync_train_tout;
+	__u8	service_data;
+} __packed;
+struct hci_rp_write_sync_train_params {
+	__u8	status;
+	__le16	sync_train_int;
+} __packed;
+
 #define HCI_OP_READ_LOCAL_VERSION	0x1001
 struct hci_rp_read_local_version {
 	__u8     status;
-- 
1.8.1.2


  parent reply	other threads:[~2013-10-02 11:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-02 11:10 [PATCH v2 0/8] Add CSA 4 commands and events in hci.h Dohyun Pyun
2013-10-02 11:10 ` [PATCH v2 1/8] Bluetooth: Add Set Reserved LT_ADDR Command Dohyun Pyun
2013-10-02 11:10 ` [PATCH v2 2/8] Bluetooth: Add Delete " Dohyun Pyun
2013-10-02 11:10 ` [PATCH v2 3/8] Bluetooth: Add Set Connectionless Slave Broadcast Data Command Dohyun Pyun
2013-10-02 11:10 ` Dohyun Pyun [this message]
2013-10-02 11:10 ` [PATCH v2 5/8] Bluetooth: Add Set Connectionless Slave Broadcast Command Dohyun Pyun
2013-10-02 11:10 ` [PATCH v2 6/8] Bluetooth: Add Start Synchronization Train Command Dohyun Pyun
2013-10-02 11:10 ` [PATCH v2 7/8] Bluetooth: Add Synchronization Train Complete Event Dohyun Pyun
2013-10-02 11:10 ` [PATCH v2 8/8] Bluetooth: Add Slave Page Response Timeout Event Dohyun Pyun
2013-10-02 11:46   ` Marcel Holtmann
2013-10-02 11:51     ` Marcel Holtmann

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=1380712218-9269-5-git-send-email-dh79.pyun@samsung.com \
    --to=re20sfree@gmail.com \
    --cc=cs.bhargava@samsung.com \
    --cc=dh79.pyun@samsung.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=steve.jun@samsung.com \
    /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