FreeBSD kernel netgraph code
|
Go to the source code of this file.
Data Structures | |
struct | ubt_hci_cmd |
struct | ubt_hci_evhdr |
struct | ubt_hci_event |
struct | ubt_hci_event_command_compl |
struct | ubt_softc |
Macros | |
#define | UBT_DEBUG(level, sc, fmt, ...) |
#define | UBT_ALERT(...) UBT_DEBUG(NG_UBT_ALERT_LEVEL, __VA_ARGS__) |
#define | UBT_ERR(...) UBT_DEBUG(NG_UBT_ERR_LEVEL, __VA_ARGS__) |
#define | UBT_WARN(...) UBT_DEBUG(NG_UBT_WARN_LEVEL, __VA_ARGS__) |
#define | UBT_INFO(...) UBT_DEBUG(NG_UBT_INFO_LEVEL, __VA_ARGS__) |
#define | UBT_NG_LOCK(sc) mtx_lock(&(sc)->sc_ng_mtx) |
#define | UBT_NG_UNLOCK(sc) mtx_unlock(&(sc)->sc_ng_mtx) |
#define | UBT_HCI_REQUEST 0x20 |
#define | UBT_DEFAULT_QLEN 64 |
#define | UBT_ISOC_NFRAMES 32 /* should be factor of 8 */ |
#define | UBT_HCI_CMD_SIZE(cmd) ((cmd)->length + offsetof(struct ubt_hci_cmd, data)) |
#define | UBT_HCI_EVENT_SIZE(evt) ((evt)->header.length + offsetof(struct ubt_hci_event, data)) |
#define | UBT_HCI_EVENT_COMPL_HEAD_SIZE |
#define | UBT_STAT_PCKTS_SENT(sc) (sc)->sc_stat.pckts_sent ++ |
#define | UBT_STAT_BYTES_SENT(sc, n) (sc)->sc_stat.bytes_sent += (n) |
#define | UBT_STAT_PCKTS_RECV(sc) (sc)->sc_stat.pckts_recv ++ |
#define | UBT_STAT_BYTES_RECV(sc, n) (sc)->sc_stat.bytes_recv += (n) |
#define | UBT_STAT_OERROR(sc) (sc)->sc_stat.oerrors ++ |
#define | UBT_STAT_IERROR(sc) (sc)->sc_stat.ierrors ++ |
#define | UBT_STAT_RESET(sc) bzero(&(sc)->sc_stat, sizeof((sc)->sc_stat)) |
#define | UBT_CTRL_BUFFER_SIZE |
#define | UBT_INTR_BUFFER_SIZE (MCLBYTES-1) /* reserve 1 byte for ID-tag */ |
#define | UBT_BULK_READ_BUFFER_SIZE (MCLBYTES-1) /* reserve 1 byte for ID-tag */ |
#define | UBT_BULK_WRITE_BUFFER_SIZE (MCLBYTES) |
#define | UBT_FLAG_T_PENDING (1 << 0) /* task pending */ |
#define | UBT_FLAG_T_STOP_ALL (1 << 1) /* stop all xfers */ |
#define | UBT_FLAG_T_START_ALL |
#define | UBT_FLAG_T_START_CTRL (1 << 3) /* start control xfer (write) */ |
#define | UBT_FLAG_T_START_BULK (1 << 4) /* start bulk xfer (write) */ |
Typedefs | |
typedef struct ubt_softc | ubt_softc_t |
typedef struct ubt_softc * | ubt_softc_p |
Enumerations | |
enum | { UBT_IF_0_BULK_DT_WR = 0 , UBT_IF_0_BULK_DT_RD , UBT_IF_0_INTR_DT_RD , UBT_IF_0_CTRL_DT_WR , UBT_IF_1_ISOC_DT_RD1 , UBT_IF_1_ISOC_DT_RD2 , UBT_IF_1_ISOC_DT_WR1 , UBT_IF_1_ISOC_DT_WR2 , UBT_N_TRANSFER } |
Functions | |
struct ubt_hci_cmd | __attribute__ ((packed)) |
usb_error_t | ubt_do_hci_request (struct usb_device *, struct ubt_hci_cmd *, void *, usb_timeout_t) |
Variables | |
uint16_t | opcode |
uint8_t | length |
uint8_t | data [] |
uint8_t | event |
struct ubt_hci_evhdr | header |
uint8_t | numpkt |
struct ubt_softc | __attribute__ |
devclass_t | ubt_devclass |
driver_t | ubt_driver |
#define UBT_ALERT | ( | ... | ) | UBT_DEBUG(NG_UBT_ALERT_LEVEL, __VA_ARGS__) |
Definition at line 47 of file ng_ubt_var.h.
#define UBT_BULK_READ_BUFFER_SIZE (MCLBYTES-1) /* reserve 1 byte for ID-tag */ |
Definition at line 140 of file ng_ubt_var.h.
#define UBT_BULK_WRITE_BUFFER_SIZE (MCLBYTES) |
Definition at line 141 of file ng_ubt_var.h.
#define UBT_CTRL_BUFFER_SIZE |
Definition at line 134 of file ng_ubt_var.h.
#define UBT_DEBUG | ( | level, | |
sc, | |||
fmt, | |||
... | |||
) |
Definition at line 40 of file ng_ubt_var.h.
#define UBT_DEFAULT_QLEN 64 |
Definition at line 57 of file ng_ubt_var.h.
#define UBT_ERR | ( | ... | ) | UBT_DEBUG(NG_UBT_ERR_LEVEL, __VA_ARGS__) |
Definition at line 48 of file ng_ubt_var.h.
#define UBT_FLAG_T_PENDING (1 << 0) /* task pending */ |
Definition at line 153 of file ng_ubt_var.h.
#define UBT_FLAG_T_START_ALL |
Definition at line 155 of file ng_ubt_var.h.
#define UBT_FLAG_T_START_BULK (1 << 4) /* start bulk xfer (write) */ |
Definition at line 157 of file ng_ubt_var.h.
#define UBT_FLAG_T_START_CTRL (1 << 3) /* start control xfer (write) */ |
Definition at line 156 of file ng_ubt_var.h.
#define UBT_FLAG_T_STOP_ALL (1 << 1) /* stop all xfers */ |
Definition at line 154 of file ng_ubt_var.h.
#define UBT_HCI_CMD_SIZE | ( | cmd | ) | ((cmd)->length + offsetof(struct ubt_hci_cmd, data)) |
Definition at line 83 of file ng_ubt_var.h.
#define UBT_HCI_EVENT_COMPL_HEAD_SIZE |
Definition at line 105 of file ng_ubt_var.h.
#define UBT_HCI_EVENT_SIZE | ( | evt | ) | ((evt)->header.length + offsetof(struct ubt_hci_event, data)) |
Definition at line 103 of file ng_ubt_var.h.
#define UBT_HCI_REQUEST 0x20 |
Definition at line 56 of file ng_ubt_var.h.
#define UBT_INFO | ( | ... | ) | UBT_DEBUG(NG_UBT_INFO_LEVEL, __VA_ARGS__) |
Definition at line 50 of file ng_ubt_var.h.
#define UBT_INTR_BUFFER_SIZE (MCLBYTES-1) /* reserve 1 byte for ID-tag */ |
Definition at line 136 of file ng_ubt_var.h.
#define UBT_ISOC_NFRAMES 32 /* should be factor of 8 */ |
Definition at line 58 of file ng_ubt_var.h.
#define UBT_NG_LOCK | ( | sc | ) | mtx_lock(&(sc)->sc_ng_mtx) |
Definition at line 52 of file ng_ubt_var.h.
#define UBT_NG_UNLOCK | ( | sc | ) | mtx_unlock(&(sc)->sc_ng_mtx) |
Definition at line 53 of file ng_ubt_var.h.
#define UBT_STAT_BYTES_RECV | ( | sc, | |
n | |||
) | (sc)->sc_stat.bytes_recv += (n) |
Definition at line 121 of file ng_ubt_var.h.
#define UBT_STAT_BYTES_SENT | ( | sc, | |
n | |||
) | (sc)->sc_stat.bytes_sent += (n) |
Definition at line 119 of file ng_ubt_var.h.
#define UBT_STAT_IERROR | ( | sc | ) | (sc)->sc_stat.ierrors ++ |
Definition at line 123 of file ng_ubt_var.h.
#define UBT_STAT_OERROR | ( | sc | ) | (sc)->sc_stat.oerrors ++ |
Definition at line 122 of file ng_ubt_var.h.
#define UBT_STAT_PCKTS_RECV | ( | sc | ) | (sc)->sc_stat.pckts_recv ++ |
Definition at line 120 of file ng_ubt_var.h.
#define UBT_STAT_PCKTS_SENT | ( | sc | ) | (sc)->sc_stat.pckts_sent ++ |
Definition at line 118 of file ng_ubt_var.h.
#define UBT_STAT_RESET | ( | sc | ) | bzero(&(sc)->sc_stat, sizeof((sc)->sc_stat)) |
Definition at line 124 of file ng_ubt_var.h.
#define UBT_WARN | ( | ... | ) | UBT_DEBUG(NG_UBT_WARN_LEVEL, __VA_ARGS__) |
Definition at line 49 of file ng_ubt_var.h.
typedef struct ubt_softc* ubt_softc_p |
Definition at line 162 of file ng_ubt_var.h.
typedef struct ubt_softc ubt_softc_t |
Definition at line 161 of file ng_ubt_var.h.
anonymous enum |
Enumerator | |
---|---|
UBT_IF_0_BULK_DT_WR | |
UBT_IF_0_BULK_DT_RD | |
UBT_IF_0_INTR_DT_RD | |
UBT_IF_0_CTRL_DT_WR | |
UBT_IF_1_ISOC_DT_RD1 | |
UBT_IF_1_ISOC_DT_RD2 | |
UBT_IF_1_ISOC_DT_WR1 | |
UBT_IF_1_ISOC_DT_WR2 | |
UBT_N_TRANSFER |
Definition at line 61 of file ng_ubt_var.h.
struct ubt_hci_cmd __attribute__ | ( | (packed) | ) |
usb_error_t ubt_do_hci_request | ( | struct usb_device * | udev, |
struct ubt_hci_cmd * | cmd, | ||
void * | evt, | ||
usb_timeout_t | timeout | ||
) |
Definition at line 539 of file ng_ubt.c.
References UBT_HCI_CMD_SIZE, UBT_HCI_REQUEST, UBT_INTR_BUFFER_SIZE, and ubt_probe_intr_callback.
Referenced by ubt_intel_do_hci_request().
uint8_t data |
Definition at line 2 of file ng_ubt_var.h.
Referenced by ng_array_unparse(), ng_bpf_rcvdata(), ng_btsocket_hci_raw_control(), ng_btsocket_l2cap_raw_control(), ng_btsocket_rfcomm_check_fcs(), ng_btsocket_rfcomm_crc(), ng_btsocket_rfcomm_fcs2(), ng_btsocket_rfcomm_fcs3(), ng_btsocket_rfcomm_send_uih(), ng_bytearray_unparse(), ng_ccatm_respond_user(), ng_eiface_ioctl(), ng_enaddr_unparse(), ng_fixedarray_unparse(), ng_fixedstring_unparse(), ng_iface_ioctl(), ng_int16_unparse(), ng_int32_unparse(), ng_int64_unparse(), ng_int8_unparse(), ng_ipaddr_unparse(), ng_ksocket_sockaddr_unparse(), ng_l2cap_l2ca_get_info_rsp(), ng_l2cap_l2ca_ping_rsp(), ng_mod_event(), ng_netflow_flow_show(), ng_pppoe_rcvdata(), ng_sizedstring_unparse(), ng_string_unparse(), ng_struct_unparse(), ng_uni_free(), ng_uni_malloc(), ng_unparse(), ng_unparse_composite(), ngfrm_decode(), ngfrm_rcvdata(), nglmi_checkdata(), nglmi_rcvdata(), send_maxp(), ubt_intel_do_hci_request(), and ubtbcmfw_ioctl().
uint8_t event |
Definition at line 0 of file ng_ubt_var.h.
Referenced by bluetooth_modevent(), con_compl(), con_req(), data_buffer_overflow(), discon_compl(), encryption_change(), hardware_error(), inquiry_result(), le_advertizing_report(), le_connection_complete(), le_connection_update(), le_event(), mode_change(), ng_btsocket_hci_raw_filter(), ng_btsocket_modevent(), ng_ccatm_mod_event(), ng_device_mod_event(), ng_eiface_mod_event(), ng_ether_mod_event(), ng_gif_mod_event(), ng_hci_process_event(), ng_iface_mod_event(), ng_ipfw_mod_event(), ng_mod_event(), ng_sscfu_mod_event(), ng_sscop_mod_event(), ng_uni_mod_event(), ngb_mod_event(), ngs_mod_event(), num_compl_pkts(), page_scan_mode_change(), page_scan_rep_mode_change(), qos_setup_compl(), qos_violation(), read_clock_offset_compl(), read_remote_features_compl(), role_change(), and ubt_modevent().
struct ubt_hci_evhdr header |
Definition at line 0 of file ng_ubt_var.h.
Referenced by export9_send(), export_add(), export_send(), ng_apply_item(), ng_generic_msg(), ng_hci_lp_con_req(), ng_hci_lp_con_rsp(), ng_hci_lp_discon_req(), ng_hci_lp_qos_req(), ng_mppc_compress(), and ng_mppc_decompress().
u_int8_t length |
Definition at line 1 of file ng_ubt_var.h.
Referenced by close_flowset(), get_next_l2cap_opt(), make_packet(), ng_btsocket_rfcomm_crc(), ng_btsocket_rfcomm_pcb_send(), ng_btsocket_rfcomm_prepare_packet(), ng_btsocket_rfcomm_receive_frame(), ng_btsocket_rfcomm_receive_mcc(), ng_btsocket_rfcomm_send_uih(), ng_hci_acl_rcvdata(), ng_hci_raw_rcvdata(), ng_l2cap_con_wakeup(), ng_l2cap_l2ca_clt_receive(), ng_l2cap_l2ca_write_rsp(), ng_l2cap_lp_receive(), ng_pppoe_rcvdata_ether(), ngt_getc_inject(), ngt_rint_bypass(), and ubt_isoc_read_one_frame().
uint8_t numpkt |
Definition at line 1 of file ng_ubt_var.h.
uint16_t opcode |
Definition at line 0 of file ng_ubt_var.h.
Referenced by complete_command(), ng_btsocket_hci_raw_filter(), ng_hci_process_command_timeout(), ng_hci_raw_rcvdata(), and ubt_intel_do_hci_request().