1 /* 2 * Copyright (c) 2011-2021 The Linux Foundation. All rights reserved. 3 * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for 6 * any purpose with or without fee is hereby granted, provided that the 7 * above copyright notice and this permission notice appear in all 8 * copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 11 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 12 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 13 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 14 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 15 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 16 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17 * PERFORMANCE OF THIS SOFTWARE. 18 */ 19 20 /* 21 * 22 * This file lim_process_beacon_frame.cc contains the code 23 * for processing Received Beacon Frame. 24 * Author: Chandra Modumudi 25 * Date: 03/01/02 26 * History:- 27 * Date Modified by Modification Information 28 * -------------------------------------------------------------------- 29 * 30 */ 31 32 #include "wni_cfg.h" 33 #include "ani_global.h" 34 #include "sch_api.h" 35 #include "utils_api.h" 36 #include "lim_types.h" 37 #include "lim_utils.h" 38 #include "lim_assoc_utils.h" 39 #include "lim_prop_exts_utils.h" 40 #include "lim_ser_des_utils.h" 41 #include "wlan_mlo_t2lm.h" 42 #include "wlan_mlo_mgr_roam.h" 43 #include "lim_mlo.h" 44 #include "wlan_mlo_mgr_sta.h" 45 #include "wlan_cm_api.h" 46 #include "wlan_mlme_api.h" 47 #include "wlan_objmgr_vdev_obj.h" 48 #include "wlan_reg_services_api.h" 49 #ifdef WLAN_FEATURE_11BE_MLO 50 #include <cds_ieee80211_common.h> 51 #endif 52 #include "wlan_t2lm_api.h" 53 54 /*Invalid Recommended Max Simultaneous Links value */ 55 #define RESERVED_REC_LINK_VALUE 1 56 57 #ifdef WLAN_FEATURE_11BE_MLO 58 59 void lim_process_bcn_prb_rsp_t2lm(struct mac_context *mac_ctx, 60 struct pe_session *session, 61 tpSirProbeRespBeacon bcn_ptr) 62 { 63 struct wlan_objmgr_vdev *vdev; 64 struct wlan_t2lm_context *t2lm_ctx; 65 66 if (!session || !bcn_ptr || !mac_ctx) { 67 pe_err("invalid input parameters"); 68 return; 69 } 70 71 if (!wlan_mlme_get_t2lm_negotiation_supported(mac_ctx->psoc)) { 72 pe_err_rl("T2LM negotiation not supported"); 73 return; 74 } 75 76 vdev = session->vdev; 77 if (!vdev || !wlan_vdev_mlme_is_mlo_vdev(vdev)) 78 return; 79 80 if (!wlan_cm_is_vdev_connected(vdev)) 81 return; 82 83 if (!mlo_check_if_all_links_up(vdev)) 84 return; 85 86 t2lm_ctx = &vdev->mlo_dev_ctx->t2lm_ctx; 87 88 qdf_mem_copy((uint8_t *)&t2lm_ctx->tsf, (uint8_t *)bcn_ptr->timeStamp, 89 sizeof(uint64_t)); 90 wlan_update_t2lm_mapping(vdev, &bcn_ptr->t2lm_ctx, t2lm_ctx->tsf); 91 } 92 93 static uint8_t valid_max_rec_links(uint8_t value) 94 { 95 if (value > RESERVED_REC_LINK_VALUE && 96 value <= WLAN_DEFAULT_REC_LINK_VALUE) 97 return value; 98 return WLAN_DEFAULT_REC_LINK_VALUE; 99 } 100 101 void lim_process_beacon_mlo(struct mac_context *mac_ctx, 102 struct pe_session *session, 103 tSchBeaconStruct *bcn_ptr) 104 { 105 struct csa_offload_params csa_param; 106 int i; 107 uint8_t link_id; 108 uint8_t *per_sta_pro; 109 uint32_t per_sta_pro_len; 110 uint8_t *sta_pro; 111 uint32_t sta_pro_len; 112 uint16_t stacontrol; 113 struct ieee80211_channelswitch_ie *csa_ie; 114 struct ieee80211_extendedchannelswitch_ie *xcsa_ie; 115 struct wlan_objmgr_vdev *vdev; 116 struct wlan_objmgr_pdev *pdev; 117 struct wlan_mlo_dev_context *mlo_ctx; 118 uint8_t is_sta_csa_synced; 119 struct mlo_link_info *link_info; 120 uint8_t sta_info_len = 0; 121 uint8_t tmp_rec_value; 122 123 if (!session || !bcn_ptr || !mac_ctx) { 124 pe_err("invalid input parameters"); 125 return; 126 } 127 vdev = session->vdev; 128 if (!vdev || !wlan_vdev_mlme_is_mlo_vdev(vdev)) 129 return; 130 131 pdev = wlan_vdev_get_pdev(vdev); 132 if (!pdev) { 133 pe_err("null pdev"); 134 return; 135 } 136 mlo_ctx = vdev->mlo_dev_ctx; 137 if (!mlo_ctx) { 138 pe_err("null mlo_dev_ctx"); 139 return; 140 } 141 142 if (bcn_ptr->mlo_ie.mlo_ie.medium_sync_delay_info_present) { 143 wlan_vdev_mlme_cap_clear(vdev, WLAN_VDEV_C_EMLSR_CAP); 144 pe_debug("EMLSR not supported with D2.0 AP"); 145 } 146 147 /** max num of active links recommended by AP */ 148 tmp_rec_value = 149 bcn_ptr->mlo_ie.mlo_ie.ext_mld_capab_and_op_info.rec_max_simultaneous_links; 150 mlo_ctx->mlo_max_recom_simult_links = 151 valid_max_rec_links(tmp_rec_value); 152 153 for (i = 0; i < bcn_ptr->mlo_ie.mlo_ie.num_sta_profile; i++) { 154 csa_ie = NULL; 155 xcsa_ie = NULL; 156 qdf_mem_zero(&csa_param, sizeof(csa_param)); 157 per_sta_pro = bcn_ptr->mlo_ie.mlo_ie.sta_profile[i].data; 158 /* Append one byte to get the element length */ 159 per_sta_pro_len = bcn_ptr->mlo_ie.mlo_ie.sta_profile[i].num_data; 160 stacontrol = *(uint16_t *)(per_sta_pro + sizeof(struct subelem_header)); 161 sta_info_len = *(uint8_t *)(per_sta_pro + 162 sizeof(struct subelem_header) + WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_SIZE); 163 /* IE ID + LEN + STA control STA info len*/ 164 sta_pro = per_sta_pro + sizeof(struct subelem_header) + 165 WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_SIZE + sta_info_len; 166 sta_pro_len = per_sta_pro_len - sizeof(struct subelem_header) - 167 WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_SIZE - sta_info_len; 168 link_id = QDF_GET_BITS( 169 stacontrol, 170 WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_LINKID_IDX, 171 WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_LINKID_BITS); 172 173 csa_ie = (struct ieee80211_channelswitch_ie *) 174 wlan_get_ie_ptr_from_eid( 175 DOT11F_EID_CHANSWITCHANN, 176 sta_pro, sta_pro_len); 177 xcsa_ie = (struct ieee80211_extendedchannelswitch_ie *) 178 wlan_get_ie_ptr_from_eid( 179 DOT11F_EID_EXT_CHAN_SWITCH_ANN, 180 sta_pro, sta_pro_len); 181 is_sta_csa_synced = mlo_is_sta_csa_synced(mlo_ctx, link_id); 182 link_info = mlo_mgr_get_ap_link_by_link_id(mlo_ctx, link_id); 183 if (!link_info) { 184 mlo_err("link info null"); 185 return; 186 } 187 188 if (csa_ie) { 189 csa_param.channel = csa_ie->newchannel; 190 csa_param.csa_chan_freq = wlan_reg_legacy_chan_to_freq( 191 pdev, csa_ie->newchannel); 192 csa_param.switch_mode = csa_ie->switchmode; 193 csa_param.ies_present_flag |= MLME_CSA_IE_PRESENT; 194 mlo_sta_handle_csa_standby_link(mlo_ctx, link_id, 195 &csa_param, vdev); 196 197 if (!is_sta_csa_synced) 198 mlo_sta_csa_save_params(mlo_ctx, link_id, 199 &csa_param); 200 } else if (xcsa_ie) { 201 csa_param.channel = xcsa_ie->newchannel; 202 csa_param.switch_mode = xcsa_ie->switchmode; 203 csa_param.new_op_class = xcsa_ie->newClass; 204 if (wlan_reg_is_6ghz_op_class(pdev, xcsa_ie->newClass)) 205 csa_param.csa_chan_freq = 206 wlan_reg_chan_band_to_freq( 207 pdev, xcsa_ie->newchannel, 208 BIT(REG_BAND_6G)); 209 else 210 csa_param.csa_chan_freq = 211 wlan_reg_legacy_chan_to_freq( 212 pdev, xcsa_ie->newchannel); 213 csa_param.ies_present_flag |= MLME_XCSA_IE_PRESENT; 214 mlo_sta_handle_csa_standby_link(mlo_ctx, link_id, 215 &csa_param, vdev); 216 if (!is_sta_csa_synced) 217 mlo_sta_csa_save_params(mlo_ctx, link_id, 218 &csa_param); 219 } 220 } 221 } 222 #endif 223 224 static QDF_STATUS 225 lim_validate_rsn_ie(const uint8_t *ie_ptr, uint16_t ie_len) 226 { 227 QDF_STATUS status; 228 const uint8_t *rsn_ie; 229 struct wlan_crypto_params crypto_params; 230 231 rsn_ie = wlan_get_ie_ptr_from_eid(WLAN_ELEMID_RSN, ie_ptr, ie_len); 232 if (!rsn_ie) 233 return QDF_STATUS_SUCCESS; 234 235 qdf_mem_zero(&crypto_params, sizeof(struct wlan_crypto_params)); 236 status = wlan_crypto_rsnie_check(&crypto_params, rsn_ie); 237 if (status != QDF_STATUS_SUCCESS) { 238 pe_debug_rl("RSN IE check failed %d", status); 239 return QDF_STATUS_E_INVAL; 240 } 241 242 return QDF_STATUS_SUCCESS; 243 } 244 245 #ifdef WLAN_FEATURE_11BE 246 /** 247 * lim_get_update_eht_bw_puncture_allow() - whether bw and puncture can be 248 * sent to target directly 249 * @session: pe session 250 * @ori_bw: bandwdith from beacon 251 * @new_bw: bandwidth intersection between reference AP and STA 252 * @update_allow: return true if bw and puncture can be updated directly 253 * 254 * Return: QDF_STATUS 255 */ 256 static QDF_STATUS 257 lim_get_update_eht_bw_puncture_allow(struct pe_session *session, 258 enum phy_ch_width ori_bw, 259 enum phy_ch_width *new_bw, 260 bool *update_allow) 261 { 262 enum phy_ch_width ch_width; 263 struct wlan_objmgr_psoc *psoc; 264 enum wlan_phymode phy_mode; 265 QDF_STATUS status = QDF_STATUS_SUCCESS; 266 267 *update_allow = false; 268 269 psoc = wlan_vdev_get_psoc(session->vdev); 270 if (!psoc) { 271 pe_err("psoc object invalid"); 272 return QDF_STATUS_E_INVAL; 273 } 274 status = mlme_get_peer_phymode(psoc, session->bssId, &phy_mode); 275 if (QDF_IS_STATUS_ERROR(status)) { 276 pe_err("failed to get phy_mode %d mac: " QDF_MAC_ADDR_FMT, 277 status, QDF_MAC_ADDR_REF(session->bssId)); 278 return QDF_STATUS_E_INVAL; 279 } 280 ch_width = wlan_mlme_get_ch_width_from_phymode(phy_mode); 281 282 if (ori_bw <= ch_width) { 283 *new_bw = ori_bw; 284 *update_allow = true; 285 return QDF_STATUS_SUCCESS; 286 } 287 288 if ((ori_bw == CH_WIDTH_320MHZ) && 289 !session->eht_config.support_320mhz_6ghz) { 290 if (ch_width == CH_WIDTH_160MHZ) { 291 *new_bw = CH_WIDTH_160MHZ; 292 *update_allow = true; 293 return QDF_STATUS_SUCCESS; 294 } 295 } 296 297 return QDF_STATUS_SUCCESS; 298 } 299 300 void lim_process_beacon_eht_op(struct pe_session *session, 301 struct sSirProbeRespBeacon *bcn_ptr) 302 { 303 uint16_t ori_punc = 0; 304 enum phy_ch_width ori_bw = CH_WIDTH_INVALID; 305 uint8_t cb_mode; 306 enum phy_ch_width new_bw; 307 bool update_allow; 308 QDF_STATUS status; 309 struct mac_context *mac_ctx; 310 struct wlan_objmgr_vdev *vdev; 311 struct wlan_channel *des_chan; 312 struct csa_offload_params *csa_param; 313 uint8_t ccfs0; 314 uint8_t ccfs1; 315 tDot11fIEeht_op *eht_op; 316 tDot11fIEhe_op *he_op; 317 uint8_t ch_width; 318 uint8_t chan_id; 319 320 if (!bcn_ptr || !session || !session->mac_ctx || !session->vdev) { 321 pe_err("invalid input parameters"); 322 return; 323 } 324 325 eht_op = &bcn_ptr->eht_op; 326 he_op = &bcn_ptr->he_op; 327 mac_ctx = session->mac_ctx; 328 vdev = session->vdev; 329 330 chan_id = wlan_reg_freq_to_chan(wlan_vdev_get_pdev(vdev), 331 bcn_ptr->chan_freq); 332 333 cb_mode = lim_get_cb_mode_for_freq(mac_ctx, session, 334 session->curr_op_freq); 335 if (cb_mode == WNI_CFG_CHANNEL_BONDING_MODE_DISABLE) { 336 /* 337 * if channel bonding is disabled from INI do not 338 * update the chan width 339 */ 340 pe_debug_rl("chan banding is disabled skip bw update"); 341 342 return; 343 } 344 /* handle beacon IE for 11be non-mlo case */ 345 if (eht_op->disabled_sub_chan_bitmap_present) { 346 ori_punc = QDF_GET_BITS( 347 eht_op->disabled_sub_chan_bitmap[0][0], 0, 8); 348 ori_punc |= QDF_GET_BITS( 349 eht_op->disabled_sub_chan_bitmap[0][1], 0, 8) << 8; 350 } 351 if (eht_op->eht_op_information_present) { 352 ori_bw = wlan_mlme_convert_eht_op_bw_to_phy_ch_width( 353 eht_op->channel_width); 354 ccfs0 = eht_op->ccfs0; 355 ccfs1 = eht_op->ccfs1; 356 } else if (he_op->vht_oper_present) { 357 ch_width = he_op->vht_oper.info.chan_width; 358 ccfs0 = he_op->vht_oper.info.center_freq_seg0; 359 ccfs1 = he_op->vht_oper.info.center_freq_seg1; 360 ori_bw = wlan_mlme_convert_vht_op_bw_to_phy_ch_width(ch_width, 361 chan_id, 362 ccfs0, 363 ccfs1); 364 } else if (he_op->oper_info_6g_present) { 365 ch_width = he_op->oper_info_6g.info.ch_width; 366 ccfs0 = he_op->oper_info_6g.info.center_freq_seg0; 367 ccfs1 = he_op->oper_info_6g.info.center_freq_seg1; 368 ori_bw = wlan_mlme_convert_he_6ghz_op_bw_to_phy_ch_width(ch_width, 369 chan_id, 370 ccfs0, 371 ccfs1); 372 } else if (bcn_ptr->VHTOperation.present) { 373 ch_width = bcn_ptr->VHTOperation.chanWidth; 374 ccfs0 = bcn_ptr->VHTOperation.chan_center_freq_seg0; 375 ccfs1 = bcn_ptr->VHTOperation.chan_center_freq_seg1; 376 ori_bw = wlan_mlme_convert_vht_op_bw_to_phy_ch_width(ch_width, 377 chan_id, 378 ccfs0, 379 ccfs1); 380 } else { 381 pe_err("Invalid operation"); 382 return; 383 } 384 385 status = lim_get_update_eht_bw_puncture_allow(session, ori_bw, 386 &new_bw, 387 &update_allow); 388 if (QDF_IS_STATUS_ERROR(status)) 389 return; 390 391 if (update_allow) { 392 wlan_cm_sta_update_bw_puncture(vdev, session->bssId, 393 ori_punc, ori_bw, 394 ccfs0, 395 ccfs1, 396 new_bw); 397 } else { 398 csa_param = qdf_mem_malloc(sizeof(*csa_param)); 399 if (!csa_param) { 400 pe_err("csa_param allocation fails"); 401 return; 402 } 403 des_chan = wlan_vdev_mlme_get_des_chan(vdev); 404 csa_param->channel = des_chan->ch_ieee; 405 csa_param->csa_chan_freq = des_chan->ch_freq; 406 csa_param->new_ch_width = ori_bw; 407 csa_param->new_punct_bitmap = ori_punc; 408 csa_param->new_ch_freq_seg1 = ccfs0; 409 csa_param->new_ch_freq_seg2 = ccfs1; 410 qdf_copy_macaddr(&csa_param->bssid, 411 (struct qdf_mac_addr *)session->bssId); 412 lim_handle_sta_csa_param(session->mac_ctx, csa_param); 413 } 414 } 415 416 void lim_process_beacon_eht(struct mac_context *mac_ctx, 417 struct pe_session *session, 418 tSchBeaconStruct *bcn_ptr) 419 { 420 struct wlan_objmgr_vdev *vdev; 421 struct wlan_channel *des_chan; 422 423 if (!session || !bcn_ptr || !mac_ctx) { 424 pe_err("invalid input parameters"); 425 return; 426 } 427 vdev = session->vdev; 428 if (!vdev || wlan_vdev_mlme_get_opmode(vdev) != QDF_STA_MODE || 429 !qdf_is_macaddr_equal((struct qdf_mac_addr *)session->bssId, 430 (struct qdf_mac_addr *)bcn_ptr->bssid)) 431 return; 432 des_chan = wlan_vdev_mlme_get_des_chan(vdev); 433 if (!des_chan || !IS_WLAN_PHYMODE_EHT(des_chan->ch_phymode)) 434 return; 435 436 if (wlan_cm_is_vdev_connected(vdev)) 437 lim_process_beacon_eht_op(session, bcn_ptr); 438 439 if (mlo_is_mld_sta(vdev)) 440 /* handle beacon IE for 802.11be mlo case */ 441 lim_process_beacon_mlo(mac_ctx, session, bcn_ptr); 442 } 443 444 void 445 lim_process_ml_reconfig(struct mac_context *mac_ctx, 446 struct pe_session *session, 447 uint8_t *rx_pkt_info) 448 { 449 uint8_t *frame; 450 uint16_t frame_len; 451 452 if (!session->vdev) 453 return; 454 455 frame = WMA_GET_RX_MPDU_DATA(rx_pkt_info); 456 frame_len = WMA_GET_RX_PAYLOAD_LEN(rx_pkt_info); 457 if (frame_len < SIR_MAC_B_PR_SSID_OFFSET) 458 return; 459 460 mlo_process_ml_reconfig_ie(session->vdev, NULL, 461 frame + SIR_MAC_B_PR_SSID_OFFSET, 462 frame_len - SIR_MAC_B_PR_SSID_OFFSET, NULL); 463 } 464 #endif 465 466 /** 467 * lim_process_beacon_frame() - to process beacon frames 468 * @mac_ctx: Pointer to Global MAC structure 469 * @rx_pkt_info: A pointer to RX packet info structure 470 * @session: A pointer to session 471 * 472 * This function is called by limProcessMessageQueue() upon Beacon 473 * frame reception. 474 * Note: 475 * 1. Beacons received in 'normal' state in IBSS are handled by 476 * Beacon Processing module. 477 * 478 * Return: none 479 */ 480 481 void 482 lim_process_beacon_frame(struct mac_context *mac_ctx, uint8_t *rx_pkt_info, 483 struct pe_session *session) 484 { 485 tpSirMacMgmtHdr mac_hdr; 486 tSchBeaconStruct *bcn_ptr; 487 uint8_t *frame; 488 const uint8_t *owe_transition_ie; 489 uint16_t frame_len; 490 uint8_t bpcc; 491 bool cu_flag = true; 492 QDF_STATUS status; 493 494 /* 495 * here is it required to increment session specific heartBeat 496 * beacon counter 497 */ 498 mac_hdr = WMA_GET_RX_MAC_HEADER(rx_pkt_info); 499 frame = WMA_GET_RX_MPDU_DATA(rx_pkt_info); 500 frame_len = WMA_GET_RX_PAYLOAD_LEN(rx_pkt_info); 501 502 if (frame_len < SIR_MAC_B_PR_SSID_OFFSET) { 503 pe_debug_rl("payload invalid len %d", frame_len); 504 return; 505 } 506 if (lim_validate_rsn_ie(frame + SIR_MAC_B_PR_SSID_OFFSET, 507 frame_len - SIR_MAC_B_PR_SSID_OFFSET) != 508 QDF_STATUS_SUCCESS) 509 return; 510 /* Expect Beacon in any state as Scan is independent of LIM state */ 511 bcn_ptr = qdf_mem_malloc(sizeof(*bcn_ptr)); 512 if (!bcn_ptr) 513 return; 514 515 /* Parse received Beacon */ 516 if (sir_convert_beacon_frame2_struct(mac_ctx, 517 rx_pkt_info, bcn_ptr) != 518 QDF_STATUS_SUCCESS) { 519 /* 520 * Received wrongly formatted/invalid Beacon. 521 * Ignore it and move on. 522 */ 523 pe_warn("Received invalid Beacon in state: %X", 524 session->limMlmState); 525 lim_print_mlm_state(mac_ctx, LOGW, 526 session->limMlmState); 527 qdf_mem_free(bcn_ptr); 528 return; 529 } 530 531 if (mlo_is_mld_sta(session->vdev)) { 532 cu_flag = false; 533 status = lim_get_bpcc_from_mlo_ie(bcn_ptr, &bpcc); 534 if (QDF_IS_STATUS_SUCCESS(status)) 535 cu_flag = lim_check_cu_happens(session->vdev, bpcc); 536 lim_process_ml_reconfig(mac_ctx, session, rx_pkt_info); 537 } 538 539 lim_process_bcn_prb_rsp_t2lm(mac_ctx, session, bcn_ptr); 540 if (QDF_IS_STATUS_SUCCESS(lim_check_for_ml_probe_req(session))) 541 goto end; 542 543 /* 544 * during scanning, when any session is active, and 545 * beacon/Pr belongs to one of the session, fill up the 546 * following, TBD - HB counter 547 */ 548 if (sir_compare_mac_addr(session->bssId, 549 bcn_ptr->bssid)) { 550 qdf_mem_copy((uint8_t *)&session->lastBeaconTimeStamp, 551 (uint8_t *) bcn_ptr->timeStamp, 552 sizeof(uint64_t)); 553 session->currentBssBeaconCnt++; 554 } 555 MTRACE(mac_trace(mac_ctx, 556 TRACE_CODE_RX_MGMT_TSF, 0, bcn_ptr->timeStamp[0])); 557 MTRACE(mac_trace(mac_ctx, TRACE_CODE_RX_MGMT_TSF, 0, 558 bcn_ptr->timeStamp[1])); 559 560 if (session->limMlmState == 561 eLIM_MLM_WT_JOIN_BEACON_STATE) { 562 owe_transition_ie = wlan_get_vendor_ie_ptr_from_oui( 563 OWE_TRANSITION_OUI_TYPE, 564 OWE_TRANSITION_OUI_SIZE, 565 frame + SIR_MAC_B_PR_SSID_OFFSET, 566 frame_len - SIR_MAC_B_PR_SSID_OFFSET); 567 if (session->connected_akm == ANI_AKM_TYPE_OWE && 568 owe_transition_ie) { 569 pe_debug("vdev:%d Drop OWE rx beacon. Wait for probe for join success", 570 session->vdev_id); 571 qdf_mem_free(bcn_ptr); 572 return; 573 } 574 575 if (session->beacon) { 576 qdf_mem_free(session->beacon); 577 session->beacon = NULL; 578 session->bcnLen = 0; 579 } 580 581 mac_ctx->lim.bss_rssi = 582 (int8_t)WMA_GET_RX_RSSI_NORMALIZED(rx_pkt_info); 583 session->bcnLen = WMA_GET_RX_MPDU_LEN(rx_pkt_info); 584 session->beacon = qdf_mem_malloc(session->bcnLen); 585 if (session->beacon) 586 /* 587 * Store the whole Beacon frame. This is sent to 588 * csr/hdd in join cnf response. 589 */ 590 qdf_mem_copy(session->beacon, 591 WMA_GET_RX_MAC_HEADER(rx_pkt_info), 592 session->bcnLen); 593 594 lim_check_and_announce_join_success(mac_ctx, bcn_ptr, 595 mac_hdr, session); 596 } 597 598 if (cu_flag) 599 lim_process_beacon_eht(mac_ctx, session, bcn_ptr); 600 end: 601 qdf_mem_free(bcn_ptr); 602 return; 603 } 604