2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 12:43:55 +08:00

Bluetooth: Add definitions for advertisement monitor features

This adds support for Advertisement Monitor API. Here are the commands
and events added.
- Read Advertisement Monitor Feature command
- Add Advertisement Pattern Monitor command
- Remove Advertisement Monitor command
- Advertisement Monitor Added event
- Advertisement Monitor Removed event

Signed-off-by: Miao-chen Chou <mcchou@chromium.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Miao-chen Chou 2020-06-17 16:39:12 +02:00 committed by Johan Hedberg
parent 4c54bf2b09
commit 7fceb17c6b

View File

@ -741,6 +741,45 @@ struct mgmt_rp_set_device_flags {
struct mgmt_addr_info addr;
} __packed;
#define MGMT_ADV_MONITOR_FEATURE_MASK_OR_PATTERNS BIT(0)
#define MGMT_OP_READ_ADV_MONITOR_FEATURES 0x0051
#define MGMT_READ_ADV_MONITOR_FEATURES_SIZE 0
struct mgmt_rp_read_adv_monitor_features {
__le32 supported_features;
__le32 enabled_features;
__le16 max_num_handles;
__u8 max_num_patterns;
__le16 num_handles;
__le16 handles[];
} __packed;
struct mgmt_adv_pattern {
__u8 ad_type;
__u8 offset;
__u8 length;
__u8 value[31];
} __packed;
#define MGMT_OP_ADD_ADV_PATTERNS_MONITOR 0x0052
struct mgmt_cp_add_adv_patterns_monitor {
__u8 pattern_count;
struct mgmt_adv_pattern patterns[];
} __packed;
#define MGMT_ADD_ADV_PATTERNS_MONITOR_SIZE 1
struct mgmt_rp_add_adv_patterns_monitor {
__le16 monitor_handle;
} __packed;
#define MGMT_OP_REMOVE_ADV_MONITOR 0x0053
struct mgmt_cp_remove_adv_monitor {
__le16 monitor_handle;
} __packed;
#define MGMT_REMOVE_ADV_MONITOR_SIZE 2
struct mgmt_rp_remove_adv_monitor {
__le16 monitor_handle;
} __packed;
#define MGMT_EV_CMD_COMPLETE 0x0001
struct mgmt_ev_cmd_complete {
__le16 opcode;
@ -979,3 +1018,13 @@ struct mgmt_ev_device_flags_changed {
__le32 supported_flags;
__le32 current_flags;
} __packed;
#define MGMT_EV_ADV_MONITOR_ADDED 0x002b
struct mgmt_ev_adv_monitor_added {
__le16 monitor_handle;
} __packed;
#define MGMT_EV_ADV_MONITOR_REMOVED 0x002c
struct mgmt_ev_adv_monitor_removed {
__le16 monitor_handle;
} __packed;