mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
qcacld-3.0: Update WTC params only if the WTC attribute is present
Currently driver updates the WTC global parameters irrespective of the WTC attributes present in the vendor command. This causes the WTC parameters to be reset and WTC roam trigger doesn't happen. For example, with below sequence of commands: wpa_cli DRIVER setwtcmode 0 1 -40 -95 -90 -85 wpa_cli DRIVER ADDROAMSCANFREQUENCIES_LEGACY 19 2412 2417 2422 The WTC parameters TLV is not included in the RSO update command. Update the WTC params only if the WTC attribute is present. Change-Id: I53e5d934368169069dbf059335859936d320aa4e CRs-Fixed: 2954458
This commit is contained in:
parent
41f8b208f4
commit
91262aa092
1 changed files with 31 additions and 13 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue