blob: 555ec918accc1cfba67d1d49487d89089d40a1c8 [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 {
Ahmed ElArabawyd73b64c2022-01-13 09:20:15 -080030 /**
Nate Jiang6e135992022-01-24 12:14:23 -080031 * Usable Wifi channels filter masks.
32 */
33 enum UsableChannelFilter : @1.5::IWifiChip.UsableChannelFilter {
34 /**
35 * Filter Wifi channels that are supported for NAN3.1 Instant communication mode. This
36 * filter should only be applied to NAN interface.
37 * - If 5G is supported default discovery channel 149/44 is considered,
38 * - If 5G is not supported then channel 6 has to be considered.
39 */
40 NAN_INSTANT_MODE = 1 << 2,
41 };
42
43 /**
Ahmed ElArabawyd73b64c2022-01-13 09:20:15 -080044 * Create a RTTController instance.
45 *
46 * RTT controller can be either:
47 * a) Bound to a specific iface by passing in the corresponding |IWifiIface|
48 * object in |iface| param, OR
49 * b) Let the implementation decide the iface to use for RTT operations by
50 * passing null in |iface| param.
51 *
52 * @param boundIface HIDL interface object representing the iface if
53 * the responder must be bound to a specific iface, null otherwise.
54 * @return status WifiStatus of the operation.
55 * Possible status codes:
56 * |WifiStatusCode.SUCCESS|,
57 * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
58 */
59 createRttController_1_6(IWifiIface boundIface)
60 generates (WifiStatus status, IWifiRttController rtt);
61
62 /**
63 * Retrieve list of usable Wifi channels for the specified band &
64 * operational modes.
65 *
66 * The list of usable Wifi channels in a given band depends on factors
67 * like current country code, operational mode (e.g. STA, SAP, WFD-CLI,
68 * WFD-GO, TDLS, NAN) and other restrictons due to DFS, cellular coexistence
69 * and conncurency state of the device.
70 *
71 * @param band |WifiBand| for which list of usable channels is requested.
72 * @param ifaceModeMask Bitmask of the modes represented by |WifiIfaceMode|
73 * Bitmask respresents all the modes that the caller is interested
74 * in (e.g. STA, SAP, CLI, GO, TDLS, NAN). E.g. If the caller is
75 * interested in knowing usable channels for P2P CLI, P2P GO & NAN,
76 * ifaceModeMask would be set to
77 * IFACE_MODE_P2P_CLIENT|IFACE_MODE_P2P_GO|IFACE_MODE_NAN.
78 * @param filterMask Bitmask of filters represented by
79 * |UsableChannelFilter|. Specifies whether driver should filter
80 * channels based on additional criteria. If no filter is specified
81 * driver should return usable channels purely based on regulatory
82 * constraints.
83 * @return status WifiStatus of the operation.
84 * Possible status codes:
85 * |WifiStatusCode.SUCCESS|,
86 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
87 * |WifiStatusCode.ERROR_INVALID_ARGS|,
88 * |WifiStatusCode.FAILURE_UNKNOWN|
89 * @return channels List of channels represented by |WifiUsableChannel|
90 * Each entry represents a channel frequency, bandwidth and
91 * bitmask of modes (e.g. STA, SAP, CLI, GO, TDLS, NAN) that are
92 * allowed on that channel. E.g. If only STA mode can be supported
93 * on an indoor channel, only the IFACE_MODE_STA bit would be set
94 * for that channel. If 5GHz SAP cannot be supported, then none of
95 * the 5GHz channels will have IFACE_MODE_SOFTAP bit set.
96 * Note: Bits do not represent concurrency state. Each bit only
97 * represents whether particular mode is allowed on that channel.
98 */
99 getUsableChannels_1_6(WifiBand band, bitfield<WifiIfaceMode> ifaceModeMask,
Nate Jiang50c001d2022-01-12 16:06:01 -0800100 bitfield<UsableChannelFilter> filterMask)
Ahmed ElArabawyd73b64c2022-01-13 09:20:15 -0800101 generates (WifiStatus status, vec<WifiUsableChannel> channels);
Sunil Ravief97d232022-01-24 10:39:56 -0800102
103 /**
104 * Retrieve the list of all the possible radio combinations supported by this
105 * chip.
106 *
107 * @return status WifiStatus of the operation.
108 * Possible status codes:
109 * |WifiStatusCode.SUCCESS|,
110 * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
111 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
112 * |WifiStatusCode.FAILURE_UNKNOWN|
113 * @return radioCombinationMatrix
114 * A list of all the possible radio combinations represented by
115 * |WifiRadioCombinationMatrix|.
116 * For Example in case of a chip which has two radios, where one radio is
117 * capable of 2.4GHz 2X2 only and another radio which is capable of either
118 * 5GHz or 6GHz 2X2, number of possible radio combinations in this case
119 * are 5 and possible combinations are
120 * {{{2G 2X2}}, //Standalone 2G
121 * {{5G 2X2}}, //Standalone 5G
122 * {{6G 2X2}}, //Standalone 6G
123 * {{2G 2X2}, {5G 2X2}}, //2G+5G DBS
124 * {{2G 2X2}, {6G 2X2}}} //2G+6G DBS
125 * Note: Since this chip doesn’t support 5G+6G simultaneous operation
126 * as there is only one radio which can support both bands, So it can only
127 * do MCC 5G+6G. This table should not get populated with possible MCC
128 * configurations. This is only for simultaneous radio configurations
129 * (such as standalone, multi band simultaneous or single band simultaneous).
130 */
131 getSupportedRadioCombinationsMatrix()
132 generates (WifiStatus status, WifiRadioCombinationMatrix radioCombinationMatrix);
Ahmed ElArabawyd73b64c2022-01-13 09:20:15 -0800133};