Переглянути джерело

qcacmn: Put debug log when channel number is out of range

Channel number being out of range is not expected for a pdev. Put debug
log for the same.

Change-Id: Iaccec084e2bc22a3955915ad48a55d16963b49a5
CRs-Fixed: 2316097
Amar Singhal 6 роки тому
батько
коміт
cdaca1af95

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

@@ -40,6 +40,8 @@
 	QDF_TRACE_INFO(QDF_MODULE_ID_REGULATORY, params)
 #define reg_debug(params...) \
 	QDF_TRACE_DEBUG(QDF_MODULE_ID_REGULATORY, params)
+#define reg_debug_rl(params...) \
+	QDF_TRACE_DEBUG_RL(QDF_MODULE_ID_REGULATORY, params)
 
 #define reg_nofl_alert(params...) \
 	QDF_TRACE_FATAL_NO_FL(QDF_MODULE_ID_REGULATORY, params)

+ 6 - 7
umac/regulatory/core/src/reg_services.c

@@ -1848,17 +1848,16 @@ uint32_t reg_chan_to_freq(struct wlan_objmgr_pdev *pdev,
 	for (count = 0; count < NUM_CHANNELS; count++)
 		if (chan_list[count].chan_num == chan_num) {
 			if (reg_chan_in_range(chan_list,
-						pdev_priv_obj->range_2g_low,
-						pdev_priv_obj->range_2g_high,
-						pdev_priv_obj->range_5g_low,
-						pdev_priv_obj->range_5g_high,
-						count)) {
+					      pdev_priv_obj->range_2g_low,
+					      pdev_priv_obj->range_2g_high,
+					      pdev_priv_obj->range_5g_low,
+					      pdev_priv_obj->range_5g_high,
+					      count)) {
 				return chan_list[count].center_freq;
 			}
 		}
 
-
-	reg_err("invalid channel %d", chan_num);
+	reg_debug_rl("invalid channel %d", chan_num);
 
 	return 0;
 }