blob: 480c5a23b0801e6e877aedee1f3bb8d7ca8e81bf [file] [log] [blame]
Etan Cohen6ce50902017-09-14 07:30:57 -07001/*
2 * Copyright 2017 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.2;
18
Roshan Pius1ce92cf2018-01-22 16:12:19 -080019import @1.0::WifiStatus;
Etan Cohen6ce50902017-09-14 07:30:57 -070020import @1.1::IWifiChip;
Roshan Pius1ce92cf2018-01-22 16:12:19 -080021import IWifiChipEventCallback;
Etan Cohen6ce50902017-09-14 07:30:57 -070022
23/**
24 * Interface that represents a chip that must be configured as a single unit.
25 * The HAL/driver/firmware will be responsible for determining which phy is used
26 * to perform operations like NAN, RTT, etc.
27 */
28interface IWifiChip extends @1.1::IWifiChip {
Roshan Pius1ce92cf2018-01-22 16:12:19 -080029 /**
Ahmed ElArabawy6a1accf2018-01-23 10:57:29 -080030 * Capabilities exposed by this chip.
31 */
32 enum ChipCapabilityMask : @1.1::IWifiChip.ChipCapabilityMask {
33 /**
34 * Set/Reset Tx Power limits.
35 */
36 USE_BODY_HEAD_SAR = 1 << 11
37 };
38
39 /**
40 * List of preset wifi radio TX power levels for different scenarios.
41 * The actual power values (typically varies based on the channel,
42 * 802.11 connection type, number of MIMO streams, etc) for each scenario
43 * is defined by the OEM as a BDF file since it varies for each wifi chip
44 * vendor and device.
45 */
46 enum TxPowerScenario : @1.1::IWifiChip.TxPowerScenario {
47 ON_HEAD_CELL_OFF = 1,
48 ON_HEAD_CELL_ON = 2,
49 ON_BODY_CELL_OFF = 3,
50 ON_BODY_CELL_ON = 4
51 };
52
53 /**
54 * API to select one of the preset TX power scenarios.
55 *
56 * The framework must invoke this method with the appropriate scenario to let
57 * the wifi chip change it's transmitting power levels.
58 * OEM's should define various power profiles for each of the scenarios
59 * above (defined in |TxPowerScenario|) in a vendor extension.
60 *
61 * @param scenario One of the preselected scenarios defined in
62 * |TxPowerScenario|.
63 * @return status WifiStatus of the operation.
64 * Possible status codes:
65 * |WifiStatusCode.SUCCESS|,
66 * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
67 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
68 * |WifiStatusCode.NOT_AVAILABLE|,
69 * |WifiStatusCode.UNKNOWN|
70 */
71 selectTxPowerScenario_1_2(TxPowerScenario scenario) generates (WifiStatus status);
72
73 /**
Roshan Pius1ce92cf2018-01-22 16:12:19 -080074 * Requests notifications of significant events on this chip. Multiple calls
75 * to this must register multiple callbacks each of which must receive all
76 * events.
77 *
78 * @param callback An instance of the |IWifiChipEventCallback| HIDL interface
79 * object.
80 * @return status WifiStatus of the operation.
81 * Possible status codes:
82 * |WifiStatusCode.SUCCESS|,
83 * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
84 */
85 registerEventCallback_1_2(IWifiChipEventCallback callback)
86 generates (WifiStatus status);
Etan Cohen6ce50902017-09-14 07:30:57 -070087};