1 /* 2 * Copyright (C) 2014 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 #ifndef __VENDOR_DEFINITIONS_H__ 18 #define __VENDOR_DEFINITIONS_H__ 19 20 /*Internal to Android HAL component */ 21 enum vendor_subcmds { 22 /* subcommands for link layer statistics start here */ 23 QCA_NL80211_VENDOR_SUBCMD_LL_STATS_SET = 14, 24 QCA_NL80211_VENDOR_SUBCMD_LL_STATS_GET = 15, 25 QCA_NL80211_VENDOR_SUBCMD_LL_STATS_CLR = 16, 26 QCA_NL80211_VENDOR_SUBCMD_LL_STATS_RADIO_RESULTS = 17, 27 QCA_NL80211_VENDOR_SUBCMD_LL_STATS_IFACE_RESULTS = 18, 28 QCA_NL80211_VENDOR_SUBCMD_LL_STATS_PEERS_RESULTS = 19, 29 /* subcommands for gscan start here */ 30 QCA_NL80211_VENDOR_SUBCMD_GSCAN_START = 20, 31 QCA_NL80211_VENDOR_SUBCMD_GSCAN_STOP = 21, 32 QCA_NL80211_VENDOR_SUBCMD_GSCAN_GET_VALID_CHANNELS = 22, 33 QCA_NL80211_VENDOR_SUBCMD_GSCAN_GET_CAPABILITIES = 23, 34 QCA_NL80211_VENDOR_SUBCMD_GSCAN_GET_CACHED_RESULTS = 24, 35 /* Used when report_threshold is reached in scan cache. */ 36 QCA_NL80211_VENDOR_SUBCMD_GSCAN_SCAN_RESULTS_AVAILABLE = 25, 37 /* Used to report scan results when each probe rsp. is received, 38 * if report_events enabled in wifi_scan_cmd_params. 39 */ 40 QCA_NL80211_VENDOR_SUBCMD_GSCAN_FULL_SCAN_RESULT = 26, 41 /* Indicates progress of scanning state-machine. */ 42 QCA_NL80211_VENDOR_SUBCMD_GSCAN_SCAN_EVENT = 27, 43 /* Indicates BSSID Hotlist. */ 44 QCA_NL80211_VENDOR_SUBCMD_GSCAN_HOTLIST_AP_FOUND = 28, 45 QCA_NL80211_VENDOR_SUBCMD_GSCAN_SET_BSSID_HOTLIST = 29, 46 QCA_NL80211_VENDOR_SUBCMD_GSCAN_RESET_BSSID_HOTLIST = 30, 47 QCA_NL80211_VENDOR_SUBCMD_GSCAN_SIGNIFICANT_CHANGE = 31, 48 QCA_NL80211_VENDOR_SUBCMD_GSCAN_SET_SIGNIFICANT_CHANGE = 32, 49 QCA_NL80211_VENDOR_SUBCMD_GSCAN_RESET_SIGNIFICANT_CHANGE = 33, 50 }; 51 52 enum qca_wlan_vendor_attr_ll_stats_set 53 { 54 QCA_WLAN_VENDOR_ATTR_LL_STATS_SET_INVALID = 0, 55 /* Unsigned 32-bit value */ 56 QCA_WLAN_VENDOR_ATTR_LL_STATS_SET_CONFIG_MPDU_SIZE_THRESHOLD = 1, 57 QCA_WLAN_VENDOR_ATTR_LL_STATS_SET_CONFIG_AGGRESSIVE_STATS_GATHERING, 58 /* keep last */ 59 QCA_WLAN_VENDOR_ATTR_LL_STATS_SET_AFTER_LAST, 60 QCA_WLAN_VENDOR_ATTR_LL_STATS_SET_MAX = 61 QCA_WLAN_VENDOR_ATTR_LL_STATS_SET_AFTER_LAST - 1, 62 }; 63 64 enum qca_wlan_vendor_attr_ll_stats_clr 65 { 66 QCA_WLAN_VENDOR_ATTR_LL_STATS_CLR_INVALID = 0, 67 /* Unsigned 32bit bitmap for clearing statistics 68 * All radio statistics 0x00000001 69 * cca_busy_time (within radio statistics) 0x00000002 70 * All channel stats (within radio statistics) 0x00000004 71 * All scan statistics (within radio statistics) 0x00000008 72 * All interface statistics 0x00000010 73 * All tx rate statistics (within interface statistics) 0x00000020 74 * All ac statistics (with in interface statistics) 0x00000040 75 * All contention (min, max, avg) statistics (within ac statisctics) 76 * 0x00000080. 77 */ 78 QCA_WLAN_VENDOR_ATTR_LL_STATS_CLR_CONFIG_REQ_MASK, 79 /* Unsigned 8bit value : Request to stop statistics collection */ 80 QCA_WLAN_VENDOR_ATTR_LL_STATS_CLR_CONFIG_STOP_REQ, 81 82 /* Unsigned 32bit bitmap : Response from the driver 83 * for the cleared statistics 84 */ 85 QCA_WLAN_VENDOR_ATTR_LL_STATS_CLR_CONFIG_RSP_MASK, 86 /* Unsigned 8bit value: Response from driver/firmware 87 * for the stop request 88 */ 89 QCA_WLAN_VENDOR_ATTR_LL_STATS_CLR_CONFIG_STOP_RSP, 90 /* keep last */ 91 QCA_WLAN_VENDOR_ATTR_LL_STATS_CLR_AFTER_LAST, 92 QCA_WLAN_VENDOR_ATTR_LL_STATS_CLR_MAX = 93 QCA_WLAN_VENDOR_ATTR_LL_STATS_CLR_AFTER_LAST - 1, 94 }; 95 96 enum qca_wlan_vendor_attr_ll_stats_get 97 { 98 QCA_WLAN_VENDOR_ATTR_LL_STATS_GET_INVALID = 0, 99 /* Unsigned 32bit value provided by the caller issuing the GET stats 100 * command. When reporting the stats results, the driver uses the same 101 * value to indicate which GET request the results correspond to. 102 */ 103 QCA_WLAN_VENDOR_ATTR_LL_STATS_GET_CONFIG_REQ_ID, 104 /* Unsigned 32bit value - bit mask to identify what statistics are 105 * requested for retrieval. 106 * Radio Statistics 0x00000001 107 * Interface Statistics 0x00000020 108 * All Peer Statistics 0x00000040 109 * Peer Statistics 0x00000080 110 */ 111 QCA_WLAN_VENDOR_ATTR_LL_STATS_GET_CONFIG_REQ_MASK, 112 /* keep last */ 113 QCA_WLAN_VENDOR_ATTR_LL_STATS_GET_AFTER_LAST, 114 QCA_WLAN_VENDOR_ATTR_LL_STATS_GET_MAX = 115 QCA_WLAN_VENDOR_ATTR_LL_STATS_GET_AFTER_LAST - 1, 116 }; 117 118 enum qca_wlan_vendor_attr_ll_stats_results 119 { 120 QCA_WLAN_VENDOR_ATTR_LL_STATS_INVALID = 0, 121 /* Unsigned 32bit value. Used by the driver; must match the request id 122 * provided with the QCA_NL80211_VENDOR_SUBCMD_LL_STATS_GET command. 123 */ 124 QCA_WLAN_VENDOR_ATTR_LL_STATS_RESULTS_REQ_ID, 125 126 /* Unsigned 32bit value */ 127 QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_BEACON_RX, 128 /* Unsigned 32bit value */ 129 QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_MGMT_RX, 130 /* Unsigned 32bit value */ 131 QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_MGMT_ACTION_RX, 132 /* Unsigned 32bit value */ 133 QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_MGMT_ACTION_TX, 134 /* Unsigned 32bit value */ 135 QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_RSSI_MGMT, 136 /* Unsigned 32bit value */ 137 QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_RSSI_DATA, 138 /* Unsigned 32bit value */ 139 QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_RSSI_ACK, 140 141 /* Attributes of type QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_INFO_* are 142 * nested within the interface stats. 143 */ 144 145 /* Interface mode, e.g., STA, SOFTAP, IBSS, etc. 146 * Type = enum wifi_interface_mode. 147 */ 148 QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_INFO_MODE, 149 /* Interface MAC address. An array of 6 Unsigned int8 */ 150 QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_INFO_MAC_ADDR, 151 /* Type = enum wifi_connection_state, e.g., DISCONNECTED, 152 * AUTHENTICATING, etc. valid for STA, CLI only. 153 */ 154 QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_INFO_STATE, 155 /* Type = enum wifi_roam_state. Roaming state, e.g., IDLE or ACTIVE 156 */ 157 QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_INFO_ROAMING, 158 /* Unsigned 32bit value. WIFI_CAPABILITY_XXX */ 159 QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_INFO_CAPABILITIES, 160 /* NULL terminated SSID. An array of 33 Unsigned 8bit values */ 161 QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_INFO_SSID, 162 /* BSSID. An array of 6 Unsigned 8bit values */ 163 QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_INFO_BSSID, 164 /* Country string advertised by AP. An array of 3 Unsigned 8bit 165 * values. 166 */ 167 QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_INFO_AP_COUNTRY_STR, 168 /* Country string for this association. An array of 3 Unsigned 8bit 169 * values. 170 */ 171 QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_INFO_COUNTRY_STR, 172 173 /* Attributes of type QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_* could 174 * be nested within the interface stats. 175 */ 176 177 /* Type = enum wifi_traffic_ac, e.g., V0, VI, BE and BK */ 178 QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_AC, 179 /* Unsigned int 32 value corresponding to respective AC */ 180 QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_TX_MPDU, 181 /* Unsigned int 32 value corresponding to respective AC */ 182 QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_RX_MPDU, 183 /* Unsigned int 32 value corresponding to respective AC */ 184 QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_TX_MCAST, 185 /* Unsigned int 32 value corresponding to respective AC */ 186 QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_RX_MCAST, 187 /* Unsigned int 32 value corresponding to respective AC */ 188 QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_RX_AMPDU, 189 /* Unsigned int 32 value corresponding to respective AC */ 190 QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_TX_AMPDU, 191 /* Unsigned int 32 value corresponding to respective AC */ 192 QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_MPDU_LOST, 193 /* Unsigned int 32 value corresponding to respective AC */ 194 QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_RETRIES, 195 /* Unsigned int 32 value corresponding to respective AC */ 196 QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_RETRIES_SHORT, 197 /* Unsigned int 32 values corresponding to respective AC */ 198 QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_RETRIES_LONG, 199 /* Unsigned int 32 values corresponding to respective AC */ 200 QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_CONTENTION_TIME_MIN, 201 /* Unsigned int 32 values corresponding to respective AC */ 202 QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_CONTENTION_TIME_MAX, 203 /* Unsigned int 32 values corresponding to respective AC */ 204 QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_CONTENTION_TIME_AVG, 205 /* Unsigned int 32 values corresponding to respective AC */ 206 QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_CONTENTION_NUM_SAMPLES, 207 /* Unsigned 32bit value. Number of peers */ 208 QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_NUM_PEERS, 209 210 /* Attributes of type QCA_WLAN_VENDOR_ATTR_LL_STATS_PEER_INFO_* are 211 * nested within the interface stats. 212 */ 213 214 /* Type = enum wifi_peer_type. Peer type, e.g., STA, AP, P2P GO etc. */ 215 QCA_WLAN_VENDOR_ATTR_LL_STATS_PEER_INFO_TYPE, 216 /* MAC addr corresponding to respective peer. An array of 6 Unsigned 217 * 8bit values. 218 */ 219 QCA_WLAN_VENDOR_ATTR_LL_STATS_PEER_INFO_MAC_ADDRESS, 220 /* Unsigned int 32bit value representing capabilities corresponding 221 * to respective peer. 222 */ 223 QCA_WLAN_VENDOR_ATTR_LL_STATS_PEER_INFO_CAPABILITIES, 224 /* Unsigned 32bit value. Number of rates */ 225 QCA_WLAN_VENDOR_ATTR_LL_STATS_PEER_INFO_NUM_RATES, 226 227 /* Attributes of type QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_* 228 * are nested within the rate stat. 229 */ 230 231 /* Wi-Fi Rate - separate attributes defined for individual fields */ 232 233 /* Unsigned int 8bit value; 0: OFDM, 1:CCK, 2:HT 3:VHT 4..7 reserved */ 234 QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_PREAMBLE, 235 /* Unsigned int 8bit value; 0:1x1, 1:2x2, 3:3x3, 4:4x4 */ 236 QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_NSS, 237 /* Unsigned int 8bit value; 0:20MHz, 1:40Mhz, 2:80Mhz, 3:160Mhz */ 238 QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_BW, 239 /* Unsigned int 8bit value; OFDM/CCK rate code would be as per IEEE Std 240 * in the units of 0.5mbps HT/VHT it would be mcs index */ 241 QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_MCS_INDEX, 242 243 /* Unsigned 32bit value. Bit rate in units of 100Kbps */ 244 QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_BIT_RATE, 245 246 247 /* Attributes of type QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_STAT_* could be 248 * nested within the peer info stats. 249 */ 250 251 /* Unsigned int 32bit value. Number of successfully transmitted data pkts, 252 * i.e., with ACK received corresponding to the respective rate. 253 */ 254 QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_TX_MPDU, 255 /* Unsigned int 32bit value. Number of received data pkts corresponding 256 * to the respective rate. 257 */ 258 QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_RX_MPDU, 259 /* Unsigned int 32bit value. Number of data pkts losses, i.e., no ACK 260 * received corresponding to *the respective rate. 261 */ 262 QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_MPDU_LOST, 263 /* Unsigned int 32bit value. Total number of data pkt retries for the 264 * respective rate. 265 */ 266 QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_RETRIES, 267 /* Unsigned int 32bit value. Total number of short data pkt retries 268 * for the respective rate. 269 */ 270 QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_RETRIES_SHORT, 271 /* Unsigned int 32bit value. Total number of long data pkt retries 272 * for the respective rate. 273 */ 274 QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_RETRIES_LONG, 275 276 277 QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_ID, 278 /* Unsigned 32bit value. Total number of msecs the radio is awake 279 * accruing over time. 280 */ 281 QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_ON_TIME, 282 /* Unsigned 32bit value. Total number of msecs the radio is transmitting 283 * accruing over time. 284 */ 285 QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_TX_TIME, 286 /* Unsigned 32bit value. Total number of msecs the radio is in active 287 * receive accruing over time. 288 */ 289 QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_RX_TIME, 290 /* Unsigned 32bit value. Total number of msecs the radio is awake due 291 * to all scan accruing over time. 292 */ 293 QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_ON_TIME_SCAN, 294 /* Unsigned 32bit value. Total number of msecs the radio is awake due 295 * to NAN accruing over time. 296 */ 297 QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_ON_TIME_NBD, 298 /* Unsigned 32bit value. Total number of msecs the radio is awake due 299 * to GSCAN accruing over time. 300 */ 301 QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_ON_TIME_GSCAN, 302 /* Unsigned 32bit value. Total number of msecs the radio is awake due 303 * to roam scan accruing over time. 304 */ 305 QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_ON_TIME_ROAM_SCAN, 306 /* Unsigned 32bit value. Total number of msecs the radio is awake due 307 * to PNO scan accruing over time. 308 */ 309 QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_ON_TIME_PNO_SCAN, 310 /* Unsigned 32bit value. Total number of msecs the radio is awake due 311 * to HS2.0 scans and GAS *exchange accruing over time. 312 */ 313 QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_ON_TIME_HS20, 314 /* Unsigned 32bit value. Number of channels. */ 315 QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_NUM_CHANNELS, 316 317 /* Attributes of type QCA_WLAN_VENDOR_ATTR_LL_STATS_CHANNEL_INFO_* could 318 * be nested within the channel stats. 319 */ 320 321 /* Type = enum wifi_channel_width. Channel width, e.g., 20, 40, 80 */ 322 QCA_WLAN_VENDOR_ATTR_LL_STATS_CHANNEL_INFO_WIDTH, 323 /* Unsigned 32bit value. Primary 20MHz channel. */ 324 QCA_WLAN_VENDOR_ATTR_LL_STATS_CHANNEL_INFO_CENTER_FREQ, 325 /* Unsigned 32bit value. Center frequency (MHz) first segment. */ 326 QCA_WLAN_VENDOR_ATTR_LL_STATS_CHANNEL_INFO_CENTER_FREQ0, 327 /* Unsigned 32bit value. Center frequency (MHz) second segment. */ 328 QCA_WLAN_VENDOR_ATTR_LL_STATS_CHANNEL_INFO_CENTER_FREQ1, 329 330 /* Attributes of type QCA_WLAN_VENDOR_ATTR_LL_STATS_CHANNEL_* could be 331 * nested within the radio stats. 332 */ 333 334 /* Unsigned int 32bit value representing total number of msecs the radio 335 * is awake on that *channel accruing over time, corresponding to the 336 * respective channel. 337 */ 338 QCA_WLAN_VENDOR_ATTR_LL_STATS_CHANNEL_ON_TIME, 339 /* Unsigned int 32bit value representing total number of msecs the CCA 340 * register is busy accruing *over time corresponding to the respective 341 * channel. 342 */ 343 QCA_WLAN_VENDOR_ATTR_LL_STATS_CHANNEL_CCA_BUSY_TIME, 344 345 QCA_WLAN_VENDOR_ATTR_LL_STATS_NUM_RADIOS, 346 347 /* Signifies the nested list of channel attributes 348 * QCA_WLAN_VENDOR_ATTR_LL_STATS_CHANNEL_INFO_* 349 */ 350 QCA_WLAN_VENDOR_ATTR_LL_STATS_CH_INFO, 351 352 /* Signifies the nested list of peer info attributes 353 * QCA_WLAN_VENDOR_ATTR_LL_STATS_PEER_INFO_* 354 */ 355 QCA_WLAN_VENDOR_ATTR_LL_STATS_PEER_INFO, 356 357 /* Signifies the nested list of rate info attributes 358 * QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_* 359 */ 360 QCA_WLAN_VENDOR_ATTR_LL_STATS_PEER_INFO_RATE_INFO, 361 362 /* Signifies the nested list of wmm info attributes 363 * QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_* 364 */ 365 QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_INFO, 366 367 /* Unsigned 8bit value. Used by the driver; if set to 1, it indicates that 368 * more stats, e.g., peers or radio, are to follow in the next 369 * QCA_NL80211_VENDOR_SUBCMD_LL_STATS_*_RESULTS event. 370 * Otherwise, it is set to 0. 371 */ 372 QCA_WLAN_VENDOR_ATTR_LL_STATS_RESULTS_MORE_DATA, 373 374 /* keep last */ 375 QCA_WLAN_VENDOR_ATTR_LL_STATS_AFTER_LAST, 376 QCA_WLAN_VENDOR_ATTR_LL_STATS_MAX = QCA_WLAN_VENDOR_ATTR_LL_STATS_AFTER_LAST - 1, 377 }; 378 379 enum qca_wlan_vendor_attr_gscan_config_params 380 { 381 QCA_WLAN_VENDOR_ATTR_GSCAN_SUBCMD_CONFIG_PARAM_INVALID = 0, 382 383 /* Unsigned 32-bit value; Middleware provides it to the driver. Middle ware 384 * either gets it from caller, e.g., framework, or generates one if 385 * framework doesn't provide it. 386 */ 387 QCA_WLAN_VENDOR_ATTR_GSCAN_SUBCMD_CONFIG_PARAM_REQUEST_ID, 388 389 /* NL attributes for data used by 390 * QCA_NL80211_VENDOR_SUBCMD_GSCAN_GET_VALID_CHANNELS sub command. 391 */ 392 /* Unsigned 32-bit value */ 393 QCA_WLAN_VENDOR_ATTR_GSCAN_GET_VALID_CHANNELS_CONFIG_PARAM_WIFI_BAND, 394 /* Unsigned 32-bit value */ 395 QCA_WLAN_VENDOR_ATTR_GSCAN_GET_VALID_CHANNELS_CONFIG_PARAM_MAX_CHANNELS, 396 397 /* NL attributes for input params used by 398 * QCA_NL80211_VENDOR_SUBCMD_GSCAN_START sub command. 399 */ 400 401 /* Unsigned 32-bit value; channel frequency */ 402 QCA_WLAN_VENDOR_ATTR_GSCAN_CHANNEL_SPEC_CHANNEL, 403 /* Unsigned 32-bit value; dwell time in ms. */ 404 QCA_WLAN_VENDOR_ATTR_GSCAN_CHANNEL_SPEC_DWELL_TIME, 405 /* Unsigned 8-bit value; 0: active; 1: passive; N/A for DFS */ 406 QCA_WLAN_VENDOR_ATTR_GSCAN_CHANNEL_SPEC_PASSIVE, 407 /* Unsigned 8-bit value; channel class */ 408 QCA_WLAN_VENDOR_ATTR_GSCAN_CHANNEL_SPEC_CLASS, 409 410 /* Unsigned 8-bit value; bucket index, 0 based */ 411 QCA_WLAN_VENDOR_ATTR_GSCAN_BUCKET_SPEC_INDEX, 412 /* Unsigned 8-bit value; band. */ 413 QCA_WLAN_VENDOR_ATTR_GSCAN_BUCKET_SPEC_BAND, 414 /* Unsigned 32-bit value; desired period, in ms. */ 415 QCA_WLAN_VENDOR_ATTR_GSCAN_BUCKET_SPEC_PERIOD, 416 /* Unsigned 8-bit value; report events semantics. */ 417 QCA_WLAN_VENDOR_ATTR_GSCAN_BUCKET_SPEC_REPORT_EVENTS, 418 /* Unsigned 32-bit value. Followed by a nested array of GSCAN_CHANNEL_SPEC_* 419 * attributes. 420 */ 421 QCA_WLAN_VENDOR_ATTR_GSCAN_BUCKET_SPEC_NUM_CHANNEL_SPECS, 422 423 /* Array of QCA_WLAN_VENDOR_ATTR_GSCAN_CHANNEL_SPEC_* attributes. 424 * Array size: QCA_WLAN_VENDOR_ATTR_GSCAN_BUCKET_SPEC_NUM_CHANNEL_SPECS 425 */ 426 QCA_WLAN_VENDOR_ATTR_GSCAN_CHANNEL_SPEC, 427 428 /* Unsigned 32-bit value; base timer period in ms. */ 429 QCA_WLAN_VENDOR_ATTR_GSCAN_SCAN_CMD_PARAMS_BASE_PERIOD, 430 /* Unsigned 32-bit value; number of APs to store in each scan in the 431 * BSSID/RSSI history buffer (keep the highest RSSI APs). 432 */ 433 QCA_WLAN_VENDOR_ATTR_GSCAN_SCAN_CMD_PARAMS_MAX_AP_PER_SCAN, 434 /* Unsigned 8-bit value; In %, when scan buffer is this much full, wake up 435 * APPS. 436 */ 437 QCA_WLAN_VENDOR_ATTR_GSCAN_SCAN_CMD_PARAMS_REPORT_THRESHOLD, 438 /* Unsigned 8-bit value; number of scan bucket specs; followed by a nested 439 * array of_GSCAN_BUCKET_SPEC_* attributes and values. The size of the 440 * array is determined by NUM_BUCKETS. 441 */ 442 QCA_WLAN_VENDOR_ATTR_GSCAN_SCAN_CMD_PARAMS_NUM_BUCKETS, 443 444 /* Array of QCA_WLAN_VENDOR_ATTR_GSCAN_BUCKET_SPEC_* attributes. 445 * Array size: QCA_WLAN_VENDOR_ATTR_GSCAN_SCAN_CMD_PARAMS_NUM_BUCKETS 446 */ 447 QCA_WLAN_VENDOR_ATTR_GSCAN_BUCKET_SPEC, 448 449 /* Unsigned 8-bit value */ 450 QCA_WLAN_VENDOR_ATTR_GSCAN_GET_CACHED_SCAN_RESULTS_CONFIG_PARAM_FLUSH, 451 /* Unsigned 32-bit value; maximum number of results to be returned. */ 452 QCA_WLAN_VENDOR_ATTR_GSCAN_GET_CACHED_SCAN_RESULTS_CONFIG_PARAM_MAX, 453 454 /* An array of 6 x Unsigned 8-bit value */ 455 QCA_WLAN_VENDOR_ATTR_GSCAN_AP_THRESHOLD_PARAM_BSSID, 456 /* Signed 32-bit value */ 457 QCA_WLAN_VENDOR_ATTR_GSCAN_AP_THRESHOLD_PARAM_RSSI_LOW, 458 /* Signed 32-bit value */ 459 QCA_WLAN_VENDOR_ATTR_GSCAN_AP_THRESHOLD_PARAM_RSSI_HIGH, 460 /* Unsigned 32-bit value */ 461 QCA_WLAN_VENDOR_ATTR_GSCAN_AP_THRESHOLD_PARAM_CHANNEL, 462 463 464 /* Number of hotlist APs as unsigned 32-bit value, followed by a nested array of 465 * AP_THRESHOLD_PARAM attributes and values. The size of the array is 466 * determined by NUM_AP. 467 */ 468 QCA_WLAN_VENDOR_ATTR_GSCAN_BSSID_HOTLIST_PARAMS_NUM_AP, 469 470 /* Array of QCA_WLAN_VENDOR_ATTR_GSCAN_AP_THRESHOLD_PARAM_* attributes. 471 * Array size: QCA_WLAN_VENDOR_ATTR_GSCAN_BUCKET_SPEC_NUM_CHANNEL_SPECS 472 */ 473 QCA_WLAN_VENDOR_ATTR_GSCAN_AP_THRESHOLD_PARAM, 474 475 /* Unsigned 32bit value; number of samples for averaging RSSI. */ 476 QCA_WLAN_VENDOR_ATTR_GSCAN_SIGNIFICANT_CHANGE_PARAMS_RSSI_SAMPLE_SIZE, 477 /* Unsigned 32bit value; number of samples to confirm AP loss. */ 478 QCA_WLAN_VENDOR_ATTR_GSCAN_SIGNIFICANT_CHANGE_PARAMS_LOST_AP_SAMPLE_SIZE, 479 /* Unsigned 32bit value; number of APs breaching threshold. */ 480 QCA_WLAN_VENDOR_ATTR_GSCAN_SIGNIFICANT_CHANGE_PARAMS_MIN_BREACHING, 481 /* Unsigned 32bit value; number of APs. Followed by an array of 482 * AP_THRESHOLD_PARAM attributes. Size of the array is NUM_AP. 483 */ 484 QCA_WLAN_VENDOR_ATTR_GSCAN_SIGNIFICANT_CHANGE_PARAMS_NUM_AP, 485 486 /* keep last */ 487 QCA_WLAN_VENDOR_ATTR_GSCAN_SUBCMD_CONFIG_PARAM_AFTER_LAST, 488 QCA_WLAN_VENDOR_ATTR_GSCAN_SUBCMD_CONFIG_PARAM_MAX = 489 QCA_WLAN_VENDOR_ATTR_GSCAN_SUBCMD_CONFIG_PARAM_AFTER_LAST - 1, 490 491 }; 492 493 enum qca_wlan_vendor_attr_gscan_results 494 { 495 QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_INVALID = 0, 496 497 /* Unsigned 32-bit value; must match the request Id supplied by Wi-Fi HAL 498 * in the corresponding subcmd NL msg 499 */ 500 QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_REQUEST_ID, 501 502 /* Unsigned 32-bit value; used to indicate the status response from 503 * firmware/driver for the vendor sub-command. 504 */ 505 QCA_WLAN_VENDOR_ATTR_GSCAN_STATUS, 506 507 /* GSCAN Valid Channels attributes */ 508 /* Unsigned 32bit value; followed by a nested array of CHANNELS. 509 */ 510 QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_NUM_CHANNELS, 511 /* An array of NUM_CHANNELS x Unsigned 32bit value integers representing 512 * channel numbers 513 */ 514 QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_CHANNELS, 515 516 /* GSCAN Capabilities attributes */ 517 /* Unsigned 32bit value */ 518 QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_CAPABILITIES_MAX_SCAN_CACHE_SIZE, 519 /* Unsigned 32bit value */ 520 QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_CAPABILITIES_MAX_SCAN_BUCKETS, 521 /* Unsigned 32bit value */ 522 QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_CAPABILITIES_MAX_AP_CACHE_PER_SCAN, 523 /* Unsigned 32bit value */ 524 QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_CAPABILITIES_MAX_RSSI_SAMPLE_SIZE, 525 /* Signed 32bit value */ 526 QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_CAPABILITIES_MAX_SCAN_REPORTING_THRESHOLD, 527 /* Unsigned 32bit value */ 528 QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_CAPABILITIES_MAX_HOTLIST_APS, 529 /* Unsigned 32bit value */ 530 QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_CAPABILITIES_MAX_SIGNIFICANT_WIFI_CHANGE_APS, 531 /* Unsigned 32bit value */ 532 QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_CAPABILITIES_MAX_BSSID_HISTORY_ENTRIES, 533 534 /* GSCAN Attributes used with 535 * QCA_NL80211_VENDOR_SUBCMD_GSCAN_SCAN_RESULTS_AVAILABLE sub-command. 536 */ 537 538 /* Unsigned 32-bit value */ 539 QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_NUM_RESULTS_AVAILABLE, 540 541 542 /* GSCAN attributes used with 543 * QCA_NL80211_VENDOR_SUBCMD_GSCAN_FULL_SCAN_RESULT sub-command. 544 */ 545 546 /* An array of NUM_RESULTS_AVAILABLE x 547 * QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_SCAN_RESULT_* 548 */ 549 QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_LIST, 550 551 /* Unsigned 64-bit value; age of sample at the time of retrieval */ 552 QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_SCAN_RESULT_TIME_STAMP, 553 /* 33 x unsiged 8-bit value; NULL terminated SSID */ 554 QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_SCAN_RESULT_SSID, 555 /* An array of 6 x Unsigned 8-bit value */ 556 QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_SCAN_RESULT_BSSID, 557 /* Unsigned 32-bit value; channel frequency in MHz */ 558 QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_SCAN_RESULT_CHANNEL, 559 /* Signed 32-bit value */ 560 QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_SCAN_RESULT_RSSI, 561 /* Unsigned 32-bit value */ 562 QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_SCAN_RESULT_RTT, 563 /* Unsigned 32-bit value */ 564 QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_SCAN_RESULT_RTT_SD, 565 /* Unsigned 16-bit value */ 566 QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_SCAN_RESULT_BEACON_PERIOD, 567 /* Unsigned 16-bit value */ 568 QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_SCAN_RESULT_CAPABILITY, 569 /* Unsigned 32-bit value; size of the IE DATA blob */ 570 QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_SCAN_RESULT_IE_LENGTH, 571 /* An array of IE_LENGTH x Unsigned 8-bit value; blob of all the 572 * information elements found in the beacon; this data should be a 573 * packed list of wifi_information_element objects, one after the 574 * other. 575 */ 576 QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_SCAN_RESULT_IE_DATA, 577 578 /* Unsigned 8-bit value; set by driver to indicate more scan results are 579 * available. 580 */ 581 QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_SCAN_RESULT_MORE_DATA, 582 583 /* GSCAN attributes for 584 * QCA_NL80211_VENDOR_SUBCMD_GSCAN_SCAN_EVENT sub-command. 585 */ 586 /* Unsigned 8-bit value */ 587 QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_SCAN_EVENT_TYPE, 588 /* Unsigned 32-bit value */ 589 QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_SCAN_EVENT_STATUS, 590 591 /* GSCAN attributes for 592 * QCA_NL80211_VENDOR_SUBCMD_GSCAN_HOTLIST_AP_FOUND sub-command. 593 */ 594 /* Use attr QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_NUM_RESULTS_AVAILABLE 595 * to indicate number of results. 596 * Also, use QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_LIST to indicate the list 597 * of results. 598 */ 599 600 /* GSCAN attributes for 601 * QCA_NL80211_VENDOR_SUBCMD_GSCAN_SIGNIFICANT_CHANGE sub-command. 602 */ 603 /* An array of 6 x Unsigned 8-bit value */ 604 QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_SIGNIFICANT_CHANGE_RESULT_BSSID, 605 /* Unsigned 32-bit value */ 606 QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_SIGNIFICANT_CHANGE_RESULT_CHANNEL, 607 /* Unsigned 32-bit value. 608 */ 609 QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_SIGNIFICANT_CHANGE_RESULT_NUM_RSSI, 610 /* A nested array of signed 32-bit RSSI values. Size of the array is determined by 611 * (NUM_RSSI of SIGNIFICANT_CHANGE_RESULT_NUM_RSSI. 612 */ 613 QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_SIGNIFICANT_CHANGE_RESULT_RSSI_LIST, 614 615 /* keep last */ 616 QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_AFTER_LAST, 617 QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_MAX = 618 QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_AFTER_LAST - 1, 619 }; 620 621 #endif 622