From c9d109fe0619e27d6034eb09bb97b86277c43da5 Mon Sep 17 00:00:00 2001 From: lesl Date: Wed, 16 Sep 2020 22:45:00 +0800 Subject: [PATCH] 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 --- wifi/hostapd/1.3/IHostapd.hal | 38 ++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/wifi/hostapd/1.3/IHostapd.hal b/wifi/hostapd/1.3/IHostapd.hal index d16448d074..0309f3b63f 100644 --- a/wifi/hostapd/1.3/IHostapd.hal +++ b/wifi/hostapd/1.3/IHostapd.hal @@ -16,14 +16,50 @@ 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; /** * Top-level object for managing SoftAPs. */ 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. *