• Vivien Didelot's avatar
    net: dsa: mv88e6xxx: rework ATU GetNext · dabc1a96
    Vivien Didelot authored
    Add and use a fresh documented implementation of the ATU GetNext.
    
    Since it is not necessary to write the MAC address to iterate from, only
    do it once directly in the ATU GetNext operation, if the provided ATU
    entry structure is not valid. This makes the user code simpler.
    
    Also, there is no need to loop when getting a single ATU entry. So
    remove the mv88e6xxx_atu_get helper and add a simpler snippet in
    mv88e6xxx_port_db_load_purge to lookup a given MAC address.
    
    The _mv88e6xxx_atu_mac_{read,write} are not used anymore thus remove
    them. _mv88e6xxx_atu_data_{read,write} are still used so keep them.
    Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    dabc1a96
global1_atu.c 5.26 KB