• F
    net: dsa: Initialize CPU port ethtool ops per tree · 0c73c523
    Florian Fainelli 提交于
    Now that we can properly support multiple distinct trees in the system,
    using a global variable: dsa_cpu_port_ethtool_ops is getting clobbered
    as soon as the second switch tree gets probed, and we don't want that.
    
    We need to move this to be dynamically allocated, and since we can't
    really be comparing addresses anymore to determine first time
    initialization versus any other times, just move this to dsa.c and
    dsa2.c where the remainder of the dst/ds initialization happens.
    
    The operations teardown restores the master netdev's ethtool_ops to its
    original ethtool_ops pointer (typically within the Ethernet driver)
    Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
    Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    0c73c523
slave.c 29.6 KB