drivers/net/dsa/mxl862xx/mxl862xx-api.h
Source file repositories/reference/linux-study-clean/drivers/net/dsa/mxl862xx/mxl862xx-api.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/dsa/mxl862xx/mxl862xx-api.h- Extension
.h- Size
- 62378 bytes
- Lines
- 1585
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bits.hlinux/if_ether.h
Detected Declarations
struct mdio_relay_datastruct mxl862xx_register_modstruct mxl862xx_mac_table_addstruct mxl862xx_mac_table_removestruct mxl862xx_mac_table_readstruct mxl862xx_mac_table_querystruct mxl862xx_mac_table_clearstruct mxl862xx_bridge_allocstruct mxl862xx_qos_meter_cfgstruct mxl862xx_bridge_configstruct mxl862xx_bridge_port_allocstruct mxl862xx_pmapperstruct mxl862xx_bridge_port_configstruct mxl862xx_cfgstruct mxl862xx_extendedvlan_filter_vlanstruct mxl862xx_extendedvlan_filterstruct mxl862xx_extendedvlan_treatment_vlanstruct mxl862xx_extendedvlan_treatmentstruct mxl862xx_extendedvlan_allocstruct mxl862xx_extendedvlan_configstruct mxl862xx_vlanfilter_allocstruct mxl862xx_vlanfilter_configstruct mxl862xx_ss_sp_tagstruct mxl862xx_ctp_port_assignmentstruct mxl862xx_stp_port_cfgstruct mxl862xx_sys_fw_image_versionstruct mxl862xx_rmon_port_cntstruct mxl862xx_xpcs_pcs_cfgstruct mxl862xx_xpcs_pcs_statestruct mxl862xx_xpcs_pcs_disablestruct mxl862xx_xpcs_an_restartstruct mxl862xx_xpcs_pcs_link_upenum mxl862xx_mac_table_filterenum mxl862xx_mac_clear_typeenum mxl862xx_age_timerenum mxl862xx_bridge_config_maskenum mxl862xx_bridge_port_egress_meterenum mxl862xx_bridge_forward_modeenum mxl862xx_bridge_port_config_maskenum mxl862xx_color_marking_modeenum mxl862xx_color_remarking_modeenum mxl862xx_pmapper_mapping_modeenum mxl862xx_extended_vlan_filter_typeenum mxl862xx_extended_vlan_filter_tpidenum mxl862xx_extended_vlan_filter_deienum mxl862xx_extended_vlan_treatment_remove_tagenum mxl862xx_extended_vlan_treatment_priorityenum mxl862xx_extended_vlan_treatment_vid
Annotated Snippet
struct mdio_relay_data {
__le16 data;
u8 phy;
u8 mmd;
__le16 reg;
} __packed;
/**
* struct mxl862xx_register_mod - Register access parameter to directly
* modify internal registers
* @addr: Register address offset for modification
* @data: Value to write to the register address
* @mask: Mask of bits to be modified (1 to modify, 0 to ignore)
*
* Used for direct register modification operations.
*/
struct mxl862xx_register_mod {
__le16 addr;
__le16 data;
__le16 mask;
} __packed;
/**
* enum mxl862xx_mac_table_filter - Source/Destination MAC address filtering
*
* @MXL862XX_MAC_FILTER_NONE: no filter
* @MXL862XX_MAC_FILTER_SRC: source address filter
* @MXL862XX_MAC_FILTER_DEST: destination address filter
* @MXL862XX_MAC_FILTER_BOTH: both source and destination filter
*/
enum mxl862xx_mac_table_filter {
MXL862XX_MAC_FILTER_NONE = 0,
MXL862XX_MAC_FILTER_SRC = BIT(0),
MXL862XX_MAC_FILTER_DEST = BIT(1),
MXL862XX_MAC_FILTER_BOTH = BIT(0) | BIT(1),
};
#define MXL862XX_TCI_VLAN_ID GENMASK(11, 0)
#define MXL862XX_TCI_VLAN_CFI_DEI BIT(12)
#define MXL862XX_TCI_VLAN_PRI GENMASK(15, 13)
/* Set in port_id to use port_map[] as a portmap bitmap instead of a single
* port ID. When clear, port_id selects one port; when set, the firmware
* ignores the lower bits of port_id and writes port_map[] directly into
* the PCE bridge port map.
*/
#define MXL862XX_PORTMAP_FLAG BIT(31)
/**
* struct mxl862xx_mac_table_add - MAC Table Entry to be added
* @fid: Filtering Identifier (FID) (not supported by all switches)
* @port_id: Ethernet Port number
* @port_map: Bridge Port Map
* @sub_if_id: Sub-Interface Identifier Destination
* @age_timer: Aging Time in seconds
* @vlan_id: STAG VLAN Id
* @static_entry: Static Entry (value will be aged out if not set to static)
* @traffic_class: Egress queue traffic class
* @mac: MAC Address to add to the table
* @filter_flag: See &enum mxl862xx_mac_table_filter
* @igmp_controlled: Packet is marked as IGMP controlled if destination MAC
* address matches MAC in this entry
* @associated_mac: Associated Mac address
* @tci: TCI for B-Step
* Bit [0:11] - VLAN ID
* Bit [12] - VLAN CFI/DEI
* Bit [13:15] - VLAN PRI
*/
struct mxl862xx_mac_table_add {
__le16 fid;
__le32 port_id;
__le16 port_map[8];
__le16 sub_if_id;
__le32 age_timer;
__le16 vlan_id;
u8 static_entry;
u8 traffic_class;
u8 mac[ETH_ALEN];
u8 filter_flag;
u8 igmp_controlled;
u8 associated_mac[ETH_ALEN];
__le16 tci;
} __packed;
/**
* struct mxl862xx_mac_table_remove - MAC Table Entry to be removed
* @fid: Filtering Identifier (FID)
* @mac: MAC Address to be removed from the table.
* @filter_flag: See &enum mxl862xx_mac_table_filter
* @tci: TCI for B-Step
Annotation
- Immediate include surface: `linux/bits.h`, `linux/if_ether.h`.
- Detected declarations: `struct mdio_relay_data`, `struct mxl862xx_register_mod`, `struct mxl862xx_mac_table_add`, `struct mxl862xx_mac_table_remove`, `struct mxl862xx_mac_table_read`, `struct mxl862xx_mac_table_query`, `struct mxl862xx_mac_table_clear`, `struct mxl862xx_bridge_alloc`, `struct mxl862xx_qos_meter_cfg`, `struct mxl862xx_bridge_config`.
- Atlas domain: Driver Families / drivers/net.
- 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.