|
@@ -2983,8 +2983,8 @@ cm_update_btm_offload_config(struct wlan_objmgr_psoc *psoc,
|
|
|
struct wlan_mlme_btm *btm_cfg;
|
|
|
bool is_hs_20_ap, is_hs_20_btm_offload_disabled;
|
|
|
struct cm_roam_values_copy temp;
|
|
|
- uint8_t vdev_id;
|
|
|
- bool abridge_flag;
|
|
|
+ uint8_t vdev_id = wlan_vdev_get_id(vdev);
|
|
|
+ bool abridge_flag, is_disable_btm, assoc_btm_cap;
|
|
|
|
|
|
mlme_obj = mlme_get_psoc_ext_obj(psoc);
|
|
|
if (!mlme_obj)
|
|
@@ -2992,18 +2992,20 @@ cm_update_btm_offload_config(struct wlan_objmgr_psoc *psoc,
|
|
|
|
|
|
btm_cfg = &mlme_obj->cfg.btm;
|
|
|
*btm_offload_config = btm_cfg->btm_offload_config;
|
|
|
-
|
|
|
/* Return if INI is disabled */
|
|
|
if (!(*btm_offload_config))
|
|
|
return;
|
|
|
|
|
|
- if (!wlan_cm_get_assoc_btm_cap(vdev)) {
|
|
|
- mlme_debug("BTM not supported, disable BTM offload");
|
|
|
+ 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);
|
|
|
+ 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);
|
|
|
*btm_offload_config = 0;
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- vdev_id = wlan_vdev_get_id(vdev);
|
|
|
wlan_cm_roam_cfg_get_value(psoc, vdev_id, HS_20_AP, &temp);
|
|
|
is_hs_20_ap = temp.bool_value;
|
|
|
wlan_mlme_is_hs_20_btm_offload_disabled(psoc,
|
|
@@ -5510,6 +5512,41 @@ bool cm_lookup_pmkid_using_bssid(struct wlan_objmgr_psoc *psoc,
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * cm_roam_clear_is_disable_btm_flag - API to clear is_disable_btm flag
|
|
|
+ * @pdev: pdev pointer
|
|
|
+ * @vdev_id: dvev ID
|
|
|
+ *
|
|
|
+ * Return: None
|
|
|
+ */
|
|
|
+static void cm_roam_clear_is_disable_btm_flag(struct wlan_objmgr_pdev *pdev,
|
|
|
+ uint8_t vdev_id)
|
|
|
+{
|
|
|
+ struct rso_config *rso_cfg;
|
|
|
+ struct wlan_objmgr_vdev *vdev;
|
|
|
+
|
|
|
+ vdev = wlan_objmgr_get_vdev_by_id_from_pdev(pdev, vdev_id,
|
|
|
+ WLAN_MLME_CM_ID);
|
|
|
+ if (!vdev) {
|
|
|
+ mlme_err("vdev object is NULL for vdev %d", vdev_id);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ rso_cfg = wlan_cm_get_rso_config(vdev);
|
|
|
+ if (!rso_cfg) {
|
|
|
+ mlme_debug("vdev: %d rso_cfg is NULL", vdev_id);
|
|
|
+ goto release_ref;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (rso_cfg->is_disable_btm) {
|
|
|
+ mlme_debug("vdev: %d clear is_disable_btm flag", vdev_id);
|
|
|
+ rso_cfg->is_disable_btm = false;
|
|
|
+ }
|
|
|
+
|
|
|
+release_ref:
|
|
|
+ wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_CM_ID);
|
|
|
+}
|
|
|
+
|
|
|
void cm_roam_restore_default_config(struct wlan_objmgr_pdev *pdev,
|
|
|
uint8_t vdev_id)
|
|
|
{
|
|
@@ -5526,6 +5563,8 @@ void cm_roam_restore_default_config(struct wlan_objmgr_pdev *pdev,
|
|
|
if (!mlme_obj)
|
|
|
return;
|
|
|
|
|
|
+ cm_roam_clear_is_disable_btm_flag(pdev, vdev_id);
|
|
|
+
|
|
|
if (mlme_obj->cfg.lfr.roam_scan_offload_enabled) {
|
|
|
/*
|
|
|
* When vendor handoff is enabled and disconnection is received,
|