1/* 2 * Copyright (C) 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 17syntax = "proto2"; 18package android.net.wifi; 19 20option java_outer_classname = "WifiProtoEnums"; 21option java_multiple_files = true; 22 23/** 24 * Wifi Lock modes, primarily used in 25 * frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiLockManager.java. 26 */ 27enum WifiModeEnum { 28 /** 29 * Deprecated. 30 * Wi-Fi will be kept active, and will behave normally. 31 */ 32 WIFI_MODE_FULL = 1 [deprecated=true]; 33 34 /** 35 * Deprecated. 36 * Wi-Fi will be kept active, but the only operation that will be supported is initiation of 37 * scans, and the subsequent reporting of scan results. 38 */ 39 WIFI_MODE_SCAN_ONLY = 2 [deprecated=true]; 40 41 /** 42 * Deprecated. Refer {@link com.android.server.wifi.WifiManager#WIFI_MODE_FULL_HIGH_PERF}. 43 * Wi-Fi will not go to power save. 44 */ 45 WIFI_MODE_FULL_HIGH_PERF = 3 [deprecated=true]; 46 47 /** 48 * Wi-Fi will operate with a priority to achieve low latency. 49 */ 50 WIFI_MODE_FULL_LOW_LATENCY = 4; 51} 52 53// What permission model the caller has 54enum WifiCallerType { 55 UNKNOWN = 0; 56 SETTINGS = 1; // caller is SETTINGS or SETUP_WIZARD 57 ADMIN = 2; // caller is a device admin(DO/PO/DA) 58 AUTOMOTIVE = 3; // caller has automotive related permissions 59 SIGNATURE = 4; // Caller uid must be signed with platform key 60 SYSTEM = 5; // caller is a system app 61 OTHERS = 6; // caller is none of the above 62} 63 64/** 65 * Wifi authentication type. 66 */ 67enum WifiAuthType { 68 AUTH_TYPE_NONE = 0; 69 70 // WPA pre-shared key. 71 AUTH_TYPE_WPA_PSK = 1; 72 // WPA using EAP authentication. Generally used with an external authentication server. 73 AUTH_TYPE_WPA_EAP = 2; 74 // IEEE 802.1X using EAP authentication and (optionally) dynamically generated WEP keys. 75 AUTH_TYPE_IEEE8021X = 3; 76 // WPA2 pre-shared key for use with soft access point. 77 AUTH_TYPE_WPA2_PSK = 4; 78 // Hotspot 2.0 r2 OSEN. 79 AUTH_TYPE_OSEN = 5; 80 // IEEE 802.11r Fast BSS Transition with PSK authentication. 81 AUTH_TYPE_FT_PSK = 6; 82 // IEEE 802.11r Fast BSS Transition with EAP authentication. 83 AUTH_TYPE_FT_EAP = 7; 84 // Simultaneous Authentication of Equals. 85 AUTH_TYPE_SAE = 8; 86 // Opportunistic Wireless Encryption. 87 AUTH_TYPE_OWE = 9; 88 // SUITE_B_192 192 bit level 89 AUTH_TYPE_SUITE_B_192 = 10; 90 // WPA pre-shared key with stronger SHA256-based algorithms. 91 AUTH_TYPE_WPA_PSK_SHA256 = 11; 92 // WPA using EAP authentication with stronger SHA256-based algorithms. 93 AUTH_TYPE_WPA_EAP_SHA256 = 12; 94 // WAPI pre-shared key. 95 AUTH_TYPE_WAPI_PSK = 13; 96 // WAPI certificate to be specified. 97 AUTH_TYPE_WAPI_CERT = 14; 98 // IEEE 802.11ai FILS SK with SHA256. 99 AUTH_TYPE_FILS_SHA256 = 15; 100 // IEEE 802.11ai FILS SK with SHA384. 101 AUTH_TYPE_FILS_SHA384 = 16; 102 // Simultaneous Authentication of Equals transition mode. 103 AUTH_TYPE_SAE_TRANSITION = 17; 104 // Opportunistic Wireless Encryption transition mode. 105 AUTH_TYPE_OWE_TRANSITION = 18; 106} 107 108/** 109 * Bucketed wifi band. 110 */ 111enum WifiBandBucket { 112 BAND_UNKNOWN = 0; 113 114 // All of 2.4GHz band 115 BAND_2G = 1; 116 // Frequencies in the range of [5150, 5250) GHz 117 BAND_5G_LOW = 2; 118 // Frequencies in the range of [5250, 5725) GHz 119 BAND_5G_MIDDLE = 3; 120 // Frequencies in the range of [5725, 5850) GHz 121 BAND_5G_HIGH = 4; 122 // Frequencies in the range of [5925, 6425) GHz 123 BAND_6G_LOW = 5; 124 // Frequencies in the range of [6425, 6875) GHz 125 BAND_6G_MIDDLE = 6; 126 // Frequencies in the range of [6875, 7125) GHz 127 BAND_6G_HIGH = 7; 128} 129 130// Status of various Aware operations 131enum AwareStatus { 132 // unknown status 133 ST_UNKNOWN = 0; 134 // NAN operation succeeded 135 ST_SUCCESS = 1; 136 // NAN Discovery Engine/Host driver failures 137 ST_INTERNAL_FAILURE = 2; 138 // NAN OTA failures 139 ST_PROTOCOL_FAILURE = 3; 140 // The publish/subscribe discovery session id is invalid 141 ST_INVALID_SESSION_ID = 4; 142 // Out of resources to fufill request 143 ST_NO_RESOURCES_AVAILABLE = 5; 144 // Invalid arguments passed 145 ST_INVALID_ARGS = 6; 146 // Invalid peer id 147 ST_INVALID_PEER_ID = 7; 148 // Invalid NAN data-path (ndp) id 149 ST_INVALID_NDP_ID = 8; 150 // Attempting to enable NAN when not available, e.g. wifi is disabled 151 ST_NAN_NOT_ALLOWED = 9; 152 // Over the air ACK not received 153 ST_NO_OTA_ACK = 10; 154 // Attempting to enable NAN when already enabled 155 ST_ALREADY_ENABLED = 11; 156 // Can't queue tx followup message foor transmission 157 ST_FOLLOWUP_TX_QUEUE_FULL = 12; 158 // Unsupported concurrency of NAN and another feature - NAN disabled 159 ST_UNSUPPORTED_CONCURRENCY = 13; 160 // Other failures 161 ST_GENERIC_FAILURE = 14; 162} 163 164/** 165 * Soft AP Role 166 */ 167enum SoftApRole { 168 // Unknown 169 ROLE_UNKNOWN = 0; 170 // Tethering AP 171 ROLE_TETHERING = 1; 172 // Local-only AP 173 ROLE_LOCAL_ONLY = 2; 174} 175 176/** 177 * Device support for STA + AP concurrency 178 */ 179enum StaApConcurrency { 180 // Unknown 181 STA_AP_CONCURRENCY_UNKNOWN = 0; 182 // STA + AP concurrency unsupported 183 STA_AP_CONCURRENCY_UNSUPPORTED = 1; 184 // STA + Single AP concurrency supported 185 STA_AP_CONCURRENCY_SINGLE = 2; 186 // STA + Bridged AP concurrency supported 187 STA_AP_CONCURRENCY_DBS = 3; 188} 189 190/** 191 * Connection status of the existing primary STA 192 */ 193enum StaStatus { 194 // Unknown 195 STA_STATUS_UNKNOWN = 0; 196 // STA is disconnected 197 STA_STATUS_DISCONNECTED = 1; 198 // STA is connected via 2.4GHz band 199 STA_STATUS_CONNECTED_2_GHZ = 2; 200 // STA is connected via 5GHz band 201 STA_STATUS_CONNECTED_5_GHZ = 3; 202 // STA is connected via 6GHz band 203 STA_STATUS_CONNECTED_6_GHZ = 4; 204} 205 206/** 207 * Wi-Fi Standards 208 */ 209enum WifiStandard { 210 // Unknown 211 WIFI_STANDARD_UNKNOWN = 0; 212 // Wi-Fi 802.11a/b/g 213 WIFI_STANDARD_LEGACY = 1; 214 // Wi-Fi 802.11n 215 WIFI_STANDARD_11N = 2; 216 // Wi-Fi 802.11ac 217 WIFI_STANDARD_11AC = 3; 218 // Wi-Fi 802.11ax 219 WIFI_STANDARD_11AX = 4; 220 // Wi-Fi 802.11ad 221 WIFI_STANDARD_11AD = 5; 222 // Wi-Fi 802.11be 223 WIFI_STANDARD_11BE = 6; 224} 225 226/** 227 * Role of the client mode manager 228 */ 229enum ClientModeRole { 230 ROLE_UNSPECIFIED = 0; 231 ROLE_CLIENT_PRIMARY = 1; 232 ROLE_CLIENT_SECONDARY_LONG_LIVED = 2; 233 ROLE_CLIENT_SECONDARY_TRANSIENT = 3; 234 ROLE_CLIENT_SECONDARY_INTERNET = 4; 235 ROLE_CLIENT_LOCAL_ONLY = 5; 236 ROLE_CLIENT_OTHERS = 6; 237} 238 239/** 240 * Aware HAL API 241 */ 242enum AwareHalApi { 243 AWARE_API_UNKNOWN = 0; 244 AWARE_CONFIG_REQUEST = 1; 245 AWARE_CREATE_DATA_INTERFACE_REQUEST = 2; 246 AWARE_DELETE_DATA_INTERFACE_REQUEST = 3; 247 AWARE_DISABLE_REQUEST = 4; 248 AWARE_ENABLE_REQUEST = 5; 249 AWARE_GET_CAPABILITIES_REQUEST = 6; 250 AWARE_INITIATE_DATA_PATH_REQUEST = 7; 251 AWARE_REGISTER_EVENT_CALLBACK = 8; 252 AWARE_RESPOND_TO_DATA_PATH_INDICATION_REQUEST = 9; 253 AWARE_START_PUBLISH_REQUEST = 10; 254 AWARE_START_SUBSCRIBE_REQUEST = 11; 255 AWARE_STOP_PUBLISH_REQUEST = 12; 256 AWARE_STOP_SUBSCRIBE_REQUEST = 13; 257 AWARE_TERMINATE_DATA_PATH_REQUEST = 14; 258 AWARE_SUSPEND_REQUEST = 15; 259 AWARE_RESUME_REQUEST = 16; 260 AWARE_TRANSMIT_FOLLOW_UP_REQUEST = 17; 261 AWARE_INITIATE_PAIRING_REQUEST = 18; 262 AWARE_RESPOND_TO_PAIRING_INDICATION_REQUEST = 19; 263 AWARE_INITIATE_BOOTSTRAPPING_REQUEST = 20; 264 AWARE_RESPOND_TO_BOOTSTRAPPING_INDICATION_REQUEST = 21; 265 AWARE_TERMINATE_PAIRING_REQUEST = 22; 266}