History

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.

Avraham Stern committed 3 years ago

Commit cbbaf2b1 parent 6ff9efc5 files · +128 −0Browse files

Showing the changes to include/uapi (1 of 5 files). Show all

Unified · Split

include/uapi/linux/nl80211.h+22−0
@@ -1299,6 +1299,16 @@ · 1298 unmodified lines
12991299 * @NL80211_CMD_MODIFY_LINK_STA: Modify a link of an MLD station
13001300 * @NL80211_CMD_REMOVE_LINK_STA: Remove a link of an MLD station
13011301 *
1302+ * @NL80211_CMD_SET_HW_TIMESTAMP: Enable/disable HW timestamping of Timing
1303+ * measurement and Fine timing measurement frames. If %NL80211_ATTR_MAC
1304+ * is included, enable/disable HW timestamping only for frames to/from the
1305+ * specified MAC address. Otherwise enable/disable HW timestamping for
1306+ * all TM/FTM frames (including ones that were enabled with specific MAC
1307+ * address). If %NL80211_ATTR_HW_TIMESTAMP_ENABLED is not included, disable
1308+ * HW timestamping.
1309+ * The number of peers that HW timestamping can be enabled for concurrently
1310+ * is indicated by %NL80211_ATTR_MAX_HW_TIMESTAMP_PEERS.
1311+ *
13021312 * @NL80211_CMD_MAX: highest used command number
13031313 * @__NL80211_CMD_AFTER_LAST: internal use
13041314 */
@@ -1550,6 +1560,8 @@ enum nl80211_commands { · 245 unmodified lines
15501560 NL80211_CMD_MODIFY_LINK_STA,
15511561 NL80211_CMD_REMOVE_LINK_STA,
15521562
1563+ NL80211_CMD_SET_HW_TIMESTAMP,
1564+
15531565 /* add new commands above here */
15541566
15551567 /* used to define NL80211_CMD_MAX below */
@@ -2775,6 +2787,13 @@ enum nl80211_commands { · 1219 unmodified lines
27752787 * indicates that the sub-channel is punctured. Higher 16 bits are
27762788 * reserved.
27772789 *
2790+ * @NL80211_ATTR_MAX_HW_TIMESTAMP_PEERS: Maximum number of peers that HW
2791+ * timestamping can be enabled for concurrently (u16), a wiphy attribute.
2792+ * A value of 0xffff indicates setting for all peers (i.e. not specifying
2793+ * an address with %NL80211_CMD_SET_HW_TIMESTAMP) is supported.
2794+ * @NL80211_ATTR_HW_TIMESTAMP_ENABLED: Indicates whether HW timestamping should
2795+ * be enabled or not (flag attribute).
2796+ *
27782797 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
27792798 * @NL80211_ATTR_MAX: highest attribute number currently defined
27802799 * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -3306,6 +3325,9 @@ enum nl80211_attrs { · 525 unmodified lines
33063325
33073326 NL80211_ATTR_PUNCT_BITMAP,
33083327
3328+ NL80211_ATTR_MAX_HW_TIMESTAMP_PEERS,
3329+ NL80211_ATTR_HW_TIMESTAMP_ENABLED,
3330+
33093331 /* add attributes here, update the policy in nl80211.c */
33103332
33113333 __NL80211_ATTR_AFTER_LAST,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t