File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
drivers/net/ethernet/ti/icssg Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -1659,6 +1659,19 @@ static void emac_ndo_get_stats64(struct net_device *ndev,
16591659 stats -> tx_dropped = ndev -> stats .tx_dropped ;
16601660}
16611661
1662+ static int emac_ndo_get_phys_port_name (struct net_device * ndev , char * name ,
1663+ size_t len )
1664+ {
1665+ struct prueth_emac * emac = netdev_priv (ndev );
1666+ int ret ;
1667+
1668+ ret = snprintf (name , len , "p%d" , emac -> port_id );
1669+ if (ret >= len )
1670+ return - EINVAL ;
1671+
1672+ return 0 ;
1673+ }
1674+
16621675static const struct net_device_ops emac_netdev_ops = {
16631676 .ndo_open = emac_ndo_open ,
16641677 .ndo_stop = emac_ndo_stop ,
@@ -1669,6 +1682,7 @@ static const struct net_device_ops emac_netdev_ops = {
16691682 .ndo_set_rx_mode = emac_ndo_set_rx_mode ,
16701683 .ndo_eth_ioctl = emac_ndo_ioctl ,
16711684 .ndo_get_stats64 = emac_ndo_get_stats64 ,
1685+ .ndo_get_phys_port_name = emac_ndo_get_phys_port_name ,
16721686};
16731687
16741688/* get emac_port corresponding to eth_node name */
You can’t perform that action at this time.
0 commit comments