net: gptp: Return proper port number for given interface
The port number is stored starting from 0 in Ethernet context. But in gPTP, it is an index which starts from 1. So increase the value by 1 for a value returned from Ethernet context. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
parent
37fb035588
commit
2675a11766
1 changed files with 1 additions and 1 deletions
|
@ -39,7 +39,7 @@ struct gptp_domain gptp_domain;
|
|||
|
||||
int gptp_get_port_number(struct net_if *iface)
|
||||
{
|
||||
int port = net_eth_get_ptp_port(iface);
|
||||
int port = net_eth_get_ptp_port(iface) + 1;
|
||||
|
||||
if (port >= GPTP_PORT_START && port < GPTP_PORT_END) {
|
||||
return port;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue