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,
1659
1659
stats -> tx_dropped = ndev -> stats .tx_dropped ;
1660
1660
}
1661
1661
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
+
1662
1675
static const struct net_device_ops emac_netdev_ops = {
1663
1676
.ndo_open = emac_ndo_open ,
1664
1677
.ndo_stop = emac_ndo_stop ,
@@ -1669,6 +1682,7 @@ static const struct net_device_ops emac_netdev_ops = {
1669
1682
.ndo_set_rx_mode = emac_ndo_set_rx_mode ,
1670
1683
.ndo_eth_ioctl = emac_ndo_ioctl ,
1671
1684
.ndo_get_stats64 = emac_ndo_get_stats64 ,
1685
+ .ndo_get_phys_port_name = emac_ndo_get_phys_port_name ,
1672
1686
};
1673
1687
1674
1688
/* get emac_port corresponding to eth_node name */
You can’t perform that action at this time.
0 commit comments