Sfoglia il codice sorgente

qcacmn: Introduce reg_err_rl to avoid print flood

Print floods are observed in the APIs below:

1) reg_get_curr_regdomain
2) reg_is_etsi13_regdmn
3) reg_freq_to_chan

Add a new macro reg_err_rl and assign QDF_TRACE_ERROR_RL. Use reg_err_rl
instead of reg_err, to avoid print flood.

Change-Id: I5c1da71febd61449bfbff508797c60bb88849122
CRs-Fixed: 2552008
Hariharan Basuthkar 5 anni fa
parent
commit
3d4c345f51

+ 2 - 0
umac/regulatory/core/src/reg_priv_objs.h

@@ -29,6 +29,8 @@
 	QDF_TRACE_FATAL(QDF_MODULE_ID_REGULATORY, params)
 #define reg_err(params...) \
 	QDF_TRACE_ERROR(QDF_MODULE_ID_REGULATORY, params)
+#define reg_err_rl(params...) \
+	QDF_TRACE_ERROR_RL(QDF_MODULE_ID_REGULATORY, params)
 #define reg_warn(params...) \
 	QDF_TRACE_WARN(QDF_MODULE_ID_REGULATORY, params)
 #define reg_notice(params...) \

+ 2 - 2
umac/regulatory/core/src/reg_services_common.c

@@ -1664,7 +1664,7 @@ uint32_t reg_freq_to_chan(struct wlan_objmgr_pdev *pdev,
 		(freq - chan_list[count - 1].center_freq) / 5);
 
 end:
-	reg_err("invalid frequency %d", freq);
+	reg_err_rl("invalid frequency %d", freq);
 	return 0;
 }
 
@@ -2057,7 +2057,7 @@ QDF_STATUS reg_get_curr_regdomain(struct wlan_objmgr_pdev *pdev,
 	}
 
 	if (index == num_reg_dmn) {
-		reg_err("invalid regdomain");
+		reg_err_rl("invalid regdomain");
 		return QDF_STATUS_E_FAILURE;
 	}
 

+ 1 - 1
umac/regulatory/core/src/reg_utils.c

@@ -377,7 +377,7 @@ bool reg_is_etsi13_regdmn(struct wlan_objmgr_pdev *pdev)
 
 	status = reg_get_curr_regdomain(pdev, &cur_reg_dmn);
 	if (status != QDF_STATUS_SUCCESS) {
-		reg_err("Failed to get reg domain");
+		reg_err_rl("Failed to get reg domain");
 		return false;
 	}