include/net/bluetooth/hci_drv.h
Source file repositories/reference/linux-study-clean/include/net/bluetooth/hci_drv.h
File Facts
- System
- Linux kernel
- Corpus path
include/net/bluetooth/hci_drv.h- Extension
.h- Size
- 1880 bytes
- Lines
- 77
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hnet/bluetooth/bluetooth.hnet/bluetooth/hci.h
Detected Declarations
struct hci_drv_cmd_hdrstruct hci_drv_ev_hdrstruct hci_drv_ev_cmd_statusstruct hci_drv_ev_cmd_completestruct hci_drv_rp_read_infostruct hci_drv_handlerstruct hci_drv
Annotated Snippet
struct hci_drv_cmd_hdr {
__le16 opcode;
__le16 len;
} __packed;
struct hci_drv_ev_hdr {
__le16 opcode;
__le16 len;
} __packed;
#define HCI_DRV_EV_CMD_STATUS 0x0000
struct hci_drv_ev_cmd_status {
__le16 opcode;
__u8 status;
} __packed;
#define HCI_DRV_EV_CMD_COMPLETE 0x0001
struct hci_drv_ev_cmd_complete {
__le16 opcode;
__u8 status;
__u8 data[];
} __packed;
#define HCI_DRV_STATUS_SUCCESS 0x00
#define HCI_DRV_STATUS_UNSPECIFIED_ERROR 0x01
#define HCI_DRV_STATUS_UNKNOWN_COMMAND 0x02
#define HCI_DRV_STATUS_INVALID_PARAMETERS 0x03
#define HCI_DRV_MAX_DRIVER_NAME_LENGTH 32
/* Common commands that make sense on all drivers start from 0x0000 */
#define HCI_DRV_OP_READ_INFO 0x0000
#define HCI_DRV_READ_INFO_SIZE 0
struct hci_drv_rp_read_info {
__u8 driver_name[HCI_DRV_MAX_DRIVER_NAME_LENGTH];
__le16 num_supported_commands;
__le16 supported_commands[] __counted_by_le(num_supported_commands);
} __packed;
/* Driver specific OGF (Opcode Group Field)
* Commands in this group may have different meanings across different drivers.
*/
#define HCI_DRV_OGF_DRIVER_SPECIFIC 0x01
int hci_drv_cmd_status(struct hci_dev *hdev, u16 cmd, u8 status);
int hci_drv_cmd_complete(struct hci_dev *hdev, u16 cmd, u8 status, void *rp,
size_t rp_len);
int hci_drv_process_cmd(struct hci_dev *hdev, struct sk_buff *cmd_skb);
struct hci_drv_handler {
int (*func)(struct hci_dev *hdev, void *data, u16 data_len);
size_t data_len;
};
struct hci_drv {
size_t common_handler_count;
const struct hci_drv_handler *common_handlers;
size_t specific_handler_count;
const struct hci_drv_handler *specific_handlers;
};
#endif /* __HCI_DRV_H */
Annotation
- Immediate include surface: `linux/types.h`, `net/bluetooth/bluetooth.h`, `net/bluetooth/hci.h`.
- Detected declarations: `struct hci_drv_cmd_hdr`, `struct hci_drv_ev_hdr`, `struct hci_drv_ev_cmd_status`, `struct hci_drv_ev_cmd_complete`, `struct hci_drv_rp_read_info`, `struct hci_drv_handler`, `struct hci_drv`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- Implementation status: source implementation candidate.
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.