net/bluetooth/msft.c
Source file repositories/reference/linux-study-clean/net/bluetooth/msft.c
File Facts
- System
- Linux kernel
- Corpus path
net/bluetooth/msft.c- Extension
.c- Size
- 30612 bytes
- Lines
- 1202
- Domain
- Networking Core
- Bucket
- Sockets, Protocols, Packet Path, And Network Policy
- Inferred role
- Networking Core: implementation source
- Status
- source implementation candidate
Why This File Exists
Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
net/bluetooth/bluetooth.hnet/bluetooth/hci_core.hnet/bluetooth/mgmt.hmgmt_util.hmsft.h
Detected Declarations
struct msft_cp_read_supported_featuresstruct msft_rp_read_supported_featuresstruct msft_le_monitor_advertisement_patternstruct msft_le_monitor_advertisement_pattern_datastruct msft_cp_le_monitor_advertisementstruct msft_rp_le_monitor_advertisementstruct msft_cp_le_cancel_monitor_advertisementstruct msft_rp_le_cancel_monitor_advertisementstruct msft_cp_le_set_advertisement_filter_enablestruct msft_rp_le_set_advertisement_filter_enablestruct msft_ev_le_monitor_devicestruct msft_monitor_advertisement_handle_datastruct msft_monitor_addr_filter_datastruct msft_dataenum monitor_addr_filter_statefunction msft_monitor_supportedfunction read_supported_featuresfunction list_for_each_entryfunction list_for_each_entryfunction msft_monitor_device_delfunction list_for_each_entry_safefunction msft_le_monitor_advertisement_cbfunction msft_remove_addr_filters_syncfunction list_for_each_entry_safefunction msft_add_address_filter_syncfunction list_for_each_entry_safefunction msft_le_cancel_monitor_advertisement_cbfunction msft_remove_monitor_syncfunction msft_suspend_syncfunction msft_monitor_rssi_validfunction msft_monitor_pattern_validfunction msft_add_monitor_syncfunction list_for_each_entryfunction list_for_each_entryfunction reregister_monitorfunction msft_resume_syncfunction msft_do_openfunction msft_do_closefunction msft_cancel_address_filter_syncfunction msft_registerfunction msft_releasefunction msft_device_foundfunction msft_device_lostfunction msft_add_address_filter_syncfunction msft_monitor_device_evtfunction msft_monitor_device_evtfunction msft_vendor_evtfunction msft_get_features
Annotated Snippet
struct msft_cp_read_supported_features {
__u8 sub_opcode;
} __packed;
struct msft_rp_read_supported_features {
__u8 status;
__u8 sub_opcode;
__le64 features;
__u8 evt_prefix_len;
__u8 evt_prefix[];
} __packed;
#define MSFT_OP_LE_MONITOR_ADVERTISEMENT 0x03
#define MSFT_MONITOR_ADVERTISEMENT_TYPE_PATTERN 0x01
struct msft_le_monitor_advertisement_pattern {
__u8 length;
__u8 data_type;
__u8 start_byte;
__u8 pattern[];
};
struct msft_le_monitor_advertisement_pattern_data {
__u8 count;
__u8 data[];
};
struct msft_cp_le_monitor_advertisement {
__u8 sub_opcode;
__s8 rssi_high;
__s8 rssi_low;
__u8 rssi_low_interval;
__u8 rssi_sampling_period;
__u8 cond_type;
__u8 data[];
} __packed;
struct msft_rp_le_monitor_advertisement {
__u8 status;
__u8 sub_opcode;
__u8 handle;
} __packed;
#define MSFT_OP_LE_CANCEL_MONITOR_ADVERTISEMENT 0x04
struct msft_cp_le_cancel_monitor_advertisement {
__u8 sub_opcode;
__u8 handle;
} __packed;
struct msft_rp_le_cancel_monitor_advertisement {
__u8 status;
__u8 sub_opcode;
} __packed;
#define MSFT_OP_LE_SET_ADVERTISEMENT_FILTER_ENABLE 0x05
struct msft_cp_le_set_advertisement_filter_enable {
__u8 sub_opcode;
__u8 enable;
} __packed;
struct msft_rp_le_set_advertisement_filter_enable {
__u8 status;
__u8 sub_opcode;
} __packed;
#define MSFT_EV_LE_MONITOR_DEVICE 0x02
struct msft_ev_le_monitor_device {
__u8 addr_type;
bdaddr_t bdaddr;
__u8 monitor_handle;
__u8 monitor_state;
} __packed;
struct msft_monitor_advertisement_handle_data {
__u8 msft_handle;
__u16 mgmt_handle;
__s8 rssi_high;
__s8 rssi_low;
__u8 rssi_low_interval;
__u8 rssi_sampling_period;
__u8 cond_type;
struct list_head list;
};
enum monitor_addr_filter_state {
AF_STATE_IDLE,
AF_STATE_ADDING,
AF_STATE_ADDED,
AF_STATE_REMOVING,
};
Annotation
- Immediate include surface: `net/bluetooth/bluetooth.h`, `net/bluetooth/hci_core.h`, `net/bluetooth/mgmt.h`, `mgmt_util.h`, `msft.h`.
- Detected declarations: `struct msft_cp_read_supported_features`, `struct msft_rp_read_supported_features`, `struct msft_le_monitor_advertisement_pattern`, `struct msft_le_monitor_advertisement_pattern_data`, `struct msft_cp_le_monitor_advertisement`, `struct msft_rp_le_monitor_advertisement`, `struct msft_cp_le_cancel_monitor_advertisement`, `struct msft_rp_le_cancel_monitor_advertisement`, `struct msft_cp_le_set_advertisement_filter_enable`, `struct msft_rp_le_set_advertisement_filter_enable`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.