Ver código fonte

qcacld-3.0: Add additional debug logs for rso commands

Add debug logs on the sending WMI_ROAM_SCAN_RSSI_THRESHOLD
/WMI_ROAM_FILTER_CMDID/WMI_ROAM_BTM_CONFIG_CMDID
/WMI_11K_OFFLOAD_REPORT_CMDID commands path.

If mawc roaming is not supported by firmware, don't send
WMI_ROAM_CONFIGURE_MAWC_CMDID command.

Add rssi reject AP list to the roam params process in function
csr_cm_roam_scan_filter().

Change-Id: I89e6dcac801e552877f7e918d1179dfa3466857a
CRs-Fixed: 2775101
hqu 4 anos atrás
pai
commit
193727e455

+ 28 - 9
components/target_if/connection_mgr/src/target_if_cm_roam_offload.c

@@ -450,12 +450,13 @@ target_if_cm_roam_scan_offload_rssi_thresh(
 		}
 	}
 
-	target_if_debug("good_rssi_threshold %d, early_stop_thresholds en=%d, min=%d, max=%d roam_scan_rssi_thresh=%d, roam_rssi_thresh_diff=%d",
-			req->good_rssi_threshold, req->early_stop_scan_enable,
+	target_if_debug("RSO_CFG: db2dbm enabled:%d, good_rssi_threshold:%d, early_stop_thresholds en:%d, min:%d, max:%d, roam_scan_rssi_thresh:%d, roam_rssi_thresh_diff:%d",
+			db2dbm_enabled, req->good_rssi_threshold,
+			req->early_stop_scan_enable,
 			req->roam_earlystop_thres_min,
 			req->roam_earlystop_thres_max, req->rssi_thresh,
 			req->rssi_thresh_diff);
-	target_if_debug("hirssi max cnt %d, delta %d, hirssi upper bound %d dense rssi thresh offset %d, dense min aps cnt %d, traffic_threshold %d dense_status=%d",
+	target_if_debug("RSO_CFG: hirssi max cnt:%d, delta:%d, hirssi upper bound:%d, dense rssi thresh offset:%d, dense min aps cnt:%d, traffic_threshold:%d, dense_status:%d",
 			req->hi_rssi_scan_max_count,
 			req->hi_rssi_scan_rssi_delta,
 			req->hi_rssi_scan_rssi_ub,
@@ -463,11 +464,22 @@ target_if_cm_roam_scan_offload_rssi_thresh(
 			req->dense_min_aps_cnt,
 			req->traffic_threshold,
 			req->initial_dense_status);
-	target_if_debug("BG Scan Bad RSSI:%d, bitmap:0x%x Offset for 2G to 5G Roam:%d",
+	target_if_debug("RSO_CFG: raise rssi threshold 5g:%d, drop rssi threshold 5g:%d, penalty threshold 5g:%d, boost threshold 5g:%d",
+			req->raise_rssi_thresh_5g,
+			req->drop_rssi_thresh_5g,
+			req->penalty_threshold_5g,
+			req->boost_threshold_5g);
+	target_if_debug("RSO_CFG: raise factor 5g:%d, drop factor 5g:%d, max raise rssi 5g:%d, max drop rssi 5g:%d, rssi threshold offset 5g:%d",
+			req->raise_factor_5g,
+			req->raise_factor_5g,
+			req->max_raise_rssi_5g,
+			req->max_drop_rssi_5g,
+			req->rssi_thresh_offset_5g);
+	target_if_debug("RSO_CFG: BG Scan Bad RSSI:%d, bitmap:0x%x Offset for 2G to 5G Roam:%d",
 			req->bg_scan_bad_rssi_thresh,
 			req->bg_scan_client_bitmap,
 			req->roam_bad_rssi_thresh_offset_2g);
-	target_if_debug("Roam data rssi triggers:0x%x, threshold:%d, rx time:%d",
+	target_if_debug("RSO_CFG: Roam data rssi triggers:0x%x, threshold:%d, rx time:%d",
 			req->roam_data_rssi_threshold_triggers,
 			req->roam_data_rssi_threshold,
 			req->rx_data_inactivity_time);
@@ -684,6 +696,10 @@ target_if_cm_roam_scan_filter(wmi_unified_t wmi_handle, uint8_t command,
 		}
 	}
 
+	target_if_debug("RSO_CFG: op_bitmap:0x%x num_rssi_rejection_ap:%d delta_rssi:%d",
+			req->filter_params.op_bitmap,
+			req->filter_params.num_rssi_rejection_ap,
+			req->filter_params.delta_rssi);
 	status = wmi_unified_roam_scan_filter_cmd(wmi_handle,
 						  &req->filter_params);
 	return status;
@@ -702,9 +718,12 @@ static QDF_STATUS
 target_if_cm_roam_scan_btm_offload(wmi_unified_t wmi_handle,
 				   struct wlan_roam_btm_config *req)
 {
-	target_if_debug("vdev %u btm_offload:%u btm_query_bitmask:%u btm_candidate_min_score:%d",
+	target_if_debug("RSO_CFG: vdev_id:%u btm_offload:%u btm_query_bitmask:%u btm_candidate_min_score:%u",
 			req->vdev_id, req->btm_offload_config,
 			req->btm_query_bitmask, req->btm_candidate_min_score);
+	target_if_debug("RSO_CFG: btm_solicited_timeout:%u btm_max_attempt_cnt:%u btm_sticky_time:%u disassoc_timer_threshold:%u",
+			req->btm_solicited_timeout, req->btm_max_attempt_cnt,
+			req->btm_sticky_time, req->disassoc_timer_threshold);
 
 	return wmi_unified_send_btm_config(wmi_handle, req);
 }
@@ -771,7 +790,7 @@ target_if_cm_roam_bss_load_config(wmi_unified_t wmi_handle,
 		req->rssi_threshold_24ghz &= 0x000000ff;
 	}
 
-	target_if_debug("Bss load trig params vdev %u threshold %u sample_time: %u 5Ghz RSSI threshold:%d 2.4G rssi threshold:%d",
+	target_if_debug("RSO_CFG: bss load trig params vdev_id:%u threshold:%u sample_time:%u 5Ghz RSSI threshold:%d 2.4G rssi threshold:%d",
 			req->vdev_id, req->bss_load_threshold,
 			req->bss_load_sample_time, req->rssi_threshold_5ghz,
 			req->rssi_threshold_24ghz);
@@ -948,9 +967,9 @@ target_if_cm_roam_send_start(struct wlan_objmgr_vdev *vdev,
 		if (QDF_IS_STATUS_ERROR(status)) {
 			target_if_err("Sending roaming MAWC params failed");
 			goto end;
-		} else {
-			target_if_debug("MAWC roaming not supported by firmware");
 		}
+	} else {
+		target_if_debug("MAWC roaming not supported by firmware");
 	}
 
 	status = target_if_cm_roam_scan_offload_mode(wmi_handle,

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

@@ -4023,6 +4023,18 @@ send_offload_11k_cmd_tlv(wmi_unified_t wmi_handle,
 			     neighbor_report_offload->ssid.ssid_len);
 	}
 
+	wmi_debug("RSO_CFG: 11k_bitmask:%u time_offset:%u low_rssi_offset:%u bmiss_count_trigger:%u per_threshold_offset%u",
+		  params->offload_11k_bitmask,
+		  params->neighbor_report_params.time_offset,
+		  params->neighbor_report_params.low_rssi_offset,
+		  params->neighbor_report_params.bmiss_count_trigger,
+		  params->neighbor_report_params.per_threshold_offset);
+	wmi_debug("RSO_CFG: neighbor_report_cache_timeout:%u max_neighbor_report_req_cap:%u SSID:%.*s",
+		  params->neighbor_report_params.neighbor_report_cache_timeout,
+		  params->neighbor_report_params.max_neighbor_report_req_cap,
+		  params->neighbor_report_params.ssid.length,
+		  params->neighbor_report_params.ssid.ssid);
+
 	wmi_mtrace(WMI_11K_OFFLOAD_REPORT_CMDID, cmd->vdev_id, 0);
 	status = wmi_unified_cmd_send(wmi_handle, buf, len,
 				      WMI_11K_OFFLOAD_REPORT_CMDID);

+ 31 - 13
core/sme/src/csr/csr_api_roam.c

@@ -17838,6 +17838,7 @@ static void check_allowed_ssid_list(struct roam_offload_scan_req *req_buffer,
 		roam_params->num_ssid_allowed_list++;
 	}
 }
+#endif
 
 /**
  * csr_add_rssi_reject_ap_list() - add rssi reject AP list to the
@@ -17880,7 +17881,6 @@ csr_add_rssi_reject_ap_list(struct mac_context *mac_ctx,
 
 	qdf_mem_free(reject_list);
 }
-#endif
 
 /**
  * csr_update_11k_offload_params - Update 11K offload params
@@ -20766,6 +20766,14 @@ csr_cm_roam_scan_filter(struct mac_context *mac_ctx, uint8_t vdev_id,
 	scan_filter_params->reason = reason;
 	params = &scan_filter_params->filter_params;
 	roam_params = &mac_ctx->roam.configParam.roam_params;
+	/*
+	 * If rssi disallow bssid list have any member
+	 * fill it and send it to firmware so that firmware does not
+	 * try to roam to these BSS until RSSI OR time condition are
+	 * matched.
+	 */
+	csr_add_rssi_reject_ap_list(mac_ctx, roam_params);
+
 	if (command != ROAM_SCAN_OFFLOAD_STOP) {
 		switch (reason) {
 		case REASON_ROAM_SET_BLACKLIST_BSSID:
@@ -20803,7 +20811,9 @@ csr_cm_roam_scan_filter(struct mac_context *mac_ctx, uint8_t vdev_id,
 		 * across connections.
 		 */
 		op_bitmap = 0x2 | 0x4;
-		num_ssid_white_list = roam_params->num_ssid_allowed_list;
+		if (reason == REASON_ROAM_SET_SSID_ALLOWED)
+			num_ssid_white_list =
+					roam_params->num_ssid_allowed_list;
 		num_bssid_preferred_list = roam_params->num_bssid_favored;
 	}
 
@@ -20816,8 +20826,11 @@ csr_cm_roam_scan_filter(struct mac_context *mac_ctx, uint8_t vdev_id,
 	params->num_rssi_rejection_ap = num_rssi_rejection_ap;
 	params->delta_rssi =
 		wlan_blm_get_rssi_blacklist_threshold(mac_ctx->pdev);
-	qdf_mem_copy(params->bssid_avoid_list, roam_params->bssid_avoid_list,
-		     MAX_BSSID_AVOID_LIST * sizeof(struct qdf_mac_addr));
+	if (params->num_bssid_black_list)
+		qdf_mem_copy(params->bssid_avoid_list,
+			     roam_params->bssid_avoid_list,
+			     MAX_BSSID_AVOID_LIST *
+					sizeof(struct qdf_mac_addr));
 
 	for (i = 0; i < num_ssid_white_list; i++) {
 		qdf_mem_copy(params->ssid_allowed_list[i].ssid,
@@ -20833,14 +20846,18 @@ csr_cm_roam_scan_filter(struct mac_context *mac_ctx, uint8_t vdev_id,
 	for (i = 0; i < params->num_bssid_black_list; i++)
 		sme_debug("Blacklist bssid[%d]:" QDF_MAC_ADDR_FMT, i,
 			  QDF_MAC_ADDR_REF(params->bssid_avoid_list[i].bytes));
-	qdf_mem_copy(params->bssid_favored, roam_params->bssid_favored,
-		     MAX_BSSID_FAVORED * sizeof(struct qdf_mac_addr));
-	qdf_mem_copy(params->bssid_favored_factor,
-		     roam_params->bssid_favored_factor, MAX_BSSID_FAVORED);
-	qdf_mem_copy(params->rssi_rejection_ap,
-		     roam_params->rssi_reject_bssid_list,
-		     MAX_RSSI_AVOID_BSSID_LIST *
-			sizeof(struct reject_ap_config_params));
+	if (params->num_bssid_preferred_list) {
+		qdf_mem_copy(params->bssid_favored, roam_params->bssid_favored,
+			     MAX_BSSID_FAVORED * sizeof(struct qdf_mac_addr));
+		qdf_mem_copy(params->bssid_favored_factor,
+			     roam_params->bssid_favored_factor,
+			     MAX_BSSID_FAVORED);
+	}
+	if (params->num_rssi_rejection_ap)
+		qdf_mem_copy(params->rssi_rejection_ap,
+			     roam_params->rssi_reject_bssid_list,
+			     MAX_RSSI_AVOID_BSSID_LIST *
+			     sizeof(struct reject_ap_config_params));
 
 	for (i = 0; i < params->num_bssid_preferred_list; i++)
 		sme_debug("Preferred Bssid[%d]:"QDF_MAC_ADDR_FMT" score: %d", i,
@@ -21009,7 +21026,8 @@ wlan_cm_roam_fill_stop_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
 	 * Disable offload_11k_params for current vdev
 	 */
 	req->roam_11k_params.vdev_id = vdev_id;
-
+	csr_cm_roam_scan_filter(mac_ctx, vdev_id, ROAM_SCAN_OFFLOAD_STOP,
+				reason, &req->scan_filter_params);
 	csr_cm_roam_scan_offload_fill_rso_configs(mac_ctx, session,
 						  &req->rso_config,
 						  NULL,

+ 27 - 11
core/wma/src/wma_scan_roam.c

@@ -689,8 +689,9 @@ wma_roam_scan_offload_rssi_thresh(tp_wma_handle wma_handle,
 	params.rssi_thresh_offset_5g =
 		roam_req->rssi_thresh_offset_5g;
 
-	wma_debug("good_rssi_threshold %d, early_stop_thresholds en=%d, min=%d, max=%d roam_scan_rssi_thresh=%d, roam_rssi_thresh_diff=%d",
-		  params.good_rssi_threshold, roam_req->early_stop_scan_enable,
+	wma_debug("db2dbm enabled:%d, good_rssi_threshold:%d, early_stop_thresholds en:%d, min:%d, max:%d, roam_scan_rssi_thresh:%d, roam_rssi_thresh_diff:%d",
+		  db2dbm_enabled, params.good_rssi_threshold,
+		  roam_req->early_stop_scan_enable,
 		  params.roam_earlystop_thres_min,
 		  params.roam_earlystop_thres_max, rssi_thresh,
 		  rssi_thresh_diff);
@@ -702,12 +703,20 @@ wma_roam_scan_offload_rssi_thresh(tp_wma_handle wma_handle,
 		return status;
 	}
 
-	wma_debug("hirssi max cnt %d, delta %d, hirssi upper bound %d dense rssi thresh offset %d, dense min aps cnt %d, traffic_threshold %d dense_status=%d",
-		  hirssi_scan_max_count, hirssi_scan_delta, hirssi_upper_bound,
+	wma_debug("hirssi max cnt:%d, delta:%d, hirssi upper bound:%d, dense rssi thresh offset:%d, dense min aps cnt:%d, traffic_threshold:%d, dense_status:%d",
+		  hirssi_scan_max_count, hirssi_scan_delta,
+		  params.hi_rssi_scan_rssi_ub,
 		  roam_params->dense_rssi_thresh_offset,
 		  roam_params->dense_min_aps_cnt,
 		  roam_params->traffic_threshold,
 		  roam_params->initial_dense_status);
+	wma_debug("raise rssi threshold 5g:%d, drop rssi threshold 5g:%d, penalty threshold 5g:%d, boost threshold 5g:%d",
+		  params.raise_rssi_thresh_5g, roam_params->drop_rssi_thresh_5g,
+		  params.penalty_threshold_5g, params.boost_threshold_5g);
+	wma_debug("raise factor 5g:%d, drop factor 5g:%d, max raise rssi 5g:%d, max drop rssi 5g:%d, rssi threshold offset 5g:%d",
+		  params.raise_factor_5g, params.raise_factor_5g,
+		  params.max_raise_rssi_5g, params.max_drop_rssi_5g,
+		  params.rssi_thresh_offset_5g);
 	wma_debug("BG Scan Bad RSSI:%d, bitmap:0x%x Offset for 2G to 5G Roam:%d",
 		  roam_params->bg_scan_bad_rssi_thresh,
 		  roam_params->bg_scan_client_bitmap,
@@ -1522,6 +1531,10 @@ static QDF_STATUS wma_roam_scan_filter(tp_wma_handle wma_handle,
 	qdf_mem_copy(params->bssid_avoid_list, roam_params->bssid_avoid_list,
 			MAX_BSSID_AVOID_LIST * sizeof(struct qdf_mac_addr));
 
+	wma_debug("op_bitmap:0x%x num_rssi_rejection_ap:%d delta_rssi:%d",
+		  params->op_bitmap, params->num_rssi_rejection_ap,
+		  params->delta_rssi);
+
 	for (i = 0; i < num_ssid_white_list; i++) {
 		qdf_mem_copy(params->ssid_allowed_list[i].ssid,
 				roam_params->ssid_allowed_list[i].ssId,
@@ -1664,9 +1677,12 @@ wma_roam_scan_btm_offload(tp_wma_handle wma_handle,
 	params->btm_candidate_min_score =
 			roam_req->btm_trig_min_candidate_score;
 
-	wma_debug("vdev %u btm_offload:%u btm_query_bitmask:%u btm_candidate_min_score:%d",
-		 params->vdev_id, params->btm_offload_config,
-		 params->btm_query_bitmask, params->btm_candidate_min_score);
+	wma_debug("vdev_id:%u btm_offload:%u btm_query_bitmask:%u btm_candidate_min_score:%u",
+		  params->vdev_id, params->btm_offload_config,
+		  params->btm_query_bitmask, params->btm_candidate_min_score);
+	wma_debug("btm_solicited_timeout:%u btm_max_attempt_cnt:%u btm_sticky_time:%u disassoc_timer_threshold:%u",
+		  params->btm_solicited_timeout, params->btm_max_attempt_cnt,
+		  params->btm_sticky_time, params->disassoc_timer_threshold);
 
 	status = wmi_unified_send_btm_config(wma_handle->wmi_handle, params);
 	qdf_mem_free(params);
@@ -1705,10 +1721,10 @@ void wma_send_roam_bss_load_config(WMA_HANDLE handle,
 		params->rssi_threshold_24ghz &= 0x000000ff;
 	}
 
-	wma_debug("Bss load trig params vdev %u threshold %u sample_time: %u 5Ghz RSSI threshold:%d 2.4G rssi threshold:%d",
-		 params->vdev_id, params->bss_load_threshold,
-		 params->bss_load_sample_time, params->rssi_threshold_5ghz,
-		 params->rssi_threshold_24ghz);
+	wma_debug("Bss load trig params vdev_id:%u threshold:%u sample_time:%u 5Ghz RSSI threshold:%d 2.4G rssi threshold:%d",
+		  params->vdev_id, params->bss_load_threshold,
+		  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);