# Rules for handling naming the DPAA FMan ethernet ports in a consistent way
SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e0000", NAME="fm1-mac1"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e2000", NAME="fm1-mac2"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e4000", NAME="fm1-mac3"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e6000", NAME="fm1-mac4"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e8000", NAME="fm1-mac5"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4ea000", NAME="fm1-mac6"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4ec000", NAME="fm1-mac7"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4ee000", NAME="fm1-mac8"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4f0000", NAME="fm1-mac9"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4f2000", NAME="fm1-mac10"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e0000", NAME="fm2-mac1"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e2000", NAME="fm2-mac2"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e4000", NAME="fm2-mac3"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e6000", NAME="fm2-mac4"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e8000", NAME="fm2-mac5"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5ea000", NAME="fm2-mac6"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5ec000", NAME="fm2-mac7"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5ee000", NAME="fm2-mac8"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5f0000", NAME="fm2-mac9"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5f2000", NAME="fm2-mac10"

# Unify the PCIe Etherenet port, maxinum PCIe slots is 4
SUBSYSTEM=="net", KERNEL=="eth*", KERNELS=="ffe240000.pcie", DRIVERS=="fsl-pci", NAME="eth0"
SUBSYSTEM=="net", KERNEL=="eth*", KERNELS=="ffe250000.pcie", DRIVERS=="fsl-pci", NAME="eth1"
SUBSYSTEM=="net", KERNEL=="eth*", KERNELS=="ffe260000.pcie", DRIVERS=="fsl-pci", NAME="eth2"
SUBSYSTEM=="net", KERNEL=="eth*", KERNELS=="ffe270000.pcie", DRIVERS=="fsl-pci", NAME="eth3"

# Rename macless0 to "eth4"
SUBSYSTEM=="net", ATTR{device_type}=="macless0", NAME="eth4"
