1 /* 2 * Copyright (c) 2012-2015,2020-2021 The Linux Foundation. All rights reserved. 3 * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 */ 17 18 /** 19 * DOC: wlan_cm_public_struct.h 20 * 21 * This header file maintain public structures required for connection mgr 22 */ 23 24 #ifndef __WLAN_CM_PUBLIC_STRUCT_H__ 25 #define __WLAN_CM_PUBLIC_STRUCT_H__ 26 27 #include <wlan_scan_public_structs.h> 28 #include "wlan_crypto_global_def.h" 29 #include "qdf_status.h" 30 #ifdef WLAN_FEATURE_11BE_MLO 31 #include <wlan_mlo_mgr_public_structs.h> 32 #endif 33 34 #define CM_ID_INVALID 0xFFFFFFFF 35 typedef uint32_t wlan_cm_id; 36 37 /* Diconnect active timeout */ 38 #define DISCONNECT_TIMEOUT \ 39 ((STOP_RESPONSE_TIMER) + (DELETE_RESPONSE_TIMER) +\ 40 (RSO_STOP_RESPONSE_TIMER) + (1000)) 41 42 /* 43 * Disconnect command wait timeout VDEV timeouts + 5 sec buff for current active 44 * command to complete 45 */ 46 #define CM_DISCONNECT_CMD_TIMEOUT DISCONNECT_TIMEOUT + 5000 47 48 /** 49 * struct wlan_cm_wep_key_params - store wep key info 50 * @key: key info 51 * @seq: seq info 52 * @key_len: key length 53 * @seq_len: seq len 54 * @key_idx: key index 55 */ 56 struct wlan_cm_wep_key_params { 57 uint8_t *key; 58 uint8_t *seq; 59 uint8_t key_len; 60 uint8_t seq_len; 61 uint8_t key_idx; 62 }; 63 64 /** 65 * struct wlan_cm_connect_crypto_info - Crypto settings 66 * @wpa_versions: indicates which, if any, WPA versions are enabled 67 * (from enum nl80211_wpa_versions) 68 * @auth_type: Auth mode type bitmask 69 * @group_cipher: group key cipher suite bitmask 70 * @ciphers_pairwise: unicast key cipher suites bitmask 71 * @akm_suites: AKM suites bitmask 72 * @wep_keys: static WEP keys, if not NULL points to an array of 73 * MAX_WEP_KEYS WEP keys 74 * @rsn_caps: rsn caps 75 * @mgmt_ciphers: mgmt cipher bitmask 76 */ 77 struct wlan_cm_connect_crypto_info { 78 uint32_t wpa_versions; 79 uint32_t auth_type; 80 uint32_t group_cipher; 81 uint32_t ciphers_pairwise; 82 uint32_t akm_suites; 83 struct wlan_cm_wep_key_params wep_keys; 84 uint16_t rsn_caps; 85 uint32_t mgmt_ciphers; 86 }; 87 88 #ifdef WLAN_FEATURE_FILS_SK 89 #define WLAN_CM_FILS_MAX_KEYNAME_NAI_LENGTH 253 90 #define WLAN_CM_FILS_MAX_REALM_LEN 255 91 #define WLAN_CM_FILS_MAX_RRK_LENGTH 64 92 93 /** 94 * enum wlan_fils_auth_type - fils auth type info 95 * @FILS_SK_WITHOUT_PFS: without pfs 96 * @FILS_SK_WITH_PFS: with pfs 97 * @FILS_PK_AUTH: fils auth 98 * @FILS_PK_MAX: max value 99 */ 100 enum wlan_fils_auth_type { 101 FILS_SK_WITHOUT_PFS, 102 FILS_SK_WITH_PFS, 103 FILS_PK_AUTH, 104 FILS_PK_MAX, 105 }; 106 107 /** 108 * struct wlan_fils_con_info - fils connect req info 109 * @is_fils_connection: is fils connection 110 * @username_len: username length 111 * @username: username 112 * @realm_len: realm length 113 * @realm: realm 114 * @next_seq_num: next seq number 115 * @rrk_len: rrk length 116 * @rrk: rrk 117 * @auth_type: FILS authentication type 118 */ 119 struct wlan_fils_con_info { 120 bool is_fils_connection; 121 uint32_t username_len; 122 uint8_t username[WLAN_CM_FILS_MAX_KEYNAME_NAI_LENGTH]; 123 uint32_t realm_len; 124 uint8_t realm[WLAN_CM_FILS_MAX_REALM_LEN]; 125 uint16_t next_seq_num; 126 uint32_t rrk_len; 127 uint8_t rrk[WLAN_CM_FILS_MAX_RRK_LENGTH]; 128 enum wlan_fils_auth_type auth_type; 129 }; 130 #endif 131 132 /** 133 * enum wlan_cm_source - connection manager req source 134 * @CM_OSIF_CONNECT: Connect req initiated by OSIF or north bound 135 * @CM_ROAMING_HOST: Roaming request initiated by host 136 * @CM_ROAMING_NUD_FAILURE: Roaming request initiated by NUD failure 137 * @CM_ROAMING_FW: Roam req initiated by FW 138 * @CM_OSIF_DISCONNECT: Disconnect req initiated by OSIF or north bound 139 * @CM_PEER_DISCONNECT: Disconnect req initiated by peer sending deauth/disassoc 140 * only for this localy generated will be false while indicating to kernel 141 * @CM_SB_DISCONNECT: Disconnect initiated from firmware. eg HB failure, 142 * sta kickout etc 143 * @CM_MLME_DISCONNECT: Disconnect req initiated by mlme. eg VDEV mgr or any 144 * other mlme component. 145 * @CM_INTERNAL_DISCONNECT: Internal disconnect initiated by Connection manager 146 * on receiving the back to back commands 147 * @CM_ROAM_DISCONNECT: Disconnect req due to HO failure 148 * @CM_OSIF_CFG_CONNECT: Connect request initiated due to config change 149 * @CM_OSIF_CFG_DISCONNECT: Disconnect request initiated due to config change 150 * @CM_MLO_LINK_VDEV_DISCONNECT: Disconnect req for ML link 151 * @CM_MLO_LINK_VDEV_CONNECT: Connect req for ML link 152 * @CM_MLO_ROAM_INTERNAL_DISCONNECT: Disconnect req triggered for mlo roaming 153 * @CM_SOURCE_MAX: max value of connection manager source 154 * @CM_SOURCE_INVALID: Invalid connection manager req source 155 */ 156 enum wlan_cm_source { 157 CM_OSIF_CONNECT, 158 CM_ROAMING_HOST, 159 CM_ROAMING_NUD_FAILURE, 160 CM_ROAMING_FW, 161 CM_OSIF_DISCONNECT, 162 CM_PEER_DISCONNECT, 163 CM_SB_DISCONNECT, 164 CM_MLME_DISCONNECT, 165 CM_INTERNAL_DISCONNECT, 166 CM_ROAM_DISCONNECT, 167 CM_OSIF_CFG_CONNECT, 168 CM_OSIF_CFG_DISCONNECT, 169 CM_MLO_LINK_VDEV_DISCONNECT, 170 CM_MLO_LINK_VDEV_CONNECT, 171 CM_MLO_ROAM_INTERNAL_DISCONNECT, 172 CM_SOURCE_MAX, 173 CM_SOURCE_INVALID = CM_SOURCE_MAX, 174 }; 175 176 /** 177 * struct wlan_cm_connect_req - connect req from requester 178 * @vdev_id: vdev id 179 * @source: source of the req 180 * @bssid: bssid given 181 * @prev_bssid: prev AP bssid, given in case supplican want to roam to new BSSID 182 * @ssid: profile SSID 183 * @bssid_hint: bssid hint to connect 184 * @chan_freq: channel of the AP 185 * @chan_freq_hint: channel hint 186 * @crypto: crypto related info 187 * @assoc_ie:Additional assoc IE to be appended in assoc req 188 * (Include RSN/WPA/WAPI/WPS ies) 189 * @scan_ie: Default scan ie to be used in the uncast probe req and connect scan 190 * @force_rsne_override: force the arbitrary rsne received in connect req to be 191 * used with out validation, used for the scenarios where the device is used 192 * as a testbed device with special functionality and not recommended 193 * for production. 194 * @is_wps_connection: if its wps connection 195 * @is_osen_connection: if its osen connection 196 * @reassoc_in_non_connected: if reassoc received in non connected 197 * @dot11mode_filter: dot11mode filter used to restrict connection to 198 * 11n/11ac/11ax. 199 * @sae_pwe: SAE mechanism for PWE derivation 200 * 0 = hunting-and-pecking loop only 201 * 1 = hash-to-element only 202 * 2 = both hunting-and-pecking loop and hash-to-element enabled 203 * @ht_caps: ht capability information bit mask 204 * @ht_caps_mask: mask of valid ht caps 205 * @vht_caps: vht capability information bit mask 206 * @vht_caps_mask: mask of valid vht caps 207 * @fils_info: Fills related connect info 208 * @is_non_assoc_link: non assoc link 209 * @ml_parnter_info: ml partner link info 210 */ 211 struct wlan_cm_connect_req { 212 uint8_t vdev_id; 213 enum wlan_cm_source source; 214 struct qdf_mac_addr bssid; 215 struct qdf_mac_addr prev_bssid; 216 struct wlan_ssid ssid; 217 struct qdf_mac_addr bssid_hint; 218 qdf_freq_t chan_freq; 219 qdf_freq_t chan_freq_hint; 220 struct wlan_cm_connect_crypto_info crypto; 221 struct element_info assoc_ie; 222 struct element_info scan_ie; 223 uint8_t force_rsne_override:1, 224 is_wps_connection:1, 225 is_osen_connection:1, 226 reassoc_in_non_connected:1; 227 enum dot11_mode_filter dot11mode_filter; 228 uint8_t sae_pwe; 229 uint16_t ht_caps; 230 uint16_t ht_caps_mask; 231 uint32_t vht_caps; 232 uint32_t vht_caps_mask; 233 #ifdef WLAN_FEATURE_FILS_SK 234 struct wlan_fils_con_info fils_info; 235 #endif 236 bool is_non_assoc_link; 237 #ifdef WLAN_FEATURE_11BE_MLO 238 struct mlo_partner_info ml_parnter_info; 239 #endif 240 }; 241 242 /** 243 * struct wlan_cm_vdev_connect_req - connect req from connection manager to 244 * vdev mgr 245 * @vdev_id: vdev id 246 * @cm_id: Connect manager id 247 * @force_rsne_override: force the arbitrary rsne received in connect req to be 248 * used with out validation, used for the scenarios where the device is used 249 * as a testbed device with special functionality and not recommended 250 * for production. 251 * @is_wps_connection: if its wps connection 252 * @is_osen_connection: if its osen connection 253 * @ht_caps: ht capability 254 * @ht_caps_mask: mask of valid ht caps 255 * @vht_caps: vht capability 256 * @vht_caps_mask: mask of valid vht caps 257 * @assoc_ie: assoc ie to be used in assoc req 258 * @scan_ie: Default scan ie to be used in the uncast probe req 259 * @bss: scan entry for the candidate 260 * @fils_info: Fills related connect info 261 * @is_non_assoc_link: non assoc link 262 * @ml_parnter_info: ml partner link info 263 * @owe_trans_ssid: owe trans ssid to be used when scan entry ssid is wildcard 264 */ 265 struct wlan_cm_vdev_connect_req { 266 uint8_t vdev_id; 267 wlan_cm_id cm_id; 268 uint8_t force_rsne_override:1, 269 is_wps_connection:1, 270 is_osen_connection:1; 271 uint16_t ht_caps; 272 uint16_t ht_caps_mask; 273 uint32_t vht_caps; 274 uint32_t vht_caps_mask; 275 struct element_info assoc_ie; 276 struct element_info scan_ie; 277 struct scan_cache_node *bss; 278 #ifdef WLAN_FEATURE_FILS_SK 279 struct wlan_fils_con_info *fils_info; 280 #endif 281 bool is_non_assoc_link; 282 #ifdef WLAN_FEATURE_11BE_MLO 283 struct mlo_partner_info ml_parnter_info; 284 #endif 285 struct wlan_ssid owe_trans_ssid; 286 }; 287 288 /** 289 * struct wlan_cm_roam_req - roam req from requester 290 * @forced_roaming: Roaming to be done without giving bssid, and channel. 291 * @self_reassoc: used to determine self reassoc in host roaming 292 * @vdev_id: vdev id 293 * @source: source of the req 294 * @bssid: bssid given 295 * @prev_bssid: prev AP bssid, given in case supplican want to roam to new BSSID 296 * @chan_freq: channel of the AP 297 */ 298 struct wlan_cm_roam_req { 299 uint8_t forced_roaming:1, 300 self_reassoc:1; 301 uint8_t vdev_id; 302 enum wlan_cm_source source; 303 struct qdf_mac_addr bssid; 304 struct qdf_mac_addr prev_bssid; 305 uint32_t chan_freq; 306 }; 307 308 /** 309 * struct wlan_cm_vdev_reassoc_req - Reassoc req from connection manager to 310 * vdev mgr 311 * @vdev_id: vdev id 312 * @cm_id: Connect manager id 313 * @self_reassoc: if self reassoc 314 * @prev_bssid: previous BSSID 315 * @bss: scan entry for the candidate 316 */ 317 struct wlan_cm_vdev_reassoc_req { 318 uint8_t vdev_id; 319 wlan_cm_id cm_id; 320 bool self_reassoc; 321 struct qdf_mac_addr prev_bssid; 322 struct scan_cache_node *bss; 323 }; 324 325 /** 326 * struct wlan_cm_disconnect_req - disconnect req from requester 327 * @vdev_id: vdev id 328 * @source: source of disconnect 329 * @reason_code: protocol/propitiatory reason code of the disconnect. 330 * propitiatory will be used to send in 331 * QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_DRIVER_DISCONNECT_REASON 332 * @bssid: bssid of AP 333 * @is_no_disassoc_disconnect: Is disassoc required 334 */ 335 struct wlan_cm_disconnect_req { 336 uint8_t vdev_id; 337 enum wlan_cm_source source; 338 enum wlan_reason_code reason_code; 339 struct qdf_mac_addr bssid; 340 bool is_no_disassoc_disconnect; 341 }; 342 343 /** 344 * struct wlan_cm_vdev_discon_req - disconnect req from connection manager to 345 * vdev mgr 346 * @cm_id: connection manager ID 347 * @req: disconnect req 348 */ 349 struct wlan_cm_vdev_discon_req { 350 wlan_cm_id cm_id; 351 struct wlan_cm_disconnect_req req; 352 }; 353 354 /* 355 * enum wlan_cm_connect_fail_reason: connection manager connect fail reason 356 * @CM_NO_CANDIDATE_FOUND: No candidate found 357 * @CM_ABORT_DUE_TO_NEW_REQ_RECVD: Aborted as new command is received and 358 * @CM_BSS_SELECT_IND_FAILED: Failed BSS select indication 359 * State machine is not able to handle as state has changed due to new command. 360 * @CM_PEER_CREATE_FAILED: peer create failed 361 * @CM_JOIN_FAILED: Failed in joining state 362 * (BSS peer creation or other handling) 363 * @CM_JOIN_TIMEOUT: Did not receive beacon or probe response after unicast 364 * probe request 365 * @CM_AUTH_FAILED: Auth rejected by AP 366 * @CM_AUTH_TIMEOUT: No Auth resp from AP 367 * @CM_ASSOC_FAILED: Assoc rejected by AP 368 * @CM_ASSOC_TIMEOUT: No Assoc resp from AP 369 * @CM_HW_MODE_FAILURE: failed to change HW mode 370 * @CM_SER_FAILURE: Failed to serialize command 371 * @CM_SER_TIMEOUT: Serialization cmd timeout 372 * @CM_GENERIC_FAILURE: Generic failure apart from above 373 * @CM_VALID_CANDIDATE_CHECK_FAIL: Valid Candidate Check fail 374 */ 375 enum wlan_cm_connect_fail_reason { 376 CM_NO_CANDIDATE_FOUND, 377 CM_ABORT_DUE_TO_NEW_REQ_RECVD, 378 CM_BSS_SELECT_IND_FAILED, 379 CM_PEER_CREATE_FAILED, 380 CM_JOIN_FAILED, 381 CM_JOIN_TIMEOUT, 382 CM_AUTH_FAILED, 383 CM_AUTH_TIMEOUT, 384 CM_ASSOC_FAILED, 385 CM_ASSOC_TIMEOUT, 386 CM_HW_MODE_FAILURE, 387 CM_SER_FAILURE, 388 CM_SER_TIMEOUT, 389 CM_GENERIC_FAILURE, 390 CM_VALID_CANDIDATE_CHECK_FAIL, 391 }; 392 393 #ifdef WLAN_FEATURE_FILS_SK 394 #define CM_FILS_MAX_HLP_DATA_LEN 2048 395 #define MAX_TK_LENGTH 32 396 #define MAX_GTK_LENGTH 255 397 398 /** 399 * struct fils_connect_rsp_params - fils related connect rsp params 400 * @fils_pmk: fils pmk 401 * @fils_pmk_len: fils pmk length 402 * @fils_pmkid: fils pmkid 403 * @kek: kek 404 * @kek_len: kek length 405 * @tk: tk 406 * @tk_len: tk length 407 * @gtk: gtk 408 * @gtk_len: gtk length 409 * @dst_mac: dst mac 410 * @src_mac: src mac 411 * @hlp_data: hlp data 412 * @hlp_data_len: hlp data length 413 * @fils_seq_num: FILS sequence number 414 */ 415 struct fils_connect_rsp_params { 416 uint8_t *fils_pmk; 417 uint8_t fils_pmk_len; 418 uint8_t fils_pmkid[PMKID_LEN]; 419 uint8_t kek[MAX_KEK_LENGTH]; 420 uint8_t kek_len; 421 uint8_t tk[MAX_TK_LENGTH]; 422 uint8_t tk_len; 423 uint8_t gtk[MAX_GTK_LENGTH]; 424 uint8_t gtk_len; 425 struct qdf_mac_addr dst_mac; 426 struct qdf_mac_addr src_mac; 427 uint8_t hlp_data[CM_FILS_MAX_HLP_DATA_LEN]; 428 uint16_t hlp_data_len; 429 uint16_t fils_seq_num; 430 }; 431 #endif 432 433 /** 434 * struct wlan_connect_rsp_ies - connect rsp ies stored in vdev filled during 435 * connect 436 * @bcn_probe_rsp: Raw beacon or probe rsp of connected AP 437 * @link_bcn_probe_rsp: Raw beacon or probe rsp of connected non-assoc link 438 * @assoc_req: assoc req IE pointer send during connect 439 * @assoc_rsp: assoc rsp IE received during connection 440 * @fils_ie: fills connection ie received during connection 441 */ 442 struct wlan_connect_rsp_ies { 443 struct element_info bcn_probe_rsp; 444 struct element_info link_bcn_probe_rsp; 445 struct element_info assoc_req; 446 struct element_info assoc_rsp; 447 #ifdef WLAN_FEATURE_FILS_SK 448 struct fils_connect_rsp_params *fils_ie; 449 #endif 450 }; 451 452 #ifdef WLAN_FEATURE_ROAM_OFFLOAD 453 /** 454 * struct wlan_roam_sync_info - roam sync information populated 455 * from roam sync indication struct 456 * @auth_status: roam auth status (authenticated or connected) 457 * @kck_len: kck length 458 * @kck: kck info in roam sync 459 * @kek_len: kek length 460 * @kek: kek info in roam sync 461 * @replay_ctr: replay counter 462 * @subnet_change_status: if subnet has changed. 463 * 0 = unchanged 464 * 1 = changed 465 * 2 = unknown 466 * @roam_reason: reason of roaming 467 * @pmk_len: fils pmk length 468 * @pmk: fils pmk info 469 * @pmkid: fils pmkid 470 * @update_erp_next_seq_num: if seq update required 471 * @next_erp_seq_num: next seq number 472 */ 473 struct wlan_roam_sync_info { 474 uint8_t auth_status; 475 uint8_t kck_len; 476 uint8_t kck[MAX_KCK_LEN]; 477 uint8_t kek_len; 478 uint8_t kek[MAX_KEK_LENGTH]; 479 uint8_t replay_ctr[REPLAY_CTR_LEN]; 480 uint8_t subnet_change_status; 481 uint16_t roam_reason; 482 uint32_t pmk_len; 483 uint8_t pmk[MAX_PMK_LEN]; 484 uint8_t pmkid[PMKID_LEN]; 485 bool update_erp_next_seq_num; 486 uint16_t next_erp_seq_num; 487 }; 488 #endif 489 490 /** 491 * struct wlan_cm_connect_resp - connect resp from VDEV mgr and will be sent to 492 * OSIF 493 * @vdev_id: vdev id 494 * @is_wps_connection: if its wps connection 495 * @is_osen_connection: if its osen connection 496 * @is_reassoc: if response is for reassoc/roam 497 * @is_ft: is FT reassoc 498 * @is_assoc: if response is for assoc 499 * @send_disconnect: if disconnect needed to sent to kernel, for reassoc 500 * received in non connected state, this is to cleanup kernel 501 * @cm_id: Connect manager id 502 * @bssid: BSSID of the ap 503 * @ssid: SSID of the connection 504 * @freq: Channel frequency 505 * @connect_status: connect status success or failure 506 * @reason: connect fail reason, valid only in case of failure 507 * @status_code: protocol status code received in auth/assoc resp 508 * @aid: aid 509 * @connect_ies: connect related IE required by osif to send to kernel 510 * @roaming_info: roam sync info received 511 * @is_fils_connection: is fils connection 512 * @ml_parnter_info: ml partner link info 513 */ 514 struct wlan_cm_connect_resp { 515 uint8_t vdev_id; 516 uint8_t is_wps_connection:1, 517 is_osen_connection:1, 518 is_reassoc:1, 519 is_ft:1, 520 is_assoc:1, 521 send_disconnect:1; 522 wlan_cm_id cm_id; 523 struct qdf_mac_addr bssid; 524 struct wlan_ssid ssid; 525 qdf_freq_t freq; 526 QDF_STATUS connect_status; 527 enum wlan_cm_connect_fail_reason reason; 528 enum wlan_status_code status_code; 529 uint8_t aid; 530 struct wlan_connect_rsp_ies connect_ies; 531 #ifdef WLAN_FEATURE_ROAM_OFFLOAD 532 struct wlan_roam_sync_info *roaming_info; 533 #endif 534 #ifdef WLAN_FEATURE_FILS_SK 535 bool is_fils_connection; 536 #endif 537 #ifdef WLAN_FEATURE_11BE_MLO 538 struct mlo_partner_info ml_parnter_info; 539 #endif 540 }; 541 542 #ifdef WLAN_VENDOR_HANDOFF_CONTROL 543 /* As per enum vendor_control_roam_param */ 544 #define MAX_VENDOR_CONTROL_PARAMS 8 545 546 /** 547 * enum vendor_control_roam_param - vendor control roam parameters 548 * @VENDOR_CONTROL_PARAM_ROAM_TRIGGER: roam trigger 549 * @VENDOR_CONTROL_PARAM_ROAM_DELTA: roam delta 550 * @VENDOR_CONTROL_PARAM_ROAM_FULL_SCANPERIOD: full scan period 551 * @VENDOR_CONTROL_PARAM_ROAM_PARTIAL_SCANPERIOD: partial scan period 552 * @VENDOR_CONTROL_PARAM_ROAM_ACTIVE_CH_DWELLTIME: active ch dwell time 553 * @VENDOR_CONTROL_PARAM_ROAM_PASSIVE_CH_DWELLTIME: passive ch dwell time 554 * @VENDOR_CONTROL_PARAM_ROAM_HOME_CH_TIME: home ch dwell time 555 * @VENDOR_CONTROL_PARAM_ROAM_AWAY_TIME: away time 556 * @VENDOR_CONTROL_PARAM_ROAM_ALL: Sending query for all params of 557 * enum vendor_control_roam_param 558 */ 559 enum vendor_control_roam_param { 560 VENDOR_CONTROL_PARAM_ROAM_TRIGGER = 1, 561 VENDOR_CONTROL_PARAM_ROAM_DELTA, 562 VENDOR_CONTROL_PARAM_ROAM_FULL_SCANPERIOD, 563 VENDOR_CONTROL_PARAM_ROAM_PARTIAL_SCANPERIOD, 564 VENDOR_CONTROL_PARAM_ROAM_ACTIVE_CH_DWELLTIME, 565 VENDOR_CONTROL_PARAM_ROAM_PASSIVE_CH_DWELLTIME, 566 VENDOR_CONTROL_PARAM_ROAM_HOME_CH_TIME, 567 VENDOR_CONTROL_PARAM_ROAM_AWAY_TIME, 568 VENDOR_CONTROL_PARAM_ROAM_ALL = 0xFFFFFFFF, 569 }; 570 571 /* 572 * struct roam_param_info: vendor handoff related parameters 573 * @param_id: vendor control Param ID from enum 574 * vendor_control_roam_param 575 * @param_value: vendor control param value 576 */ 577 struct roam_param_info { 578 enum vendor_control_roam_param param_id; 579 uint32_t param_value; 580 }; 581 582 /* 583 * struct roam_vendor_handoff_params: vendor handoff parameters 584 * @vdev_id : vdev id 585 * @num_entries: num of tlv present in vendor handoff event 586 * @param_info: vendor handoff related parameters 587 */ 588 struct roam_vendor_handoff_params { 589 uint32_t vdev_id; 590 uint32_t num_entries; 591 struct roam_param_info param_info[MAX_VENDOR_CONTROL_PARAMS]; 592 }; 593 594 #endif 595 596 #ifdef WLAN_FEATURE_PREAUTH_ENABLE 597 /** 598 * struct wlan_preauth_req - preauth request 599 * @vdev_id: vdev id 600 * @entry: scan entry for the candidate 601 */ 602 struct wlan_preauth_req { 603 uint8_t vdev_id; 604 struct scan_cache_entry *entry; 605 }; 606 607 /** 608 * struct wlan_cm_preauth_fail - connection manager preauth fail 609 * @cm_id: connection id 610 * @reason: connect fail reason 611 */ 612 struct wlan_cm_preauth_fail { 613 wlan_cm_id cm_id; 614 enum wlan_cm_connect_fail_reason reason; 615 }; 616 617 #define CM_MAX_FTIE_SIZE 384 618 619 /** 620 * struct wlan_preauth_rsp - preauth response 621 * @psoc: psoc object 622 * @vdev_id: vdev id 623 * @cm_id: connection manager ID 624 * @pre_auth_bssid: bssid to preauth to 625 * @status: QDF_STATUS 626 * @ft_ie_length: ft ie length 627 * @ft_ie: ft ie 628 * @ric_ies_length: ric ies length 629 * @ric_ies: ric ies 630 * @timestamp: time stamp 631 */ 632 struct wlan_preauth_rsp { 633 struct wlan_objmgr_psoc *psoc; 634 uint8_t vdev_id; 635 wlan_cm_id cm_id; 636 struct qdf_mac_addr pre_auth_bssid; 637 QDF_STATUS status; 638 uint16_t ft_ie_length; 639 uint8_t ft_ie[CM_MAX_FTIE_SIZE]; 640 uint16_t ric_ies_length; 641 uint8_t ric_ies[CM_MAX_FTIE_SIZE]; 642 #ifdef FEATURE_WLAN_ESE 643 uint32_t timestamp[2]; 644 #endif 645 }; 646 #endif 647 648 /** 649 * struct wlan_cm_discon_rsp - disconnect resp from VDEV mgr and will be sent to 650 * OSIF 651 * @req: disconnect req sent to vdev mgr 652 * @ap_discon_ie: disconnect IE sent by AP 653 */ 654 struct wlan_cm_discon_rsp { 655 struct wlan_cm_vdev_discon_req req; 656 struct element_info ap_discon_ie; 657 }; 658 659 /* 660 * enum wlan_cm_active_request_type: CM active req type 661 * @CM_NONE: No active serialisation command 662 * @CM_CONNECT_ACTIVE: Connect active in serialisation 663 * @CM_DISCONNECT_ACTIVE: DicConnect active in serialisation 664 * @CM_ROAM_ACTIVE: Roam active in serialisation 665 */ 666 enum wlan_cm_active_request_type { 667 CM_NONE, 668 CM_CONNECT_ACTIVE, 669 CM_DISCONNECT_ACTIVE, 670 CM_ROAM_ACTIVE, 671 }; 672 673 #endif /* __WLAN_CM_PUBLIC_STRUCT_H__ */ 674