Wifi: Chip level API to set the country code
Country code is global setting across the Wifi chip
and not really Wifi interface (STA or AP) specific.
Framework should have the ability to set the country
code on a chip level without requiring supplicant
instance to be running. As long as there is at least
one active interface to communicate to kernel driver,
country code can be set and driver should apply the
setting globally.
Bug: 149936939
Test: VTS - VtsHalWifiV1_5TargetTest
Change-Id: I1be5dae34b216a6152d09605d055872d5345507c
diff --git a/wifi/1.5/IWifiChip.hal b/wifi/1.5/IWifiChip.hal
index 80f2ca4..b2960cf 100644
--- a/wifi/1.5/IWifiChip.hal
+++ b/wifi/1.5/IWifiChip.hal
@@ -216,4 +216,22 @@
setCoexUnsafeChannels(
vec<CoexUnsafeChannel> unsafeChannels, bitfield<CoexRestriction> restrictions)
generates (WifiStatus status);
+
+ /**
+ * Set country code for this Wifi chip.
+ *
+ * Country code is global setting across the Wifi chip and not Wifi
+ * interface (STA or AP) specific. Legacy HAL API's for country code in
+ * @1.0::ISupplicantStaIface::setCountryCode &
+ * @1.0::IWifiApIface:setCountryCode are deprecated in favor of this
+ * chip level API.
+ *
+ * @param code 2 byte country code (as defined in ISO 3166) to set.
+ * @return status Status of the operation.
+ * Possible status codes:
+ * |WifiStatusCode.SUCCESS|,
+ * |WifiStatusCode.FAILURE_UNKNOWN|,
+ * |WifiStatusCode.FAILURE_IFACE_INVALID|
+ */
+ setCountryCode(int8_t[2] code) generates (WifiStatus status);
};