wifi: Add AP bridge operations support (AP+AP Part 2)
The bridge interface name will take "ap_br_" + ap interface name.
ex: The ap interface name is "wlan1".
The bridge interface name will be "ap_br_wlan1"
When OEM customize the ap interface name via property
"ro.vendor.wifi.sap.interface".
It will only apply on single AP mode.
i.e.
"ro.vendor.wifi.sap.interface" = "sap0"
Single AP mode: ap interface name = "sap0"
Dual AP mode:
bridge interface name = "ap_br_sap0"
first ap instance name: get from "getSupportedIfaceName" + idx
ex: sap0
second ap instance name: get from "getSupportedIfaceName" + idx + 1
ex: sap1
PS: The VtsHalWifiApV1_5TargetTest will be added in another CL which
will update another SAP related HAL:IWifiApIface.hal.
AP+AP Part 2 includes:
1. Support bridge in libwifi_system_iface
2. WifiHal API
a. createBridgedApIface (Support create bridge mode AP)
b. removeIfaceInstanceFromBridgedApIface (Support remove one of the instance in bridge)
3. Framework:
Create bridge AP when multi-bands configured.
Bug: 162686273
Test: Manual Test (SAP enable normally)
Test: atest -c VtsHalWifiApV1_0TargetTest
Test: atest -c VtsHalWifiApV1_4TargetTest
Change-Id: I8be510778e9772bcf1539e4915384949cbe13127
diff --git a/wifi/1.5/IWifiChip.hal b/wifi/1.5/IWifiChip.hal
index dcc9279..7cf81b5 100644
--- a/wifi/1.5/IWifiChip.hal
+++ b/wifi/1.5/IWifiChip.hal
@@ -17,6 +17,7 @@
package android.hardware.wifi@1.5;
import @1.0::WifiStatus;
+import @1.0::IWifiApIface;
import @1.0::IWifiIface;
import @1.3::IWifiChip;
import @1.4::IWifiChip;
@@ -127,4 +128,43 @@
* |WifiStatusCode.ERROR_INVALID_ARGS|
*/
setMultiStaUseCase(MultiStaUseCase useCase) generates (WifiStatus status);
+
+
+ /**
+ * Create bridged IWifiApIface.
+ *
+ * Depending on the mode the chip is configured in, the interface creation
+ * may fail (code: |ERROR_NOT_AVAILABLE|) if we've already reached the maximum
+ * allowed (specified in |ChipIfaceCombination|) number of ifaces of the AP
+ * type.
+ *
+ * @return status WifiStatus of the operation.
+ * Possible status codes:
+ * |WifiStatusCode.SUCCESS|,
+ * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
+ * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
+ * |WifiStatusCode.ERROR_NOT_AVAILABLE|
+ * @return iface HIDL interface object representing the iface if
+ * successful, null otherwise.
+ */
+ createBridgedApIface() generates (WifiStatus status, IWifiApIface iface);
+
+ /**
+ * Removes one of the instance on the AP Iface with the provided ifaceName and
+ * ifaceInstanceName.
+ *
+ * Use the API: removeApIface with brIfaceName in the V1_0::WifiChip.hal to remove bridge Iface.
+ *
+ * @param brIfaceName Name of the bridged AP iface.
+ * @param ifaceInstanceName Name of the instance. The empty instance is
+ * invalid.
+ * @return status WifiStatus of the operation.
+ * Possible status codes:
+ * |WifiStatusCode.SUCCESS|,
+ * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
+ * |WifiStatusCode.ERROR_INVALID_ARGS|,
+ * |WifiStatusCode.ERROR_NOT_AVAILABLE|
+ */
+ removeIfaceInstanceFromBridgedApIface(string brIfaceName, string ifaceInstanceName)
+ generates (WifiStatus status);
};