From cdaca1af95c46eecc3a7482e10d8a9fd754ec3f2 Mon Sep 17 00:00:00 2001 From: Amar Singhal Date: Mon, 17 Sep 2018 13:12:27 -0700 Subject: [PATCH] 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 --- umac/regulatory/core/src/reg_priv.h | 2 ++ umac/regulatory/core/src/reg_services.c | 13 ++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/umac/regulatory/core/src/reg_priv.h b/umac/regulatory/core/src/reg_priv.h index 5966fcce30b0..0367a3dff264 100644 --- a/umac/regulatory/core/src/reg_priv.h +++ b/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) diff --git a/umac/regulatory/core/src/reg_services.c b/umac/regulatory/core/src/reg_services.c index e14856248716..2a6e6bd4a15e 100644 --- a/umac/regulatory/core/src/reg_services.c +++ b/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; }