Add disconnect reason to hostapd
Report the reason a client disconnected as part of the
onConnectedClientsChanged callback.
Bug: 361651437
Test: VtsHalHostapdTargetTest
Test: VtsHalWifiSupplicantStaIfaceTargetTest
Test: VtsHalWifiSupplicantStaNetworkTargetTest
Test: VtsHalWifiSupplicantP2pIfaceTargetTest
Change-Id: I93db0f5d379a598d64def9b807c9de666fb3eb0a
diff --git a/wifi/hostapd/aidl/Android.bp b/wifi/hostapd/aidl/Android.bp
index 88f4ef2..e580573 100644
--- a/wifi/hostapd/aidl/Android.bp
+++ b/wifi/hostapd/aidl/Android.bp
@@ -29,7 +29,7 @@
"android/hardware/wifi/hostapd/*.aidl",
],
imports: [
- "android.hardware.wifi.common-V1",
+ "android.hardware.wifi.common-V2",
],
stability: "vintf",
backend: {
diff --git a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/ClientInfo.aidl b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/ClientInfo.aidl
index c4d62b6..c4db789 100644
--- a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/ClientInfo.aidl
+++ b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/ClientInfo.aidl
@@ -38,4 +38,5 @@
String apIfaceInstance;
byte[] clientAddress;
boolean isConnected;
+ android.hardware.wifi.common.DeauthenticationReasonCode disconnectReasonCode;
}
diff --git a/wifi/hostapd/aidl/android/hardware/wifi/hostapd/ClientInfo.aidl b/wifi/hostapd/aidl/android/hardware/wifi/hostapd/ClientInfo.aidl
index 7bed658..a7ca1ec 100644
--- a/wifi/hostapd/aidl/android/hardware/wifi/hostapd/ClientInfo.aidl
+++ b/wifi/hostapd/aidl/android/hardware/wifi/hostapd/ClientInfo.aidl
@@ -16,6 +16,8 @@
package android.hardware.wifi.hostapd;
+import android.hardware.wifi.common.DeauthenticationReasonCode;
+
/**
* Parameters to control the channel selection for the interface.
*/
@@ -42,4 +44,9 @@
* True when client connected, false when client disconnected.
*/
boolean isConnected;
+
+ /**
+ * Reason for client disconnect from soft ap.
+ */
+ DeauthenticationReasonCode disconnectReasonCode;
}
diff --git a/wifi/hostapd/aidl/vts/functional/Android.bp b/wifi/hostapd/aidl/vts/functional/Android.bp
index b1c9c5d..de31e14 100644
--- a/wifi/hostapd/aidl/vts/functional/Android.bp
+++ b/wifi/hostapd/aidl/vts/functional/Android.bp
@@ -37,7 +37,7 @@
"android.hardware.wifi@1.4",
"android.hardware.wifi@1.5",
"android.hardware.wifi@1.6",
- "android.hardware.wifi.common-V1-ndk",
+ "android.hardware.wifi.common-V2-ndk",
"android.hardware.wifi-V3-ndk",
"libwifi-system",
"libwifi-system-iface",