|
@@ -1204,6 +1204,39 @@ static void lim_set_rmf_enabled(struct mac_context *mac,
|
|
|
csr_join_req->vdev_id, session->limRmfEnabled,
|
|
|
rsn_caps);
|
|
|
}
|
|
|
+
|
|
|
+bool lim_get_bss_rmf_capable(struct mac_context *mac,
|
|
|
+ struct pe_session *session)
|
|
|
+{
|
|
|
+ struct wlan_objmgr_vdev *vdev;
|
|
|
+ uint16_t rsn_caps;
|
|
|
+ bool peer_rmf_capable = false;
|
|
|
+
|
|
|
+ vdev = wlan_objmgr_get_vdev_by_id_from_psoc(mac->psoc,
|
|
|
+ session->vdev_id,
|
|
|
+ WLAN_LEGACY_SME_ID);
|
|
|
+ if (!vdev) {
|
|
|
+ pe_err("Invalid vdev");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ 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))
|
|
|
+ peer_rmf_capable = true;
|
|
|
+
|
|
|
+ wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);
|
|
|
+
|
|
|
+ pe_debug("vdev %d peer_rmf_capable %d rsn_caps 0x%x",
|
|
|
+ session->vdev_id, peer_rmf_capable,
|
|
|
+ rsn_caps);
|
|
|
+
|
|
|
+ return peer_rmf_capable;
|
|
|
+}
|
|
|
#else
|
|
|
/**
|
|
|
* lim_set_rmf_enabled() - set rmf enabled
|