diff --git a/core/mac/src/pe/lim/lim_process_sme_req_messages.c b/core/mac/src/pe/lim/lim_process_sme_req_messages.c index ee62f66beca7..34da3c1af678 100644 --- a/core/mac/src/pe/lim/lim_process_sme_req_messages.c +++ b/core/mac/src/pe/lim/lim_process_sme_req_messages.c @@ -1165,48 +1165,8 @@ static QDF_STATUS lim_send_ft_reassoc_req(struct pe_session *session, } #ifdef WLAN_FEATURE_11W -/** - * lim_set_rmf_enabled() - set rmf enabled - * @mac: mac context - * @session: pe session - * @csr_join_req: csr join req - * - * Return: void - */ -static void lim_set_rmf_enabled(struct mac_context *mac, - struct pe_session *session, - struct join_req *csr_join_req) -{ - struct wlan_objmgr_vdev *vdev; - uint16_t rsn_caps; - - vdev = wlan_objmgr_get_vdev_by_id_from_psoc(mac->psoc, - csr_join_req->vdev_id, - WLAN_LEGACY_SME_ID); - if (!vdev) { - pe_err("Invalid vdev"); - return; - } - rsn_caps = (uint16_t)wlan_crypto_get_param(vdev, - WLAN_CRYPTO_PARAM_RSN_CAP); - if (wlan_crypto_vdev_has_mgmtcipher( - vdev, - (1 << WLAN_CRYPTO_CIPHER_AES_GMAC) | - (1 << WLAN_CRYPTO_CIPHER_AES_GMAC_256) | - (1 << WLAN_CRYPTO_CIPHER_AES_CMAC)) && - (rsn_caps & WLAN_CRYPTO_RSN_CAP_MFP_ENABLED) && - (rsn_caps & WLAN_CRYPTO_RSN_CAP_MFP_REQUIRED)) - session->limRmfEnabled = 1; - - wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID); - - pe_debug("vdev %d limRmfEnabled %d rsn_caps 0x%x", - csr_join_req->vdev_id, session->limRmfEnabled, - rsn_caps); -} - -bool lim_get_bss_rmf_capable(struct mac_context *mac, - struct pe_session *session) +bool +lim_get_vdev_rmf_capable(struct mac_context *mac, struct pe_session *session) { struct wlan_objmgr_vdev *vdev; uint16_t rsn_caps; @@ -1237,21 +1197,6 @@ bool lim_get_bss_rmf_capable(struct mac_context *mac, return peer_rmf_capable; } -#else -/** - * lim_set_rmf_enabled() - set rmf enabled - * @mac: mac context - * @session: pe session - * @csr_join_req: csr join req - * - * Return: void - */ -static inline void lim_set_rmf_enabled(struct mac_context *mac, - struct pe_session *session, - struct join_req *csr_join_req) - -{ -} #endif /** @@ -1516,7 +1461,8 @@ __lim_process_sme_join_req(struct mac_context *mac_ctx, void *msg_buf) /* Record if management frames need to be protected */ - lim_set_rmf_enabled(mac_ctx, session, sme_join_req); + session->limRmfEnabled = + lim_get_vdev_rmf_capable(mac_ctx, session); #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM session->rssi = bss_desc->rssi; diff --git a/core/mac/src/pe/lim/lim_send_management_frames.c b/core/mac/src/pe/lim/lim_send_management_frames.c index 62b015e2e7f1..58a7e4cd7044 100644 --- a/core/mac/src/pe/lim/lim_send_management_frames.c +++ b/core/mac/src/pe/lim/lim_send_management_frames.c @@ -2254,7 +2254,7 @@ lim_send_assoc_req_mgmt_frame(struct mac_context *mac_ctx, if (!is_open_auth) { bss_mfp_capable = - lim_get_bss_rmf_capable(mac_ctx, pe_session); + lim_get_vdev_rmf_capable(mac_ctx, pe_session); if (!bss_mfp_capable) { pe_debug("Peer doesn't support PMF, Don't add MBO IE"); qdf_mem_free(mbo_ie); diff --git a/core/mac/src/pe/lim/lim_utils.h b/core/mac/src/pe/lim/lim_utils.h index 3114639884f3..b6ca4f1be333 100644 --- a/core/mac/src/pe/lim/lim_utils.h +++ b/core/mac/src/pe/lim/lim_utils.h @@ -923,7 +923,7 @@ void lim_merge_extcap_struct(tDot11fIEExtCap *dst, tDot11fIEExtCap *src, void lim_del_pmf_sa_query_timer(struct mac_context *mac_ctx, struct pe_session *pe_session); /** - * lim_get_bss_rmf_capable() - get rmf capable - MFPC + * lim_get_vdev_rmf_capable() - get rmf capable - MFPC * @mac: mac context * @session: pe session * @@ -932,8 +932,8 @@ void lim_del_pmf_sa_query_timer(struct mac_context *mac_ctx, struct pe_session * * * Return: bool */ -bool lim_get_bss_rmf_capable(struct mac_context *mac, - struct pe_session *session); +bool lim_get_vdev_rmf_capable(struct mac_context *mac, + struct pe_session *session); #else /** * lim_del_pmf_sa_query_timer() - This function deletes SA query timer @@ -950,8 +950,8 @@ lim_del_pmf_sa_query_timer(struct mac_context *mac_ctx, struct pe_session *pe_se } static inline -bool lim_get_bss_rmf_capable(struct mac_context *mac, - struct pe_session *session) +bool lim_get_vdev_rmf_capable(struct mac_context *mac, + struct pe_session *session) { return false; }