qcacld-3.0: Drop BTM frame based on BTM cap in assoc req

As per new requirement, If DUT associates with an AP does
not support BTM then when host receives BTM req frame
from FW. Instead of forwarding the BTM req frame to
supplicant, host should drop it.

Change-Id: Ie6b6c27c01b072fac19dc039327cb9a86370b535
CRs-Fixed: 3746758
This commit is contained in:
Abhinav Kumar
2024-03-06 10:56:16 -08:00
committed by Ravindra Konda
parent 11081de764
commit dbcb2217fa
4 changed files with 33 additions and 13 deletions

View File

@@ -2998,7 +2998,7 @@ cm_update_btm_offload_config(struct wlan_objmgr_psoc *psoc,
wlan_cm_roam_cfg_get_value(psoc, vdev_id, IS_DISABLE_BTM, &temp);
is_disable_btm = temp.bool_value;
assoc_btm_cap = wlan_cm_get_assoc_btm_cap(vdev);
assoc_btm_cap = wlan_cm_get_assoc_btm_cap(psoc, vdev_id);
if (!assoc_btm_cap || is_disable_btm) {
mlme_debug("disable btm offload vdev:%d btm_cap: %d is_btm: %d",
vdev_id, assoc_btm_cap, is_disable_btm);

View File

@@ -2122,12 +2122,12 @@ wlan_cm_set_assoc_btm_cap(struct wlan_objmgr_vdev *vdev, bool val);
/**
* wlan_cm_get_assoc_btm_cap() - Get the assoc BTM capability
* @vdev: pointer to vdev
* @psoc: pointer to psoc
* @vdev_id: vdev id
*
* Return: BTM cap
*/
bool
wlan_cm_get_assoc_btm_cap(struct wlan_objmgr_vdev *vdev);
bool wlan_cm_get_assoc_btm_cap(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id);
/**
* wlan_cm_is_self_mld_roam_supported() - Is self mld roam supported

View File

@@ -4935,19 +4935,30 @@ wlan_cm_set_assoc_btm_cap(struct wlan_objmgr_vdev *vdev, bool val)
mlme_priv->connect_info.assoc_btm_cap = val;
}
bool
wlan_cm_get_assoc_btm_cap(struct wlan_objmgr_vdev *vdev)
bool wlan_cm_get_assoc_btm_cap(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id)
{
struct mlme_legacy_priv *mlme_priv;
struct wlan_objmgr_vdev *vdev;
bool assoc_btm_cap = true;
if (!vdev)
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id,
WLAN_LEGACY_MAC_ID);
if (!vdev) {
mlme_err("vdev is NULL");
return true;
}
mlme_priv = wlan_vdev_mlme_get_ext_hdl(vdev);
if (!mlme_priv)
return true;
if (!mlme_priv) {
mlme_err("mlme_priv is NULL");
goto release_ref;
}
return mlme_priv->connect_info.assoc_btm_cap;
assoc_btm_cap = mlme_priv->connect_info.assoc_btm_cap;
release_ref:
wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_MAC_ID);
return assoc_btm_cap;
}
bool wlan_cm_is_self_mld_roam_supported(struct wlan_objmgr_psoc *psoc)