diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index bc7f8174b367..5c1aef598b5c 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -5023,6 +5023,7 @@ hdd_set_roam_with_control_config(struct hdd_context *hdd_ctx, struct nlattr *tb2[QCA_ATTR_ROAM_CONTROL_MAX + 1], *attr; uint32_t value; struct wlan_cm_roam_vendor_btm_params param = {0}; + bool is_wtc_param_updated = false; hdd_enter(); /* The command must carry PARAM_ROAM_CONTROL_CONFIG */ @@ -5140,44 +5141,61 @@ hdd_set_roam_with_control_config(struct hdd_context *hdd_ctx, } attr = tb2[QCA_ATTR_ROAM_CONTROL_SCAN_SCHEME]; - if (attr) + if (attr) { param.scan_freq_scheme = nla_get_u32(attr); + is_wtc_param_updated = true; + } attr = tb2[QCA_ATTR_ROAM_CONTROL_CONNECTED_RSSI_THRESHOLD]; - if (attr) + if (attr) { param.connected_rssi_threshold = nla_get_u32(attr); + is_wtc_param_updated = true; + } attr = tb2[QCA_ATTR_ROAM_CONTROL_CANDIDATE_RSSI_THRESHOLD]; - if (attr) + if (attr) { param.candidate_rssi_threshold_2g = nla_get_u32(attr); + is_wtc_param_updated = true; + } attr = tb2[QCA_ATTR_ROAM_CONTROL_CANDIDATE_RSSI_THRESHOLD_2P4GHZ]; - if (attr) + if (attr) { param.candidate_rssi_threshold_2g = nla_get_u32(attr); + is_wtc_param_updated = true; + } attr = tb2[QCA_ATTR_ROAM_CONTROL_CANDIDATE_RSSI_THRESHOLD_5GHZ]; - if (attr) + if (attr) { param.candidate_rssi_threshold_5g = nla_get_u32(attr); - else + is_wtc_param_updated = true; + } else { param.candidate_rssi_threshold_5g = param.candidate_rssi_threshold_2g; + } attr = tb2[QCA_ATTR_ROAM_CONTROL_CANDIDATE_RSSI_THRESHOLD_6GHZ]; - if (attr) + if (attr) { param.candidate_rssi_threshold_6g = nla_get_u32(attr); - else + is_wtc_param_updated = true; + } else { param.candidate_rssi_threshold_6g = param.candidate_rssi_threshold_2g; + } attr = tb2[QCA_ATTR_ROAM_CONTROL_USER_REASON]; - if (attr) + if (attr) { param.user_roam_reason = nla_get_u32(attr); - else + is_wtc_param_updated = true; + } else { param.user_roam_reason = DISABLE_VENDOR_BTM_CONFIG; + } - wlan_cm_roam_set_vendor_btm_params(hdd_ctx->psoc, vdev_id, ¶m); - /* Sends RSO update */ - sme_send_vendor_btm_params(hdd_ctx->mac_handle, vdev_id); + if (is_wtc_param_updated) { + wlan_cm_roam_set_vendor_btm_params(hdd_ctx->psoc, vdev_id, + ¶m); + /* Sends RSO update */ + sme_send_vendor_btm_params(hdd_ctx->mac_handle, vdev_id); + } return qdf_status_to_os_return(status); }