wifi: Add access network type support
The access network type can be used to indicate network metered state.
Add access network type support when create access point.
Test: Manual Test, check client scan IE to show correct interworking
value. see: b/137879206#comment14
Test: atest VtsHalWifiHostapdV1_0TargetTest
Test: atest VtsHalWifiHostapdV1_1TargetTest
Test: atest VtsHalWifiHostapdV1_2TargetTest
Bug: 137879206
Change-Id: I74213bd763f865f26781313b00e1b1cfeee93086
diff --git a/wifi/hostapd/1.3/IHostapd.hal b/wifi/hostapd/1.3/IHostapd.hal
index d16448d..0309f3b 100644
--- a/wifi/hostapd/1.3/IHostapd.hal
+++ b/wifi/hostapd/1.3/IHostapd.hal
@@ -16,8 +16,10 @@
package android.hardware.wifi.hostapd@1.3;
-import @1.2::IHostapd;
import @1.2::HostapdStatus;
+import @1.2::IHostapd.IfaceParams;
+import @1.2::IHostapd.NetworkParams;
+import @1.2::IHostapd;
import IHostapdCallback;
/**
@@ -25,6 +27,40 @@
*/
interface IHostapd extends @1.2::IHostapd {
/**
+ * Parameters to use for setting up the access point network.
+ */
+ struct NetworkParams {
+ /**
+ * Baseline information as defined in HAL 1.2.
+ */
+ @1.2::IHostapd.NetworkParams V1_2;
+
+ /**
+ * Enable the interworking service and set access network type to
+ * CHARGEABLE_PUBLIC_NETWORK when set to true.
+ */
+ bool isMetered;
+ };
+
+ /**
+ * Adds a new access point for hostapd to control.
+ *
+ * This should trigger the setup of an access point with the specified
+ * interface and network params.
+ *
+ * @param ifaceParams AccessPoint Params for the access point.
+ * @param nwParams Network Params for the access point.
+ * @return status Status of the operation.
+ * Possible status codes:
+ * |HostapdStatusCode.SUCCESS|,
+ * |HostapdStatusCode.FAILURE_ARGS_INVALID|,
+ * |HostapdStatusCode.FAILURE_UNKNOWN|,
+ * |HostapdStatusCode.FAILURE_IFACE_EXISTS|
+ */
+ addAccessPoint_1_3(@1.2::IHostapd.IfaceParams ifaceParams, NetworkParams nwParams)
+ generates (HostapdStatus status);
+
+ /**
* Register for callbacks from the hostapd service.
*
* These callbacks are invoked for global events that are not specific