From 8093bc42d5871db835df32fb308b247c4df3c85d Mon Sep 17 00:00:00 2001 From: "Gupta, Kapil" Date: Tue, 12 Apr 2016 15:02:00 +0530 Subject: [PATCH] qcacmn: Add support for dense roam params in wmi layer qcacld-2.0 to qcacmn propagation In High dense environment roaming should be triggered early at dense RSSI threshold which provide better throughput result. Add support for dense roaming parameters to read from ini file and send to FW with other roaming parameters CRs-Fixed: 953579 Change-Id: Ia63bfdd1248b4507d988b019f07164a7c75566af --- wmi/inc/wmi_unified_param.h | 8 ++++++++ wmi/src/wmi_unified_tlv.c | 20 +++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index c8e210cd93..134717e80b 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -1061,6 +1061,10 @@ struct roam_offload_scan_params { * unit is dB above NF * @roam_earlystop_thres_max: Maximum RSSI threshold value for early stop, * unit is dB above NF + * @dense_rssi_thresh_offset: dense roam RSSI threshold difference + * @dense_min_aps_cnt: dense roam minimum APs + * @initial_dense_status: dense status detected by host + * @traffic_threshold: dense roam RSSI threshold */ struct roam_offload_scan_rssi_params { int8_t rssi_thresh; @@ -1079,6 +1083,10 @@ struct roam_offload_scan_rssi_params { uint32_t good_rssi_threshold; uint32_t roam_earlystop_thres_min; uint32_t roam_earlystop_thres_max; + int dense_rssi_thresh_offset; + int dense_min_aps_cnt; + int initial_dense_status; + int traffic_threshold; }; /** diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 04b1495b6a..d20edb2434 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -4125,13 +4125,15 @@ QDF_STATUS send_roam_scan_offload_rssi_thresh_cmd_tlv(wmi_unified_t wmi_handle, wmi_roam_scan_rssi_threshold_fixed_param *rssi_threshold_fp; wmi_roam_scan_extended_threshold_param *ext_thresholds = NULL; wmi_roam_earlystop_rssi_thres_param *early_stop_thresholds = NULL; - + wmi_roam_dense_thres_param *dense_thresholds = NULL; len = sizeof(wmi_roam_scan_rssi_threshold_fixed_param); len += WMI_TLV_HDR_SIZE; /* TLV for ext_thresholds*/ len += sizeof(wmi_roam_scan_extended_threshold_param); len += WMI_TLV_HDR_SIZE; len += sizeof(wmi_roam_earlystop_rssi_thres_param); + len += WMI_TLV_HDR_SIZE; /* TLV for dense thresholds*/ + len += sizeof(wmi_roam_dense_thres_param); buf = wmi_buf_alloc(wmi_handle, len); if (!buf) { WMA_LOGE("%s : wmi_buf_alloc failed", __func__); @@ -4196,6 +4198,22 @@ QDF_STATUS send_roam_scan_offload_rssi_thresh_cmd_tlv(wmi_unified_t wmi_handle, WMITLV_GET_STRUCT_TLVLEN (wmi_roam_earlystop_rssi_thres_param)); + buf_ptr += sizeof(wmi_roam_earlystop_rssi_thres_param); + WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_STRUC, + sizeof(wmi_roam_dense_thres_param)); + buf_ptr += WMI_TLV_HDR_SIZE; + dense_thresholds = (wmi_roam_dense_thres_param *) buf_ptr; + dense_thresholds->roam_dense_rssi_thres_offset = + roam_req->dense_rssi_thresh_offset; + dense_thresholds->roam_dense_min_aps = roam_req->dense_min_aps_cnt; + dense_thresholds->roam_dense_traffic_thres = + roam_req->traffic_threshold; + dense_thresholds->roam_dense_status = roam_req->initial_dense_status; + WMITLV_SET_HDR(&dense_thresholds->tlv_header, + WMITLV_TAG_STRUC_wmi_roam_dense_thres_param, + WMITLV_GET_STRUCT_TLVLEN + (wmi_roam_dense_thres_param)); + status = wmi_unified_cmd_send(wmi_handle, buf, len, WMI_ROAM_SCAN_RSSI_THRESHOLD); if (QDF_IS_STATUS_ERROR(status)) {