Linux bluetooth development
 help / color / mirror / Atom feed
From: Dmitriy Paliy <dmitriy.paliy@nokia.com>
To: linux-bluetooth@vger.kernel.org
Cc: Dmitriy Paliy <dmitriy.paliy@nokia.com>
Subject: [PATCH 3/5] Add set fast connectable to adapter
Date: Wed, 18 Aug 2010 13:35:58 +0300	[thread overview]
Message-ID: <1282127760-12655-4-git-send-email-dmitriy.paliy@nokia.com> (raw)
In-Reply-To: <1282127760-12655-1-git-send-email-dmitriy.paliy@nokia.com>

Set fast connectable added to adapter interface. Enables or disables
faster page scanning. It does not interfere with any other adapter's
interfaces.
---
 src/adapter.c |   12 ++++++++++++
 src/adapter.h |    6 ++++++
 2 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/src/adapter.c b/src/adapter.c
index 4ad4165..b023c01 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -3454,3 +3454,15 @@ void btd_adapter_unregister_powered_callback(struct btd_adapter *adapter,
 	adapter->powered_callbacks =
 			g_slist_remove(adapter->powered_callbacks, cb);
 }
+
+int btd_adapter_set_fast_connectable(struct btd_adapter *adapter,
+							gboolean enable)
+{
+	if (!adapter_ops)
+		return -EINVAL;
+
+	if (!adapter->up)
+		return -EINVAL;
+
+	return adapter_ops->set_fast_connectable(adapter->dev_id, enable);
+}
diff --git a/src/adapter.h b/src/adapter.h
index 657e035..5352731 100644
--- a/src/adapter.h
+++ b/src/adapter.h
@@ -196,3 +196,9 @@ void btd_adapter_register_powered_callback(struct btd_adapter *adapter,
 						btd_adapter_powered_cb cb);
 void btd_adapter_unregister_powered_callback(struct btd_adapter *adapter,
 						btd_adapter_powered_cb cb);
+
+/* If TRUE, enables fast connectabe, i.e. reduces page scan interval and changes
+ * type. If FALSE, disables fast connectable, i.e. sets page scan interval and
+ * type to default values. Valid for both connectable and discoverable modes. */
+int btd_adapter_set_fast_connectable(struct btd_adapter *adapter,
+							gboolean enable);
-- 
1.7.0.4


  parent reply	other threads:[~2010-08-18 10:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-18 10:35 [PATCH 0/5] Fast connectable mode for HFP (update) Dmitriy Paliy
2010-08-18 10:35 ` [PATCH 1/5] Add STANDARD and INTERLACED page scan definitions Dmitriy Paliy
2010-08-18 10:35 ` [PATCH 2/5] Add fast connectable to hciops Dmitriy Paliy
2010-08-18 10:35 ` Dmitriy Paliy [this message]
2010-08-18 10:35 ` [PATCH 4/5] Add set fast connectable to audio manager Dmitriy Paliy
2010-08-18 10:36 ` [PATCH 5/5] Add fast connectable support to HFP Dmitriy Paliy
2010-08-18 11:15 ` [PATCH 0/5] Fast connectable mode for HFP (update) Johan Hedberg
  -- strict thread matches above, loose matches on Subject: below --
2010-08-17 14:05 [PATCH 0/5] Fast connectable mode for HFP Dmitriy Paliy
2010-08-17 14:05 ` [PATCH 3/5] Add set fast connectable to adapter Dmitriy Paliy

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=1282127760-12655-4-git-send-email-dmitriy.paliy@nokia.com \
    --to=dmitriy.paliy@nokia.com \
    --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