From abdd65099cb0f47f01be03ecea6b2c1f22e01b94 Mon Sep 17 00:00:00 2001 From: wadesong Date: Thu, 22 Jul 2021 14:21:15 +0800 Subject: [PATCH] qcacmn: Limit log verboseness of some chan change code The log output will be too verbose when the following scenario is hit: 1) hostapd is started on chan 149 with cc=US 2) ref-sta connects to sap 3) ping -i 0.01 to ref-sta from dut 4) set cc=JP on dut and the verbose log output will result in a wlan scheduler watchdog bite on some platforms. Use rate limited versions of log outputting api to avoid the instabilities brought by this. Change-Id: Id87d81070334aab145bae6909857fd5d2851008a CRs-Fixed: 2868738 --- os_if/linux/scan/src/wlan_cfg80211_scan.c | 10 +++++----- umac/regulatory/core/src/reg_services_common.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/os_if/linux/scan/src/wlan_cfg80211_scan.c b/os_if/linux/scan/src/wlan_cfg80211_scan.c index 71d539b883..8208f6de35 100644 --- a/os_if/linux/scan/src/wlan_cfg80211_scan.c +++ b/os_if/linux/scan/src/wlan_cfg80211_scan.c @@ -1846,7 +1846,7 @@ wlan_get_ieee80211_channel(struct wiphy *wiphy, chan = ieee80211_get_channel(wiphy, chan_freq); if (!chan) - osif_err("chan is NULL, freq: %d", chan_freq); + osif_err_rl("chan is NULL, freq: %d", chan_freq); return chan; } @@ -2020,10 +2020,10 @@ void wlan_cfg80211_inform_bss_frame(struct wlan_objmgr_pdev *pdev, bss_data.chan = wlan_get_ieee80211_channel(wiphy, pdev, scan_params->channel.chan_freq); if (!bss_data.chan) { - osif_err("Channel not found for bss "QDF_MAC_ADDR_FMT" seq %d chan_freq %d", - QDF_MAC_ADDR_REF(bss_data.mgmt->bssid), - scan_params->seq_num, - scan_params->channel.chan_freq); + osif_err_rl("Channel not found for bss " QDF_MAC_ADDR_FMT " seq %d chan_freq %d", + QDF_MAC_ADDR_REF(bss_data.mgmt->bssid), + scan_params->seq_num, + scan_params->channel.chan_freq); qdf_mem_free(bss_data.mgmt); return; } diff --git a/umac/regulatory/core/src/reg_services_common.c b/umac/regulatory/core/src/reg_services_common.c index f88dbd87f9..97d584dd1c 100644 --- a/umac/regulatory/core/src/reg_services_common.c +++ b/umac/regulatory/core/src/reg_services_common.c @@ -3327,7 +3327,7 @@ static uint32_t reg_get_channel_flags_from_secondary_list_for_freq( chan_enum = reg_get_chan_enum_for_freq(freq); if (chan_enum == INVALID_CHANNEL) { - reg_err("chan freq is not valid"); + reg_err_rl("chan freq is not valid"); return REGULATORY_CHAN_INVALID; }