aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Guedes <andre.guedes@openbossa.org>2013-04-04 19:21:01 -0400
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>2013-04-18 00:17:05 -0400
commit525e296a28561659d85a63befb694f36e6ec3429 (patch)
tree1c4efc907e4dd7bbd9c0f48eedb7bc222e1694d0
parent5df480b56e427d83830576862463226c8fcc95d7 (diff)
Bluetooth: Add macros for filter duplicates values
This patch adds macros for filter_duplicates parameter values from HCI LE Set Scan Enable command. It also fixes le_scan_enable_req function so it uses the LE_SCAN_FILTER_DUP_ENABLE macro instead of a magic number. The LE_SCAN_FILTER_DUP_DISABLE was also defined since it will be required to properly support the GAP Observer Role. Signed-off-by: Andre Guedes <andre.guedes@openbossa.org> Acked-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
-rw-r--r--include/net/bluetooth/hci.h2
-rw-r--r--net/bluetooth/hci_core.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 3f4266b3c3ba..84c37abc48c1 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -998,6 +998,8 @@ struct hci_cp_le_set_scan_param {
998 998
999#define LE_SCANNING_DISABLED 0x00 999#define LE_SCANNING_DISABLED 0x00
1000#define LE_SCANNING_ENABLED 0x01 1000#define LE_SCANNING_ENABLED 0x01
1001#define LE_SCAN_FILTER_DUP_DISABLE 0x00
1002#define LE_SCAN_FILTER_DUP_ENABLE 0x01
1001 1003
1002#define HCI_OP_LE_SET_SCAN_ENABLE 0x200c 1004#define HCI_OP_LE_SET_SCAN_ENABLE 0x200c
1003struct hci_cp_le_set_scan_enable { 1005struct hci_cp_le_set_scan_enable {
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 00dcb74954d3..d0ae237ff819 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -1990,7 +1990,7 @@ static void le_scan_enable_req(struct hci_request *req, unsigned long opt)
1990 1990
1991 memset(&cp, 0, sizeof(cp)); 1991 memset(&cp, 0, sizeof(cp));
1992 cp.enable = 1; 1992 cp.enable = 1;
1993 cp.filter_dup = 1; 1993 cp.filter_dup = LE_SCAN_FILTER_DUP_ENABLE;
1994 1994
1995 hci_req_add(req, HCI_OP_LE_SET_SCAN_ENABLE, sizeof(cp), &cp); 1995 hci_req_add(req, HCI_OP_LE_SET_SCAN_ENABLE, sizeof(cp), &cp);
1996} 1996}