mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
dsa: do not support ndo_get_phys_port_name for non-legacy ports
Since each non-legacy slave has its own devlink port instance correctly set, rely on devlink core to generate correct phys port name. Signed-off-by: Jiri Pirko <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
716efee200
commit
d484210bf7
1 changed files with 7 additions and 0 deletions
|
|
@ -736,6 +736,13 @@ static int dsa_slave_get_phys_port_name(struct net_device *dev,
|
|||
{
|
||||
struct dsa_port *dp = dsa_slave_to_port(dev);
|
||||
|
||||
/* For non-legacy ports, devlink is used and it takes
|
||||
* care of the name generation. This ndo implementation
|
||||
* should be removed with legacy support.
|
||||
*/
|
||||
if (dp->ds->devlink)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (snprintf(name, len, "p%d", dp->index) >= len)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue