“44925eb4c2d56ede78c6a1a68aeef57cfbfe03d1”上不存在“...tests/git@gitcode.net:paddlepaddle/PaddleDetection.git”
提交 525e296a 编写于 作者: A Andre Guedes 提交者: Gustavo Padovan

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: NAndre Guedes <andre.guedes@openbossa.org>
Acked-by: NJohan Hedberg <johan.hedberg@intel.com>
Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
上级 5df480b5
...@@ -998,6 +998,8 @@ struct hci_cp_le_set_scan_param { ...@@ -998,6 +998,8 @@ struct hci_cp_le_set_scan_param {
#define LE_SCANNING_DISABLED 0x00 #define LE_SCANNING_DISABLED 0x00
#define LE_SCANNING_ENABLED 0x01 #define LE_SCANNING_ENABLED 0x01
#define LE_SCAN_FILTER_DUP_DISABLE 0x00
#define LE_SCAN_FILTER_DUP_ENABLE 0x01
#define HCI_OP_LE_SET_SCAN_ENABLE 0x200c #define HCI_OP_LE_SET_SCAN_ENABLE 0x200c
struct hci_cp_le_set_scan_enable { struct hci_cp_le_set_scan_enable {
......
...@@ -1990,7 +1990,7 @@ static void le_scan_enable_req(struct hci_request *req, unsigned long opt) ...@@ -1990,7 +1990,7 @@ static void le_scan_enable_req(struct hci_request *req, unsigned long opt)
memset(&cp, 0, sizeof(cp)); memset(&cp, 0, sizeof(cp));
cp.enable = 1; cp.enable = 1;
cp.filter_dup = 1; cp.filter_dup = LE_SCAN_FILTER_DUP_ENABLE;
hci_req_add(req, HCI_OP_LE_SET_SCAN_ENABLE, sizeof(cp), &cp); hci_req_add(req, HCI_OP_LE_SET_SCAN_ENABLE, sizeof(cp), &cp);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册