mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
qcacld-3.0: Send SNR values for roam trigger minimum rssi
When the firmware doesn't advertise the wmi_service_hw_db2dbm_support target capability host should send rssi values in SNR equivalent so that the hardware can trigger interrupts. Else low rssi, idle roam, emergency deauth roam interrupts will not be triggered. Add changes to convert RSSI values coming from ini to SNR and send it to firmware. Below ini parameters need conversion: bss_load_trigger_2g_rssi_threshold bss_load_trigger_5g_rssi_threshold idle_roam_min_rssi candidate_min_rssi_for_beacon_miss candidate_min_rssi_for_disconnect Change-Id: Ied0325031b336d0b6c03ad5dda772170bc54190c CRs-Fixed: 2590848
This commit is contained in:
parent
19d1c6f4f9
commit
1799c4170d
1 changed files with 34 additions and 2 deletions
|
|
@ -1320,6 +1320,17 @@ static QDF_STATUS wma_roam_scan_offload_ap_profile(tp_wma_handle wma_handle,
|
|||
roam_req->min_rssi_params[DEAUTH_MIN_RSSI];
|
||||
ap_profile.min_rssi_params[BMISS_MIN_RSSI] =
|
||||
roam_req->min_rssi_params[BMISS_MIN_RSSI];
|
||||
if (!db2dbm_enabled) {
|
||||
ap_profile.min_rssi_params[DEAUTH_MIN_RSSI].min_rssi -=
|
||||
WMA_NOISE_FLOOR_DBM_DEFAULT;
|
||||
ap_profile.min_rssi_params[DEAUTH_MIN_RSSI].min_rssi &=
|
||||
0x000000ff;
|
||||
|
||||
ap_profile.min_rssi_params[BMISS_MIN_RSSI].min_rssi -=
|
||||
WMA_NOISE_FLOOR_DBM_DEFAULT;
|
||||
ap_profile.min_rssi_params[BMISS_MIN_RSSI].min_rssi &=
|
||||
0x000000ff;
|
||||
}
|
||||
|
||||
ap_profile.score_delta_param[IDLE_ROAM_TRIGGER] =
|
||||
roam_req->score_delta_param[IDLE_ROAM_TRIGGER];
|
||||
|
|
@ -1575,15 +1586,27 @@ void wma_send_roam_bss_load_config(WMA_HANDLE handle,
|
|||
{
|
||||
QDF_STATUS status;
|
||||
tp_wma_handle wma_handle = (tp_wma_handle) handle;
|
||||
bool db2dbm_enabled;
|
||||
|
||||
if (!wma_handle || !wma_handle->wmi_handle) {
|
||||
WMA_LOGE("WMA is closed, cannot send bss load config");
|
||||
return;
|
||||
}
|
||||
|
||||
WMA_LOGD("%s: Sending bss load trig params vdev %u bss_load_threshold %u bss_load_sample_time: %u",
|
||||
db2dbm_enabled = wmi_service_enabled(wma_handle->wmi_handle,
|
||||
wmi_service_hw_db2dbm_support);
|
||||
if (!db2dbm_enabled) {
|
||||
params->rssi_threshold_5ghz -= WMA_NOISE_FLOOR_DBM_DEFAULT;
|
||||
params->rssi_threshold_5ghz &= 0x000000ff;
|
||||
|
||||
params->rssi_threshold_24ghz -= WMA_NOISE_FLOOR_DBM_DEFAULT;
|
||||
params->rssi_threshold_24ghz &= 0x000000ff;
|
||||
}
|
||||
|
||||
WMA_LOGD("%s: Bss load trig params vdev %u threshold %u sample_time: %u 5Ghz RSSI threshold:%d 2.4G rssi threshold:%d",
|
||||
__func__, params->vdev_id, params->bss_load_threshold,
|
||||
params->bss_load_sample_time);
|
||||
params->bss_load_sample_time, params->rssi_threshold_5ghz,
|
||||
params->rssi_threshold_24ghz);
|
||||
|
||||
status = wmi_unified_send_bss_load_config(wma_handle->wmi_handle,
|
||||
params);
|
||||
|
|
@ -1687,6 +1710,7 @@ wma_send_idle_roam_params(tp_wma_handle wma_handle,
|
|||
struct roam_offload_scan_req *roam_req)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
bool db2dbm_enabled;
|
||||
|
||||
if (!wma_handle || !wma_handle->wmi_handle) {
|
||||
WMA_LOGE("WMA is closed, cannot send idle roam params");
|
||||
|
|
@ -1706,6 +1730,14 @@ wma_send_idle_roam_params(tp_wma_handle wma_handle,
|
|||
break;
|
||||
}
|
||||
|
||||
db2dbm_enabled = wmi_service_enabled(wma_handle->wmi_handle,
|
||||
wmi_service_hw_db2dbm_support);
|
||||
if (!db2dbm_enabled) {
|
||||
roam_req->idle_roam_params.conn_ap_min_rssi -=
|
||||
WMA_NOISE_FLOOR_DBM_DEFAULT;
|
||||
roam_req->idle_roam_params.conn_ap_min_rssi &= 0x000000ff;
|
||||
}
|
||||
|
||||
status = wmi_unified_send_idle_roam_params(wma_handle->wmi_handle,
|
||||
&roam_req->idle_roam_params);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
|
|
|
|||
Loading…
Reference in a new issue