wifi: Add STA + STA HIDL API's
Add the HIDL API's + shim + VTS tests.
Bug: 170305665
Test: atest VtsHalWifiV1_3TargetTest VtsHalWifiV1_5TargetTest
Change-Id: I26ada11aebfe8082bfda251cf7e6990e0aa08a06
diff --git a/wifi/1.5/IWifiChip.hal b/wifi/1.5/IWifiChip.hal
index 5243baf..dcc9279 100644
--- a/wifi/1.5/IWifiChip.hal
+++ b/wifi/1.5/IWifiChip.hal
@@ -36,6 +36,53 @@
};
/**
+ * When there are 2 or more simultaneous STA connections, this use case hint indicates what
+ * use-case is being enabled by the framework. This use case hint can be used by the firmware
+ * to modify various firmware configurations like:
+ * - Allowed BSSIDs the firmware can choose for the initial connection/roaming attempts.
+ * - Duty cycle to choose for the 2 STA connections if the radio is in MCC mode.
+ * - Whether roaming, APF and other offloads needs to be enabled or not.
+ * Note:
+ * - This will be invoked before an active wifi connection is established on the second
+ * interface.
+ * - This use-case hint is implicitly void when the second STA interface is brought down.
+ */
+ enum MultiStaUseCase : uint8_t {
+ /**
+ * Usage:
+ * - This will be sent down for make before break use-case.
+ * - Platform is trying to speculatively connect to a second network and evaluate it without
+ * disrupting the primary connection.
+ * Requirements for Firmware:
+ * - Do not reduce the number of tx/rx chains of primary connection.
+ * - If using MCC, should set the MCC duty cycle of the primary connection to be higher than
+ * the secondary connection (maybe 70/30 split).
+ * - Should pick the best BSSID for the secondary STA (disregard the chip mode) independent
+ * of the primary STA:
+ * - Don’t optimize for DBS vs MCC/SCC
+ * - Should not impact the primary connection’s bssid selection:
+ * - Don’t downgrade chains of the existing primary connection.
+ * - Don’t optimize for DBS vs MCC/SCC.
+ */
+ DUAL_STA_TRANSIENT_PREFER_PRIMARY = 0,
+ /**
+ * Usage:
+ * - This will be sent down for any app requested peer to peer connections.
+ * - In this case, both the connections needs to be allocated equal resources.
+ * - For the peer to peer use case, BSSID for the secondary connection will be chosen by the
+ * framework.
+ *
+ * Requirements for Firmware:
+ * - Can choose MCC or DBS mode depending on the MCC efficiency and HW capability.
+ * - If using MCC, set the MCC duty cycle of the primary connection to be equal to the
+ * secondary connection.
+ * - Prefer BSSID candidates which will help provide the best "overall" performance for both
+ * the connections.
+ */
+ DUAL_STA_NON_TRANSIENT_UNBIASED = 1,
+ };
+
+ /**
* Get the capabilities supported by this chip.
*
* @return status WifiStatus of the operation.
@@ -48,4 +95,36 @@
*/
getCapabilities_1_5()
generates (WifiStatus status, bitfield<ChipCapabilityMask> capabilities);
+
+ /**
+ * Invoked to indicate that the provided iface is the primary STA iface when there are more
+ * than 1 STA iface concurrently active.
+ * Note: If the wifi firmware/chip cannot support multiple instances of any offload
+ * (like roaming, APF, rssi threshold, etc), the firmware should ensure that these
+ * offloads are at least enabled for the primary interface. If the new primary interface is
+ * already connected to a network, the firmware must switch all the offloads on
+ * this new interface without disconnecting.
+ *
+ * @param ifname Name of the STA iface.
+ * @return status WifiStatus of the operation.
+ * Possible status codes:
+ * |WifiStatusCode.SUCCESS|,
+ * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
+ * |WifiStatusCode.ERROR_INVALID_ARGS|
+ */
+ setMultiStaPrimaryConnection(string ifName) generates (WifiStatus status);
+
+ /**
+ * Invoked to indicate the STA + STA use-case that is active.
+ *
+ * Refer to documentation of |MultiStaUseCase| for details.
+ *
+ * @param useCase Use case that is active.
+ * @return status WifiStatus of the operation.
+ * Possible status codes:
+ * |WifiStatusCode.SUCCESS|,
+ * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
+ * |WifiStatusCode.ERROR_INVALID_ARGS|
+ */
+ setMultiStaUseCase(MultiStaUseCase useCase) generates (WifiStatus status);
};