Add link state for link layer stats

Bug: 263029630
Test: m android.hardware.wifi-update-api
Change-Id: Ia9a1782200136cd0f58a66e7d2de700d8a75fcae
diff --git a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/StaLinkLayerLinkStats.aidl b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/StaLinkLayerLinkStats.aidl
index 2bc3254..cd21c25 100644
--- a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/StaLinkLayerLinkStats.aidl
+++ b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/StaLinkLayerLinkStats.aidl
@@ -49,4 +49,11 @@
   android.hardware.wifi.StaLinkLayerIfaceContentionTimeStats wmeViContentionTimeStats;
   android.hardware.wifi.StaLinkLayerIfaceContentionTimeStats wmeVoContentionTimeStats;
   android.hardware.wifi.StaPeerInfo[] peers;
+  android.hardware.wifi.StaLinkLayerLinkStats.StaLinkState state;
+  @Backing(type="int") @VintfStability
+  enum StaLinkState {
+    UNKNOWN = 0,
+    NOT_IN_USE = (1 << 0) /* 1 */,
+    IN_USE = (1 << 1) /* 2 */,
+  }
 }
diff --git a/wifi/aidl/android/hardware/wifi/StaLinkLayerLinkStats.aidl b/wifi/aidl/android/hardware/wifi/StaLinkLayerLinkStats.aidl
index d8d7975..2519543 100644
--- a/wifi/aidl/android/hardware/wifi/StaLinkLayerLinkStats.aidl
+++ b/wifi/aidl/android/hardware/wifi/StaLinkLayerLinkStats.aidl
@@ -95,4 +95,33 @@
      * Per peer statistics for the link.
      */
     StaPeerInfo[] peers;
+    /**
+     * Various states of the link.
+     */
+    @Backing(type="int")
+    @VintfStability
+    enum StaLinkState {
+        /**
+         * Chip does not support reporting the state of the link.
+         */
+        UNKNOWN = 0,
+        /**
+         * Link has not been in use since last report. It is placed in power save. All management,
+         * control and data frames for the MLO connection are carried over other links. In this
+         * state the link will not listen to beacons even in DTIM period and does not perform any
+         * GTK/IGTK/BIGTK updates but remains associated.
+         */
+        NOT_IN_USE = 1 << 0,
+        /**
+         * Link is in use. In presence of traffic, it is set to be power active. When the traffic
+         * stops, the link will go into power save mode and will listen for beacons every DTIM
+         * period.
+         *
+         */
+        IN_USE = 1 << 1,
+    }
+    /**
+     * State of the link. Refer |StaLinkState|.
+     */
+    StaLinkState state;
 }