Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3c624135 authored by Jianmin Zhu's avatar Jianmin Zhu Committed by snandini
Browse files

qcacmn: Add 3 ini for data rssi check when roaming

3 ini:
roam_data_rssi_threshold_triggers
roam_data_rssi_threshold
rx_data_inactivity_time
If there's rx activity during latest rx_data_inactivity_time
and avg of data_rssi is better than roam_data_rssi_threshold, then
suppress roaming triggered by roam_data_rssi_threshold_triggers: low
RSSI or bg scan.

Change-Id: I1b5f29aacde1e8e53d92c197b2cd2ecaa9879853
CRs-Fixed: 2768055
parent 0ac48f80
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -95,6 +95,10 @@ struct rssi_monitor_param {
 * @roam_bad_rssi_thresh_offset_2g: Offset from Bad RSSI threshold for 2G
 *                                  to 5G Roam
 * @bg_scan_client_bitmap: Bitmap used to identify the client scans to snoop
 * @roam_data_rssi_threshold_triggers: triggers of bad data RSSI threshold to
 *                                  roam
 * @roam_data_rssi_threshold: Bad data RSSI threshold to roam
 * @rx_data_inactivity_time: Rx duration to check data RSSI
 * @flags: Flags for Background Roaming
 *	Bit 0 : BG roaming enabled when we connect to 2G AP only and roaming
 *	        to 5G AP only.
@@ -125,6 +129,9 @@ struct roam_offload_scan_rssi_params {
	int8_t bg_scan_bad_rssi_thresh;
	uint8_t roam_bad_rssi_thresh_offset_2g;
	uint32_t bg_scan_client_bitmap;
	uint32_t roam_data_rssi_threshold_triggers;
	int32_t roam_data_rssi_threshold;
	uint32_t rx_data_inactivity_time;
	uint32_t flags;
};

+23 −0
Original line number Diff line number Diff line
@@ -180,6 +180,7 @@ static QDF_STATUS send_roam_scan_offload_rssi_thresh_cmd_tlv(wmi_unified_t wmi_h
	wmi_roam_earlystop_rssi_thres_param *early_stop_thresholds = NULL;
	wmi_roam_dense_thres_param *dense_thresholds = NULL;
	wmi_roam_bg_scan_roaming_param *bg_scan_params = NULL;
	wmi_roam_data_rssi_roaming_param *data_rssi_param = NULL;

	len = sizeof(wmi_roam_scan_rssi_threshold_fixed_param);
	len += WMI_TLV_HDR_SIZE; /* TLV for ext_thresholds*/
@@ -190,6 +191,8 @@ static QDF_STATUS send_roam_scan_offload_rssi_thresh_cmd_tlv(wmi_unified_t wmi_h
	len += sizeof(wmi_roam_dense_thres_param);
	len += WMI_TLV_HDR_SIZE; /* TLV for BG Scan*/
	len += sizeof(wmi_roam_bg_scan_roaming_param);
	len += WMI_TLV_HDR_SIZE; /* TLV for data RSSI*/
	len += sizeof(wmi_roam_data_rssi_roaming_param);
	buf = wmi_buf_alloc(wmi_handle, len);
	if (!buf) {
		return QDF_STATUS_E_NOMEM;
@@ -287,6 +290,26 @@ static QDF_STATUS send_roam_scan_offload_rssi_thresh_cmd_tlv(wmi_unified_t wmi_h
		       WMITLV_GET_STRUCT_TLVLEN
		       (wmi_roam_bg_scan_roaming_param));

	buf_ptr += sizeof(wmi_roam_bg_scan_roaming_param);
	WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_STRUC,
		       sizeof(wmi_roam_data_rssi_roaming_param));
	buf_ptr += WMI_TLV_HDR_SIZE;
	data_rssi_param = (wmi_roam_data_rssi_roaming_param *)buf_ptr;
	data_rssi_param->flags =
		roam_req->roam_data_rssi_threshold_triggers;
	data_rssi_param->roam_data_rssi_thres =
		roam_req->roam_data_rssi_threshold;
	data_rssi_param->rx_inactivity_ms =
			roam_req->rx_data_inactivity_time;
	WMITLV_SET_HDR(&data_rssi_param->tlv_header,
		       WMITLV_TAG_STRUC_wmi_roam_data_rssi_roaming_param,
		       WMITLV_GET_STRUCT_TLVLEN
		       (wmi_roam_data_rssi_roaming_param));
	WMI_LOGD("Data rssi threshold: %d, triggers: 0x%x, rx time: %d",
		 data_rssi_param->roam_data_rssi_thres,
		 data_rssi_param->flags,
		 data_rssi_param->rx_inactivity_ms);

	wmi_mtrace(WMI_ROAM_SCAN_RSSI_THRESHOLD, NO_SESSION, 0);
	status = wmi_unified_cmd_send(wmi_handle, buf,
				      len, WMI_ROAM_SCAN_RSSI_THRESHOLD);