Home | History | Annotate | Download | only in 1.2
      1 /*
      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 
     17 package android.hardware.wifi@1.2;
     18 
     19 import @1.0::WifiStatus;
     20 import @1.1::IWifiChip;
     21 import IWifiChipEventCallback;
     22 
     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  */
     28 interface IWifiChip extends @1.1::IWifiChip {
     29     /**
     30      * 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     /**
     74      * 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);
     87 };
     88