Linux-Bluetooth Archive on lore.kernel.org
 help / Atom feed
From: "Panda, Bharat B" <bharat.b.panda@intel.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Subject: RE: [PATCH v2] Bluetooth: Support fast advertising interval
Date: Mon, 4 Feb 2019 09:10:44 +0000
Message-ID: <B42C2A3D4050B547BA40CAE18E023BE64D6A77D0@BGSMSX109.gar.corp.intel.com> (raw)
In-Reply-To: <E8D865FD-B17C-4F46-8CC7-6EC6F010D757@holtmann.org>

Hi Marcel,

> -----Original Message-----
> From: Marcel Holtmann [mailto:marcel@holtmann.org]
> Sent: Wednesday, December 19, 2018 5:00 AM
> To: Panda, Bharat B <bharat.b.panda@intel.com>
> Cc: linux-bluetooth@vger.kernel.org
> Subject: Re: [PATCH v2] Bluetooth: Support fast advertising interval
> 
> Hi Bharat,
> 
> > Changes made to add support for fast advertising interval as per core
> > 4.1 specification, section 9.3.11.2.
> >
> > A peripheral device entering any of the following GAP modes and
> > sending either non-connectable advertising events or scannable
> > undirected advertising events should use adv_fast_interval2(100ms -
> > 150ms) for adv_fast_period(30s).
> >         - Non-Discoverable Mode
> >         - Non-Connectable Mode
> >         - Limited Discoverable Mode
> >         - General Discoverable Mode
> >
> > Signed-off-by: Bharat Bhusan Panda <bharat.b.panda@intel.com>
> > ---
> > include/net/bluetooth/hci_core.h |  2 ++
> > net/bluetooth/hci_request.c      | 27 +++++++++++++++++++++++++++
> > 2 files changed, 29 insertions(+)
> >
> > diff --git a/include/net/bluetooth/hci_core.h
> > b/include/net/bluetooth/hci_core.h
> > index 0db1b9b..868c2fb 100644
> > --- a/include/net/bluetooth/hci_core.h
> > +++ b/include/net/bluetooth/hci_core.h
> > @@ -1491,6 +1491,8 @@ struct hci_mgmt_chan {
> > #define DISCOV_INTERLEAVED_INQUIRY_LEN	0x04
> > #define DISCOV_BREDR_INQUIRY_LEN	0x08
> > #define DISCOV_LE_RESTART_DELAY		msecs_to_jiffies(200)	/*
> msec */
> > +#define DISCOV_LE_FAST_ADV_INT_MIN	100	/* msec */
> > +#define DISCOV_LE_FAST_ADV_INT_MAX	150	/* msec */
> >
> > void mgmt_fill_version_info(void *ver); int mgmt_new_settings(struct
> > hci_dev *hdev); diff --git a/net/bluetooth/hci_request.c
> > b/net/bluetooth/hci_request.c index e8c9ef1..fe43498 100644
> > --- a/net/bluetooth/hci_request.c
> > +++ b/net/bluetooth/hci_request.c
> > @@ -1092,6 +1092,33 @@ void __hci_req_enable_advertising(struct
> hci_request *req)
> > 	else
> > 		cp.type = LE_ADV_NONCONN_IND;
> >
> > +	/* As per core 4.1 spec, section 9.3.11.2: A peripheral device
> > +	 * entering any of the following GAP modes and sending either
> > +	 * non-connectable advertising events or scannable undirected
> > +	 * advertising events should use adv_fast_interval2(100ms - 150ms)
> > +	 * for adv_fast_period(30s).
> > +	 *
> > +	 * 	- Non-Discoverable Mode
> > +	 *	- Non-Connectable Mode
> > +	 * 	- Limited Discoverable Mode
> > +	 * 	- General Discoverable Mode
> > +	 */
> > +	if (cp.type == LE_ADV_NONCONN_IND || cp.type ==
> LE_ADV_SCAN_IND) {
> > +		/* Set the suggested min and max fast advertising interval,
> > +		 * only if the peripheral device has entered any of the modes
> > +		 * such as non-discoverable, non-connectable or limited-
> > +		 * discoverable.
> > +		 */
> > +		if (!hci_dev_test_flag(hdev, HCI_DISCOVERABLE) ||
> > +			!hci_dev_test_flag(hdev, HCI_CONNECTABLE) ||
> > +			hci_dev_test_flag(hdev, HCI_LIMITED_DISCOVERABLE))
> {
> 
> this is still wrongly indented.
Sorry for replying late, I have made the correct indentation and submitted v3 for same. Please review.
> 
> > +			cp.min_interval =
> > +				cpu_to_le16(DISCOV_LE_FAST_ADV_INT_MIN);
> > +			cp.max_interval =
> > +
> 	cpu_to_le16(DISCOV_LE_FAST_ADV_INT_MAX);
> > +		}
> > +	}
> > +
> 
> Regards
> 
> Marcel

Regards,
Bharat


      reply index

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-15 18:48 [Bluez-users] Multiple Bluetooth connections Pedro Monjo Florit
2005-03-15 19:27 ` sir
2005-03-16  9:42 ` Marcel Holtmann
2005-03-16 11:23   ` Pedro Monjo Florit
2005-03-16 11:44     ` Marcel Holtmann
     [not found]   ` <marcel@holtmann.org>
2005-03-16 10:40     ` Peter Stephenson
2018-10-30 10:24     ` [PATCH v2] Bluetooth: Support fast advertising interval Bharat Bhusan Panda
2018-11-13  9:00       ` Panda, Bharat B
2018-11-23 10:52         ` Panda, Bharat B
2018-12-07 12:34           ` Panda, Bharat B
2018-12-18 23:30       ` Marcel Holtmann
2019-02-04  9:10         ` Panda, Bharat B [this message]

Reply instructions:

You may reply publically 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=B42C2A3D4050B547BA40CAE18E023BE64D6A77D0@BGSMSX109.gar.corp.intel.com \
    --to=bharat.b.panda@intel.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=marcel@holtmann.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

Linux-Bluetooth Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-bluetooth/0 linux-bluetooth/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-bluetooth linux-bluetooth/ https://lore.kernel.org/linux-bluetooth \
		linux-bluetooth@vger.kernel.org linux-bluetooth@archiver.kernel.org
	public-inbox-index linux-bluetooth


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-bluetooth


AGPL code for this site: git clone https://public-inbox.org/ public-inbox