Skip to content

Commit 091fab1

Browse files
kmaincentdavem330
authored andcommitted
net: ethtool: ts: Update GET_TS to reply the current selected timestamp
As the default selected timestamp API change we have to change also the timestamp return by ethtool. This patch return now the current selected timestamp. Signed-off-by: Kory Maincent <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 0f7f463 commit 091fab1

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

net/ethtool/ts.c

+1-17
Original file line numberDiff line numberDiff line change
@@ -31,29 +31,13 @@ static int ts_prepare_data(const struct ethnl_req_info *req_base,
3131
{
3232
struct ts_reply_data *data = TS_REPDATA(reply_base);
3333
struct net_device *dev = reply_base->dev;
34-
const struct ethtool_ops *ops = dev->ethtool_ops;
3534
int ret;
3635

3736
ret = ethnl_ops_begin(dev);
3837
if (ret < 0)
3938
return ret;
4039

41-
if (phy_has_tsinfo(dev->phydev)) {
42-
data->ts_layer = PHY_TIMESTAMPING;
43-
} else if (ops->get_ts_info) {
44-
struct ethtool_ts_info ts_info = {0};
45-
46-
ops->get_ts_info(dev, &ts_info);
47-
if (ts_info.so_timestamping &
48-
SOF_TIMESTAMPING_HARDWARE_MASK)
49-
data->ts_layer = MAC_TIMESTAMPING;
50-
51-
if (ts_info.so_timestamping &
52-
SOF_TIMESTAMPING_SOFTWARE_MASK)
53-
data->ts_layer = SOFTWARE_TIMESTAMPING;
54-
} else {
55-
data->ts_layer = NO_TIMESTAMPING;
56-
}
40+
data->ts_layer = dev->ts_layer;
5741

5842
ethnl_ops_complete(dev);
5943

0 commit comments

Comments
 (0)