net: dsa: sja1105: don't assign the host port using dsa_upstream_port()
If @port is unused, then dsa_upstream_port(ds, port) returns @port, which means we cannot assume the CPU port can be retrieved this way. The sja1105 switches support a single CPU port, so just iterate over the switch ports and stop at the first CPU port we see. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing
Please register or sign in to comment