• Ioana Ciornei's avatar
    dpaa2-mac: export MAC counters even when in TYPE_FIXED · d87e6063
    Ioana Ciornei authored
    If the network interface object is connected to a MAC of TYPE_FIXED, the
    link status management is handled exclusively by the firmware. This does
    not mean that the driver cannot access the MAC counters and export them
    in ethtool.
    
    For this to happen, we open the attached dpmac device and keep a pointer
    to it in priv->mac. Because of this, all the checks in the driver of the
    following form 'if (priv->mac)' have to be updated to actually check
    the dpmac attribute and not rely on the presence of a non-NULL value.
    Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    d87e6063
dpaa2-eth.c 115 KB