Browse Source

qcacld-3.0: Pass rx data rssi triggers to F/W

Pass rx data rssi triggers and rx time to firmware.
Add log in wmi to narrow down host and firmware issue.

Change-Id: I255e02ab8f2c88a29619a49d9c2055bdaa75642a
CRs-Fixed: 2768053
Jianmin Zhu 4 years ago
parent
commit
ab5f515803

+ 1 - 1
components/mlme/dispatcher/inc/cfg_mlme_lfr.h

@@ -505,7 +505,7 @@
  * roam_data_rssi_threshold_triggers - triggers of data rssi threshold for roam
  * @Min: 0
  * @Max: 0xffff
- * @Default: 0
+ * @Default: 0x3
  *
  * If the DUT is connected to an AP with weak signal, during latest
  * rx_data_inactivity_time, if there is no activity or avg of data_rssi is

+ 4 - 0
components/wmi/src/wmi_unified_roam_tlv.c

@@ -528,6 +528,10 @@ static QDF_STATUS send_roam_scan_offload_rssi_thresh_cmd_tlv(
 		       WMITLV_TAG_STRUC_wmi_roam_data_rssi_roaming_param,
 		       WMITLV_GET_STRUCT_TLVLEN
 		       (wmi_roam_data_rssi_roaming_param));
+	wmi_debug("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,

+ 6 - 6
core/wma/src/wma_scan_roam.c

@@ -592,8 +592,8 @@ wma_roam_scan_offload_rssi_thresh(tp_wma_handle wma_handle,
 		params.roam_data_rssi_threshold =
 					roam_params->roam_data_rssi_threshold;
 	} else {
-		params.roam_data_rssi_threshold =
-				roam_params->roam_data_rssi_threshold -
+		params.bg_scan_bad_rssi_thresh =
+				roam_params->bg_scan_bad_rssi_thresh -
 				WMA_NOISE_FLOOR_DBM_DEFAULT;
 		params.roam_data_rssi_threshold =
 					roam_params->roam_data_rssi_threshold -
@@ -605,6 +605,9 @@ wma_roam_scan_offload_rssi_thresh(tp_wma_handle wma_handle,
 				roam_params->roam_bad_rssi_thresh_offset_2g;
 	if (params.roam_bad_rssi_thresh_offset_2g)
 		params.flags |= WMI_ROAM_BG_SCAN_FLAGS_2G_TO_5G_ONLY;
+	params.roam_data_rssi_threshold_triggers =
+		roam_params->roam_data_rssi_threshold_triggers;
+	params.rx_data_inactivity_time = roam_params->rx_data_inactivity_time;
 
 	/*
 	 * The current Noise floor in firmware is -96dBm. Penalty/Boost
@@ -721,10 +724,7 @@ wma_roam_scan_offload_rssi_thresh(tp_wma_handle wma_handle,
 		  roam_params->bg_scan_bad_rssi_thresh,
 		  roam_params->bg_scan_client_bitmap,
 		  roam_params->roam_bad_rssi_thresh_offset_2g);
-	wma_debug("Roam data rssi triggers:0x%x, threshold:%d, rx time:%d",
-		  roam_params->roam_data_rssi_threshold_triggers,
-		  roam_params->roam_data_rssi_threshold,
-		  roam_params->rx_data_inactivity_time);
+
 	return status;
 }