Skip to content

Commit ab178b0

Browse files
jpirkodavem330
authored andcommitted
bnxt: remove ndo_get_phys_port_name implementation
Rely on the previously introduced fallback and let the core call devlink in order to get the physical port name. Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent c9c49a6 commit ab178b0

File tree

1 file changed

+0
-18
lines changed
  • drivers/net/ethernet/broadcom/bnxt

1 file changed

+0
-18
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10048,23 +10048,6 @@ static int bnxt_bridge_setlink(struct net_device *dev, struct nlmsghdr *nlh,
1004810048
return rc;
1004910049
}
1005010050

10051-
static int bnxt_get_phys_port_name(struct net_device *dev, char *buf,
10052-
size_t len)
10053-
{
10054-
struct bnxt *bp = netdev_priv(dev);
10055-
int rc;
10056-
10057-
/* The PF and it's VF-reps only support the switchdev framework */
10058-
if (!BNXT_PF(bp))
10059-
return -EOPNOTSUPP;
10060-
10061-
rc = snprintf(buf, len, "p%d", bp->pf.port_id);
10062-
10063-
if (rc >= len)
10064-
return -EOPNOTSUPP;
10065-
return 0;
10066-
}
10067-
1006810051
int bnxt_get_port_parent_id(struct net_device *dev,
1006910052
struct netdev_phys_item_id *ppid)
1007010053
{
@@ -10122,7 +10105,6 @@ static const struct net_device_ops bnxt_netdev_ops = {
1012210105
.ndo_bridge_getlink = bnxt_bridge_getlink,
1012310106
.ndo_bridge_setlink = bnxt_bridge_setlink,
1012410107
.ndo_get_port_parent_id = bnxt_get_port_parent_id,
10125-
.ndo_get_phys_port_name = bnxt_get_phys_port_name,
1012610108
.ndo_get_devlink_port = bnxt_get_devlink_port,
1012710109
};
1012810110

0 commit comments

Comments
 (0)