ethtool: add timestamping related string sets
Add three string sets related to timestamping information:
ETH_SS_SOF_TIMESTAMPING: SOF_TIMESTAMPING_* flags
ETH_SS_TS_TX_TYPES: timestamping Tx types
ETH_SS_TS_RX_FILTERS: timestamping Rx filters
These will be used for TIMESTAMP_GET request.
v2: avoid compiler warning ("enumeration value not handled in switch")
in net_hwtstamp_validate()
v3: omit dash in Tx type names ("one-step-*" -> "onestep-*"), suggested by
Richard Cochran
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
6c5bc8fe4e
commit
f76510b458
@@ -190,6 +190,9 @@ static int net_hwtstamp_validate(struct ifreq *ifr)
|
||||
case HWTSTAMP_TX_ONESTEP_P2P:
|
||||
tx_type_valid = 1;
|
||||
break;
|
||||
case __HWTSTAMP_TX_CNT:
|
||||
/* not a real value */
|
||||
break;
|
||||
}
|
||||
|
||||
switch (rx_filter) {
|
||||
@@ -211,6 +214,9 @@ static int net_hwtstamp_validate(struct ifreq *ifr)
|
||||
case HWTSTAMP_FILTER_NTP_ALL:
|
||||
rx_filter_valid = 1;
|
||||
break;
|
||||
case __HWTSTAMP_FILTER_CNT:
|
||||
/* not a real value */
|
||||
break;
|
||||
}
|
||||
|
||||
if (!tx_type_valid || !rx_filter_valid)
|
||||
|
||||
Reference in New Issue
Block a user