drivers/net/ethernet/wangxun/libwx/wx_type.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/wangxun/libwx/wx_type.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/wangxun/libwx/wx_type.h- Extension
.h- Size
- 48688 bytes
- Lines
- 1528
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/ptp_clock_kernel.hlinux/timecounter.hlinux/bitfield.hlinux/netdevice.hlinux/if_vlan.hlinux/phylink.hlinux/dim.hnet/ip.h
Detected Declarations
struct wx_dec_ptypestruct wx_hic_hdrstruct wx_hic_hdr2_reqstruct wx_hic_hdr2_rspstruct wx_hic_read_shadow_ramstruct wx_hic_resetstruct wx_hic_set_ppsstruct wx_bus_infostruct wx_mbx_infostruct wx_thermal_sensor_datastruct wx_mac_infostruct wx_eeprom_infostruct wx_addr_filter_infostruct wx_mac_addrstruct wx_cbstruct wx_tx_context_descstruct wx_tx_bufferstruct wx_rx_bufferstruct wx_queue_statsstruct wx_tx_queue_statsstruct wx_rx_queue_statsstruct wx_ring_containerstruct wx_ringstruct wx_q_vectorstruct wx_ring_featurestruct wx_fc_infostruct wx_hw_statsstruct wx_last_statsstruct vf_data_storagestruct vf_macvlansstruct wx_rss_flow_mapstruct wxenum WX_MSCA_CMD_valueenum wx_l2_ptypesenum wx_tx_flagsenum wx_dec_ptype_macenum wx_dec_ptype_ipenum wx_dec_ptype_etypeenum wx_dec_ptype_protenum wx_dec_ptype_layerenum wx_mac_typeenum wx_media_typeenum em_mac_typeenum wx_eeprom_typeenum wx_reset_typeenum wx_ring_f_enumenum wx_isb_idxenum wx_fc_mode
Annotated Snippet
struct wx_dec_ptype {
u32 known:1;
u32 mac:2; /* outer mac */
u32 ip:3; /* outer ip*/
u32 etype:3; /* encaped type */
u32 eip:3; /* encaped ip */
u32 prot:4; /* payload proto */
u32 layer:3; /* payload layer */
};
/* macro to make the table lines short */
#define WX_PTT(mac, ip, etype, eip, proto, layer)\
{1, \
WX_DEC_PTYPE_MAC_##mac, /* mac */\
WX_DEC_PTYPE_IP_##ip, /* ip */ \
WX_DEC_PTYPE_ETYPE_##etype, /* etype */\
WX_DEC_PTYPE_IP_##eip, /* eip */\
WX_DEC_PTYPE_PROT_##proto, /* proto */\
WX_DEC_PTYPE_LAYER_##layer /* layer */}
/* Host Interface Command Structures */
struct wx_hic_hdr {
u8 cmd;
u8 buf_len;
union {
u8 cmd_resv;
u8 ret_status;
} cmd_or_resp;
union {
u8 checksum;
u8 index;
};
};
struct wx_hic_hdr2_req {
u8 cmd;
u8 buf_lenh;
u8 buf_lenl;
union {
u8 checksum;
u8 index;
};
};
struct wx_hic_hdr2_rsp {
u8 cmd;
u8 buf_lenl;
u8 buf_lenh_status; /* 7-5: high bits of buf_len, 4-0: status */
union {
u8 checksum;
u8 index;
};
};
union wx_hic_hdr2 {
struct wx_hic_hdr2_req req;
struct wx_hic_hdr2_rsp rsp;
};
/* These need to be dword aligned */
struct wx_hic_read_shadow_ram {
union wx_hic_hdr2 hdr;
u32 address;
u16 length;
u16 pad2;
u16 data;
u16 pad3;
};
struct wx_hic_reset {
struct wx_hic_hdr hdr;
u16 lan_id;
u16 reset_type;
};
struct wx_hic_set_pps {
struct wx_hic_hdr hdr;
u8 lan_id;
u8 enable;
u16 pad2;
u64 nsec;
u64 cycles;
};
/* Bus parameters */
struct wx_bus_info {
u8 func;
u16 device;
};
Annotation
- Immediate include surface: `linux/ptp_clock_kernel.h`, `linux/timecounter.h`, `linux/bitfield.h`, `linux/netdevice.h`, `linux/if_vlan.h`, `linux/phylink.h`, `linux/dim.h`, `net/ip.h`.
- Detected declarations: `struct wx_dec_ptype`, `struct wx_hic_hdr`, `struct wx_hic_hdr2_req`, `struct wx_hic_hdr2_rsp`, `struct wx_hic_read_shadow_ram`, `struct wx_hic_reset`, `struct wx_hic_set_pps`, `struct wx_bus_info`, `struct wx_mbx_info`, `struct wx_thermal_sensor_data`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.