• Vladimir Oltean's avatar
    net: dsa: sja1105: fix dynamic access to L2 Address Lookup table for SJA1110 · 74e7feff
    Vladimir Oltean authored
    The SJA1105P/Q/R/S and SJA1110 may have the same layout for the command
    to read/write/search for L2 Address Lookup entries, but as explained in
    the comments at the beginning of the sja1105_dynamic_config.c file, the
    command portion of the buffer is at the end, and we need to obtain a
    pointer to it by adding the length of the entry to the buffer.
    
    Alas, the length of an L2 Address Lookup entry is larger in SJA1110 than
    it is for SJA1105P/Q/R/S, so we need to create a common helper to access
    the command buffer, and this receives as argument the length of the
    entry buffer.
    
    Fixes: 3e77e59b ("net: dsa: sja1105: add support for the SJA1110 switch family")
    Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    74e7feff
sja1105_dynamic_config.c 47.5 KB