blob: 301bd82ca5b679c2b717ded89bab071f782b6ad4 [file] [log] [blame]
Ahmed ElArabawyd73b64c2022-01-13 09:20:15 -08001/*
2 * Copyright 2022 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.hardware.wifi@1.6;
18
19import @1.0::IWifiIface;
20import @1.0::WifiStatus;
21import @1.5::WifiBand;
22import @1.5::IWifiChip;
23import @1.5::WifiIfaceMode;
24import IWifiRttController;
25
26/**
27 * Interface that represents a chip that must be configured as a single unit.
28 */
29interface IWifiChip extends @1.5::IWifiChip {
30
31 /**
32 * Create a RTTController instance.
33 *
34 * RTT controller can be either:
35 * a) Bound to a specific iface by passing in the corresponding |IWifiIface|
36 * object in |iface| param, OR
37 * b) Let the implementation decide the iface to use for RTT operations by
38 * passing null in |iface| param.
39 *
40 * @param boundIface HIDL interface object representing the iface if
41 * the responder must be bound to a specific iface, null otherwise.
42 * @return status WifiStatus of the operation.
43 * Possible status codes:
44 * |WifiStatusCode.SUCCESS|,
45 * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
46 */
47 createRttController_1_6(IWifiIface boundIface)
48 generates (WifiStatus status, IWifiRttController rtt);
49
50 /**
51 * Retrieve list of usable Wifi channels for the specified band &
52 * operational modes.
53 *
54 * The list of usable Wifi channels in a given band depends on factors
55 * like current country code, operational mode (e.g. STA, SAP, WFD-CLI,
56 * WFD-GO, TDLS, NAN) and other restrictons due to DFS, cellular coexistence
57 * and conncurency state of the device.
58 *
59 * @param band |WifiBand| for which list of usable channels is requested.
60 * @param ifaceModeMask Bitmask of the modes represented by |WifiIfaceMode|
61 * Bitmask respresents all the modes that the caller is interested
62 * in (e.g. STA, SAP, CLI, GO, TDLS, NAN). E.g. If the caller is
63 * interested in knowing usable channels for P2P CLI, P2P GO & NAN,
64 * ifaceModeMask would be set to
65 * IFACE_MODE_P2P_CLIENT|IFACE_MODE_P2P_GO|IFACE_MODE_NAN.
66 * @param filterMask Bitmask of filters represented by
67 * |UsableChannelFilter|. Specifies whether driver should filter
68 * channels based on additional criteria. If no filter is specified
69 * driver should return usable channels purely based on regulatory
70 * constraints.
71 * @return status WifiStatus of the operation.
72 * Possible status codes:
73 * |WifiStatusCode.SUCCESS|,
74 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
75 * |WifiStatusCode.ERROR_INVALID_ARGS|,
76 * |WifiStatusCode.FAILURE_UNKNOWN|
77 * @return channels List of channels represented by |WifiUsableChannel|
78 * Each entry represents a channel frequency, bandwidth and
79 * bitmask of modes (e.g. STA, SAP, CLI, GO, TDLS, NAN) that are
80 * allowed on that channel. E.g. If only STA mode can be supported
81 * on an indoor channel, only the IFACE_MODE_STA bit would be set
82 * for that channel. If 5GHz SAP cannot be supported, then none of
83 * the 5GHz channels will have IFACE_MODE_SOFTAP bit set.
84 * Note: Bits do not represent concurrency state. Each bit only
85 * represents whether particular mode is allowed on that channel.
86 */
87 getUsableChannels_1_6(WifiBand band, bitfield<WifiIfaceMode> ifaceModeMask,
88 bitfield<UsableChannelFilter> filterMask)
89 generates (WifiStatus status, vec<WifiUsableChannel> channels);
90};