1/* 2 * Copyright 2018 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.3; 18 19import @1.0::WifiStatus; 20import @1.2::IWifiChip; 21 22/** 23 * Interface that represents a chip that must be configured as a single unit. 24 */ 25interface IWifiChip extends @1.2::IWifiChip { 26 27 /** 28 * Capabilities exposed by this chip. 29 */ 30 enum ChipCapabilityMask : @1.2::IWifiChip.ChipCapabilityMask { 31 /** 32 * Set Latency Mode. 33 */ 34 SET_LATENCY_MODE = 1 << 12, 35 36 /** 37 * Support P2P MAC randomization 38 */ 39 P2P_RAND_MAC = 1 << 13 40 }; 41 42 /** 43 * Get the capabilities supported by this chip. 44 * 45 * @return status WifiStatus of the operation. 46 * Possible status codes: 47 * |WifiStatusCode.SUCCESS|, 48 * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, 49 * |WifiStatusCode.ERROR_NOT_AVAILABLE|, 50 * |WifiStatusCode.ERROR_UNKNOWN| 51 * @return capabilities Bitset of |ChipCapabilityMask| values. 52 */ 53 getCapabilities_1_3() 54 generates (WifiStatus status, bitfield<ChipCapabilityMask> capabilities); 55 56 /** 57 * This enum represents the different latency modes that can be set through 58 * setLatencyMode() 59 */ 60 enum LatencyMode : uint32_t { 61 NORMAL = 0, 62 LOW = 1 63 }; 64 65 /** 66 * API to set the wifi latency mode 67 * 68 * The latency mode is a hint to the HAL to enable or disable Wi-Fi latency 69 * optimization. The optimization should be enabled if the mode is set to |LOW| 70 * and should be disabled if the mode is set to |NORMAL|. 71 * Wi-Fi latency optimization may trade-off latency against other Wi-Fi 72 * functionality such as scanning, roaming, etc. but it should not result in 73 * completely halting this functionality. 74 * 75 * The low latency mode targets applications such as gaming and virtual reality. 76 */ 77 setLatencyMode(LatencyMode mode) generates (WifiStatus status); 78 79 /** 80 * API to flush debug ring buffer data to files. 81 * 82 * Force flush debug ring buffer using IBase::debug. 83 * This API help to collect firmware/driver/pkt logs. 84 * 85 * @return status WifiStatus of the operation. 86 * Possible status codes: 87 * |WifiStatusCode.SUCCESS|, 88 * |WifiStatusCode.UNKNOWN| 89 */ 90 flushRingBufferToFile() generates (WifiStatus status); 91}; 92