• Marcin Wojtas's avatar
    net: mvpp2: simplify maintaining enabled ports' list · bf147153
    Marcin Wojtas authored
    'port_count' field of the mvpp2 structure holds an overall amount
    of available ports, based on DT nodes status. In order to be prepared
    to support other HW description, obtain the value by incrementing it
    upon each successful port initialization. This allowed for simplifying
    port indexing in the controller's private array, whose size is now not
    dynamically allocated, but fixed to MVPP2_MAX_PORTS.
    
    This patch simplifies creating and filling list of enabled ports and
    is a part of the preparation for adding ACPI support in the mvpp2 driver.
    Signed-off-by: default avatarMarcin Wojtas <mw@semihalf.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    bf147153
mvpp2.c 234 KB