Add API "startSubsystemRestart" and callback function
In order to trigger subsystem restart to reload wlan firmware,
this change adds an API for framework and vendor HAL.
Meanwhile, create new callback function for subsystem restart instead of
general callback "onFailure()".
Bug: 178126071
Test: vendor HAL can received API call
subsystem restart will callback "onSubsystemRestart()"
Change-Id: If3dc84049a9171677ad281c9bcc67a44dc722bdb
diff --git a/wifi/1.5/IWifiChip.hal b/wifi/1.5/IWifiChip.hal
index 5a3e288..e199850 100644
--- a/wifi/1.5/IWifiChip.hal
+++ b/wifi/1.5/IWifiChip.hal
@@ -303,4 +303,25 @@
getUsableChannels(WifiBand band, bitfield<WifiIfaceMode> ifaceModeMask,
bitfield<UsableChannelFilter> filterMask)
generates (WifiStatus status, vec<WifiUsableChannel> channels);
+
+ /**
+ * Trigger subsystem restart
+ *
+ * If the framework detects a problem (e.g. connection failure),
+ * it must call this function to attempt recovery.
+ *
+ * When the wifi HAL receiveds triggerSubsystemRestart(), it must restart
+ * the wlan subsystem, especially the wlan firmware.
+ *
+ * Regarding the callback function for subsystem restart, refer to documentation of
+ * |IWifiEventCallback.onSubsystemRestart| for details.
+ *
+ * @return status WifiStatus of the operation.
+ * Possible status codes:
+ * |WifiStatusCode.SUCCESS|,
+ * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
+ * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
+ * |WifiStatusCode.ERROR_UNKNOWN|
+ */
+ triggerSubsystemRestart() generates (WifiStatus status);
};