Wifi: HAL API to query the list of usable channels
API can be used to query what modes (SAP, STA,
WFD Client, WFD Group Owner, TDLS, NAN) can be
supported on each channel for specified band.
Needs support from Wifi chip vendors.
Bug: 160212907
Test: VTS - VtsHalWifiV1_5TargetTest
Change-Id: Icf270b8c2ee14c794778421c9d988712c5c38380
diff --git a/wifi/1.5/IWifiChip.hal b/wifi/1.5/IWifiChip.hal
index b2960cf..209190a 100644
--- a/wifi/1.5/IWifiChip.hal
+++ b/wifi/1.5/IWifiChip.hal
@@ -234,4 +234,33 @@
* |WifiStatusCode.FAILURE_IFACE_INVALID|
*/
setCountryCode(int8_t[2] code) generates (WifiStatus status);
+
+ /**
+ * Retrieve list of usable Wifi channels for the specified band &
+ * operational modes.
+ *
+ * The list of usable Wifi channels in a given band depends on factors
+ * like current country code, operational mode (e.g. STA, SAP, CLI, GO,
+ * TDLS, NAN) and any hard restrictons due to DFS, LTE Coex and
+ * MCC(multi channel-concurrency).
+ *
+ * @param band |WifiBand| for which list of usable channels is requested.
+ * @param ifaceModeMask Bitmask of the modes represented by |WifiIfaceMode|
+ * Bitmask respresents all the modes that the caller is interested
+ * in (e.g. STA, SAP, CLI, GO, TDLS, NAN).
+ * Note: Bitmask does not represent concurrency matrix.
+ * @return status WifiStatus of the operation.
+ * Possible status codes:
+ * |WifiStatusCode.SUCCESS|,
+ * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
+ * |WifiStatusCode.ERROR_INVALID_ARGS|,
+ * |WifiStatusCode.FAILURE_UNKNOWN|
+ * @return channels List of channels represented by |WifiUsableChannel|
+ * Each entry represents a channel frequency, bandwidth and
+ * bitmask of operational modes (e.g. STA, SAP, CLI, GO, TDLS, NAN)
+ * allowed on that channel.
+ * Note: Bitmask does not represent concurrency matrix.
+ */
+ getUsableChannels(WifiBand band, bitfield<WifiIfaceMode> ifaceModeMask)
+ generates (WifiStatus status, vec<WifiUsableChannel> channels);
};