blob: b252a053e8c09f8d18c9c2396e57b12ed5c9f675 [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 /**
31 * Create a RTTController instance.
32 *
33 * RTT controller can be either:
34 * a) Bound to a specific iface by passing in the corresponding |IWifiIface|
35 * object in |iface| param, OR
36 * b) Let the implementation decide the iface to use for RTT operations by
37 * passing null in |iface| param.
38 *
39 * @param boundIface HIDL interface object representing the iface if
40 * the responder must be bound to a specific iface, null otherwise.
41 * @return status WifiStatus of the operation.
42 * Possible status codes:
43 * |WifiStatusCode.SUCCESS|,
44 * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
45 */
46 createRttController_1_6(IWifiIface boundIface)
47 generates (WifiStatus status, IWifiRttController rtt);
48
49 /**
50 * Retrieve list of usable Wifi channels for the specified band &
51 * operational modes.
52 *
53 * The list of usable Wifi channels in a given band depends on factors
54 * like current country code, operational mode (e.g. STA, SAP, WFD-CLI,
55 * WFD-GO, TDLS, NAN) and other restrictons due to DFS, cellular coexistence
56 * and conncurency state of the device.
57 *
58 * @param band |WifiBand| for which list of usable channels is requested.
59 * @param ifaceModeMask Bitmask of the modes represented by |WifiIfaceMode|
60 * Bitmask respresents all the modes that the caller is interested
61 * in (e.g. STA, SAP, CLI, GO, TDLS, NAN). E.g. If the caller is
62 * interested in knowing usable channels for P2P CLI, P2P GO & NAN,
63 * ifaceModeMask would be set to
64 * IFACE_MODE_P2P_CLIENT|IFACE_MODE_P2P_GO|IFACE_MODE_NAN.
65 * @param filterMask Bitmask of filters represented by
66 * |UsableChannelFilter|. Specifies whether driver should filter
67 * channels based on additional criteria. If no filter is specified
68 * driver should return usable channels purely based on regulatory
69 * constraints.
70 * @return status WifiStatus of the operation.
71 * Possible status codes:
72 * |WifiStatusCode.SUCCESS|,
73 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
74 * |WifiStatusCode.ERROR_INVALID_ARGS|,
75 * |WifiStatusCode.FAILURE_UNKNOWN|
76 * @return channels List of channels represented by |WifiUsableChannel|
77 * Each entry represents a channel frequency, bandwidth and
78 * bitmask of modes (e.g. STA, SAP, CLI, GO, TDLS, NAN) that are
79 * allowed on that channel. E.g. If only STA mode can be supported
80 * on an indoor channel, only the IFACE_MODE_STA bit would be set
81 * for that channel. If 5GHz SAP cannot be supported, then none of
82 * the 5GHz channels will have IFACE_MODE_SOFTAP bit set.
83 * Note: Bits do not represent concurrency state. Each bit only
84 * represents whether particular mode is allowed on that channel.
85 */
86 getUsableChannels_1_6(WifiBand band, bitfield<WifiIfaceMode> ifaceModeMask,
Nate Jiang50c001d2022-01-12 16:06:01 -080087 bitfield<UsableChannelFilter> filterMask)
Ahmed ElArabawyd73b64c2022-01-13 09:20:15 -080088 generates (WifiStatus status, vec<WifiUsableChannel> channels);
89};