mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
nvethernet: add SIOCGHWTSTAMP support
issue: facing an unsupported ioctl error while launching the ptp4l, since get timestamp configuration support is not there. fix: add get timestamp configuration ioctl support Bug 5274698 Bug 5287071 Signed-off-by: Narayan Reddy <narayanr@nvidia.com> Change-Id: I9254b041d4d3b9dc2cddebc14dc6100ed1b76807 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3366858 Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com> Reviewed-by: Bhadram Varka <vbhadram@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
This commit is contained in:
committed by
Jon Hunter
parent
25d24fca15
commit
38227b2177
@@ -4369,6 +4369,7 @@ int ether_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
||||
int ret = -EOPNOTSUPP;
|
||||
struct ether_priv_data *pdata;
|
||||
struct mii_ioctl_data *mii_data;
|
||||
struct hwtstamp_config *config;
|
||||
|
||||
if (!dev || !rq) {
|
||||
pr_err("%s: Invalid arg\n", __func__);
|
||||
@@ -4452,7 +4453,10 @@ int ether_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
||||
case SIOCSHWTSTAMP:
|
||||
ret = ether_handle_hwtstamp_ioctl(pdata, rq);
|
||||
break;
|
||||
|
||||
case SIOCGHWTSTAMP:
|
||||
config = &pdata->ptp_config;
|
||||
ret = copy_to_user(rq->ifr_data, config, sizeof(*config)) ? -EFAULT : 0;
|
||||
break;
|
||||
default:
|
||||
netdev_err(dev, "%s: Unsupported ioctl %d\n",
|
||||
__func__, cmd);
|
||||
|
||||
Reference in New Issue
Block a user