cfg80211: Provide an API to report NAN function termination
[cascardo/linux.git] / include / uapi / linux / nl80211.h
index 995bf80..56368e9 100644 (file)
  *     the response to this command.
  *     Look at %NL80211_ATTR_SOCKET_OWNER as well.
  * @NL80211_CMD_DEL_NAN_FUNCTION: Delete a NAN function by cookie.
+ *     This command is also used as a notification sent when a NAN function is
+ *     terminated. This will contain a %NL80211_ATTR_NAN_FUNC_INST_ID
+ *     and %NL80211_ATTR_COOKIE attributes.
  * @NL80211_CMD_CHANGE_NAN_CONFIG: Change current NAN configuration. NAN
  *     must be operational (%NL80211_CMD_START_NAN was executed).
  *     It must contain at least one of the following attributes:
@@ -4985,6 +4988,21 @@ enum nl80211_nan_publish_type {
        NL80211_NAN_UNSOLICITED_PUBLISH = 1 << 1,
 };
 
+/**
+ * enum nl80211_nan_func_term_reason - NAN functions termination reason
+ *
+ * Defines termination reasons of a NAN function
+ *
+ * @NL80211_NAN_FUNC_TERM_REASON_USER_REQUEST: requested by user
+ * @NL80211_NAN_FUNC_TERM_REASON_TTL_EXPIRED: timeout
+ * @NL80211_NAN_FUNC_TERM_REASON_ERROR: errored
+ */
+enum nl80211_nan_func_term_reason {
+       NL80211_NAN_FUNC_TERM_REASON_USER_REQUEST,
+       NL80211_NAN_FUNC_TERM_REASON_TTL_EXPIRED,
+       NL80211_NAN_FUNC_TERM_REASON_ERROR,
+};
+
 #define NL80211_NAN_FUNC_SERVICE_ID_LEN 6
 #define NL80211_NAN_FUNC_SERVICE_SPEC_INFO_MAX_LEN 0xff
 #define NL80211_NAN_FUNC_SRF_MAX_LEN 0xff