]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Add CFR stop reason enum and peer attribute for a QCA vendor command
authorPurushottam Kushwaha <pkushwah@qti.qualcomm.com>
Sat, 15 Nov 2025 05:30:41 +0000 (11:00 +0530)
committerJouni Malinen <j@w1.fi>
Tue, 25 Nov 2025 12:22:19 +0000 (14:22 +0200)
Introduce enum qca_wlan_vendor_cfr_stop_reason to standardize reason
codes for CFR collection stops. Add
QCA_WLAN_VENDOR_ATTR_PEER_CFR_STOP_REASON to the peer CFR capture
attributes. Use this attribute to indicate that CFR collection for a
peer has stopped and to carry the corresponding reason code from the new
enum. Apply this attribute for peer CFR events with CFR data format
version 3.

Signed-off-by: Purushottam Kushwaha <pkushwah@qti.qualcomm.com>
src/common/qca-vendor.h

index 863bf2cc45d80b73b63d8f39677b1202bbd94da0..a9fbd831035d9039e187ccdc79eae5141db9a39b 100644 (file)
@@ -12586,6 +12586,54 @@ enum qca_wlan_vendor_chip_id {
        QCA_WLAN_VENDOR_CHIP_ID_WCN8850 = 14,
 };
 
+/**
+ * qca_wlan_vendor_cfr_stop_reason - Reason codes for CFR stop indication used
+ * by attribute QCA_WLAN_VENDOR_ATTR_PEER_CFR_STOP_REASON.
+ *
+ * @QCA_WLAN_VENDOR_CFR_STOP_REASON_UNSPEC: Unspecified or unknown reason.
+ *
+ * @QCA_WLAN_VENDOR_CFR_STOP_REASON_COMPLETED: CFR collection completed
+ * successfully as planned.
+ *
+ * @QCA_WLAN_VENDOR_CFR_STOP_REASON_USER_ABORTED: CFR collection stopped
+ * explicitly upon userspace abort/stop request.
+ *
+ * @QCA_WLAN_VENDOR_CFR_STOP_REASON_PEER_UNAVAILABLE: Peer disconnected or
+ * unavailable.
+ *
+ * @QCA_WLAN_VENDOR_CFR_STOP_REASON_CONCURRENCY: Stopped to accommodate a
+ * higher-priority concurrency operation.
+ *
+ * @QCA_WLAN_VENDOR_CFR_STOP_REASON_ROAMING: Stopped due to roaming activity.
+ *
+ * @QCA_WLAN_VENDOR_CFR_STOP_REASON_FW_ERROR: Stopped because of a firmware or
+ * internal error.
+ *
+ * @QCA_WLAN_VENDOR_CFR_STOP_REASON_CHANNEL_SWITCHED: Channel changed (CSA).
+ *
+ * @QCA_WLAN_VENDOR_CFR_STOP_REASON_LINK_SWITCHED: Stopped due to MLO link
+ * switch.
+ *
+ * @QCA_WLAN_VENDOR_CFR_STOP_REASON_LINK_RECONFIG: Stopped due to MLO link
+ * reconfiguration.
+ *
+ * @QCA_WLAN_VENDOR_CFR_STOP_REASON_RECOVERY: Stopped as part of driver
+ * recovery, restart, or assert handling.
+ */
+enum qca_wlan_vendor_cfr_stop_reason {
+    QCA_WLAN_VENDOR_CFR_STOP_REASON_UNSPEC = 0,
+    QCA_WLAN_VENDOR_CFR_STOP_REASON_COMPLETED = 1,
+    QCA_WLAN_VENDOR_CFR_STOP_REASON_USER_ABORTED = 2,
+    QCA_WLAN_VENDOR_CFR_STOP_REASON_PEER_UNAVAILABLE = 3,
+    QCA_WLAN_VENDOR_CFR_STOP_REASON_CONCURRENCY = 4,
+    QCA_WLAN_VENDOR_CFR_STOP_REASON_ROAMING = 5,
+    QCA_WLAN_VENDOR_CFR_STOP_REASON_FW_ERROR = 6,
+    QCA_WLAN_VENDOR_CFR_STOP_REASON_CHANNEL_SWITCHED = 7,
+    QCA_WLAN_VENDOR_CFR_STOP_REASON_LINK_SWITCHED = 8,
+    QCA_WLAN_VENDOR_CFR_STOP_REASON_LINK_RECONFIG = 9,
+    QCA_WLAN_VENDOR_CFR_STOP_REASON_RECOVERY = 10,
+};
+
 /**
  * enum qca_wlan_vendor_peer_cfr_capture_attr - Used by the vendor command
  * QCA_NL80211_VENDOR_SUBCMD_PEER_CFR_CAPTURE_CFG to configure peer
@@ -12856,6 +12904,12 @@ enum qca_wlan_vendor_chip_id {
  * @QCA_WLAN_VENDOR_ATTR_PEER_CFR_CSI_NUM_SPATIAL_STREAMS: Optional (u8)
  * Number of spatial streams used to capture the CFR data.
  * Applicable for peer CFR event with CFR data format version 3.
+ *
+ * @QCA_WLAN_VENDOR_ATTR_PEER_CFR_STOP_REASON: Optional (u32)
+ * This attribute signifies that CFR collection for a peer has been stopped
+ * and provides the corresponding reason code. The reason codes are defined
+ * in enum qca_wlan_vendor_cfr_stop_reason.
+ * Applicable for peer CFR events when CFR data format version is 3.
  */
 enum qca_wlan_vendor_peer_cfr_capture_attr {
        QCA_WLAN_VENDOR_ATTR_PEER_CFR_CAPTURE_INVALID = 0,
@@ -12906,6 +12960,7 @@ enum qca_wlan_vendor_peer_cfr_capture_attr {
        QCA_WLAN_VENDOR_ATTR_PEER_CFR_CFO = 45,
        QCA_WLAN_VENDOR_ATTR_PEER_CFR_CSI_LTF_TYPE = 46,
        QCA_WLAN_VENDOR_ATTR_PEER_CFR_NUM_SPATIAL_STREAMS = 47,
+       QCA_WLAN_VENDOR_ATTR_PEER_CFR_STOP_REASON = 48,
 
        /* Keep last */
        QCA_WLAN_VENDOR_ATTR_PEER_CFR_AFTER_LAST,