From 2937e1aee1a657d0edd00f3adb4b74069433652e Mon Sep 17 00:00:00 2001 From: Pragaspathi Thilagaraj Date: Wed, 12 Dec 2018 16:12:07 +0530 Subject: [PATCH] qcacmn: Send roam_score_delta, roam_score_delta_bitmap to firmware Two new WCNSS_qcom.ini values "roam_score_delta" and "roam_trigger_bitmap" are introduced. These values are sent to firmware over the WMI command WMI_ROAM_AP_PROFILE over the structure wmi_roam_cnd_scoring_param. The values to this structure are populated from struct scoring_params. Add roam_score_delta and roam_trigger_bitmap in scoring_param. Populate these values from roam request to the structure wmi_roam_cnd_scoring_param to be sent over the wmi command. Change-Id: I012867e60ddf18a276250ef3bd27015f191d8a6a CRs-Fixed: 2368263 --- wmi/inc/wmi_unified_roam_param.h | 6 ++++++ wmi/src/wmi_unified_roam_tlv.c | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/wmi/inc/wmi_unified_roam_param.h b/wmi/inc/wmi_unified_roam_param.h index 89c65cdbc706..d9985354598a 100644 --- a/wmi/inc/wmi_unified_roam_param.h +++ b/wmi/inc/wmi_unified_roam_param.h @@ -376,6 +376,10 @@ struct param_slot_scoring { * BITS 16-23 :- It contains scoring percentage of 3x3 * BITS 24-31 :- It contains scoring percentage of 4x4 * The value of each index must be 0-100 + * @roam_score_delta: delta value expected over the roam score of the candidate + * ap over the roam score of the current ap + * @roam_trigger_bitmap: bitmap of roam triggers on which roam_score_delta + * will be applied * @rssi_scoring: RSSI scoring information. * @esp_qbss_scoring: ESP/QBSS scoring percentage information * @oce_wan_scoring: OCE WAN metrics percentage information @@ -396,6 +400,8 @@ struct scoring_param { uint32_t bw_index_score; uint32_t band_index_score; uint32_t nss_index_score; + uint32_t roam_score_delta; + uint32_t roam_trigger_bitmap; struct rssi_scoring rssi_scoring; struct param_slot_scoring esp_qbss_scoring; struct param_slot_scoring oce_wan_scoring; diff --git a/wmi/src/wmi_unified_roam_tlv.c b/wmi/src/wmi_unified_roam_tlv.c index 337656615077..c217fa9bedfc 100644 --- a/wmi/src/wmi_unified_roam_tlv.c +++ b/wmi/src/wmi_unified_roam_tlv.c @@ -1555,6 +1555,13 @@ static QDF_STATUS send_roam_scan_offload_ap_profile_cmd_tlv(wmi_unified_t wmi_ha score_param->oce_wan_scoring.score_pcnt11_to_8, score_param->oce_wan_scoring.score_pcnt15_to_12); + score_param->roam_score_delta_pcnt = ap_profile->param.roam_score_delta; + score_param->roam_score_delta_mask = + ap_profile->param.roam_trigger_bitmap; + WMI_LOGD("Roam score delta:%d Roam_trigger_bitmap:%x", + score_param->roam_score_delta_pcnt, + score_param->roam_score_delta_mask); + wmi_mtrace(WMI_ROAM_AP_PROFILE, NO_SESSION, 0); status = wmi_unified_cmd_send(wmi_handle, buf, len, WMI_ROAM_AP_PROFILE);