summaryrefslogtreecommitdiff
path: root/net/wireless/rdev-ops.h
diff options
context:
space:
mode:
authorAvraham Stern <avraham.stern@intel.com>2023-03-01 13:09:21 +0300
committerJohannes Berg <johannes.berg@intel.com>2023-03-07 12:52:00 +0300
commitcbbaf2bb829b6c4ef911d4a725fc9b1fadc1e43f (patch)
tree27d787f133fcc76500dee77e11dabadec908f0fd /net/wireless/rdev-ops.h
parent6ff9efcfc2dc256480b252321818e0111b9399a2 (diff)
downloadlinux-cbbaf2bb829b6c4ef911d4a725fc9b1fadc1e43f.tar.xz
wifi: nl80211: add a command to enable/disable HW timestamping
Add a command to enable and disable HW timestamping of TM and FTM frames. HW timestamping can be enabled for a specific mac address or for all addresses. The low level driver will indicate how many peers HW timestamping can be enabled concurrently, and this information will be passed to userspace. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230301115906.05678d7b1c17.Iccc08869ea8156f1c71a3111a47f86dd56234bd0@changeid [switch to needing netdev UP, minor edits] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/rdev-ops.h')
-rw-r--r--net/wireless/rdev-ops.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/net/wireless/rdev-ops.h b/net/wireless/rdev-ops.h
index 13b209a8db28..2e497cf26ef2 100644
--- a/net/wireless/rdev-ops.h
+++ b/net/wireless/rdev-ops.h
@@ -1494,4 +1494,21 @@ rdev_del_link_station(struct cfg80211_registered_device *rdev,
return ret;
}
+static inline int
+rdev_set_hw_timestamp(struct cfg80211_registered_device *rdev,
+ struct net_device *dev,
+ struct cfg80211_set_hw_timestamp *hwts)
+{
+ struct wiphy *wiphy = &rdev->wiphy;
+ int ret;
+
+ if (!rdev->ops->set_hw_timestamp)
+ return -EOPNOTSUPP;
+
+ trace_rdev_set_hw_timestamp(wiphy, dev, hwts);
+ ret = rdev->ops->set_hw_timestamp(wiphy, dev, hwts);
+ trace_rdev_return_int(wiphy, ret);
+
+ return ret;
+}
#endif /* __CFG80211_RDEV_OPS */