linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: Filter duplicated reports in LE scan
@ 2012-05-31 23:01 Andre Guedes
  2012-06-01 22:51 ` Gustavo Padovan
  0 siblings, 1 reply; 2+ messages in thread
From: Andre Guedes @ 2012-05-31 23:01 UTC (permalink / raw)
  To: linux-bluetooth

This patch enables filtering duplicated advertising reports during
LE scan.

Some LE devices advertise using very small intervals generating lots
of equal advertising report events to the host. Each event generates
a mgmt_device_found event which is copied to userspace.

Enabling this feature, duplicated advertising reports are filtered
at controller's link layer. This way, the controller doesn't wake up
the host to report duplicated advertising reports and, consequently,
less data is copied to userspace.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
---
 net/bluetooth/hci_core.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 979556a..cf39e95 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -1526,6 +1526,7 @@ static void le_scan_enable_req(struct hci_dev *hdev, unsigned long opt)
 
 	memset(&cp, 0, sizeof(cp));
 	cp.enable = 1;
+	cp.filter_dup = 1;
 
 	hci_send_cmd(hdev, HCI_OP_LE_SET_SCAN_ENABLE, sizeof(cp), &cp);
 }
-- 
1.7.10.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Bluetooth: Filter duplicated reports in LE scan
  2012-05-31 23:01 [PATCH] Bluetooth: Filter duplicated reports in LE scan Andre Guedes
@ 2012-06-01 22:51 ` Gustavo Padovan
  0 siblings, 0 replies; 2+ messages in thread
From: Gustavo Padovan @ 2012-06-01 22:51 UTC (permalink / raw)
  To: Andre Guedes; +Cc: linux-bluetooth

Hi Andre,

* Andre Guedes <andre.guedes@openbossa.org> [2012-05-31 20:01:41 -0300]:

> This patch enables filtering duplicated advertising reports during
> LE scan.
> 
> Some LE devices advertise using very small intervals generating lots
> of equal advertising report events to the host. Each event generates
> a mgmt_device_found event which is copied to userspace.
> 
> Enabling this feature, duplicated advertising reports are filtered
> at controller's link layer. This way, the controller doesn't wake up
> the host to report duplicated advertising reports and, consequently,
> less data is copied to userspace.
> 
> Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
> ---
>  net/bluetooth/hci_core.c |    1 +
>  1 file changed, 1 insertion(+)

Patch has been applied to bluetooth-next. Thanks.

	Gustavo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-06-01 22:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-31 23:01 [PATCH] Bluetooth: Filter duplicated reports in LE scan Andre Guedes
2012-06-01 22:51 ` Gustavo Padovan

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).