Browse Source

qcacld-3.0: Update calls to QDF_TRACE_RATE_LIMITED

QDF_TRACE_RATE_LIMITED recently lost its 'rate' parameter in
I31a3f48f68fb6bc67f59f3157a635345943d3331. Update call sites to account
for this change.

Change-Id: I301a36a445be4ecc3e1d24e007d7ca6f05898fc5
CRs-Fixed: 2205796
Dustin Brown 7 years ago
parent
commit
897dae4376

+ 8 - 22
components/ocb/core/inc/wlan_ocb_main.h

@@ -29,28 +29,14 @@
 #include <wlan_objmgr_vdev_obj.h>
 #include <wlan_ocb_public_structs.h>
 
-#define ocb_log_ratelimited(rate, level, args...) \
-		QDF_TRACE_RATE_LIMITED(rate, QDF_MODULE_ID_OCB, level, ## args)
-#define ocb_log_ratelimited_fl(rate, level, format, args...) \
-		ocb_log_ratelimited(rate, level, FL(format), ## args)
-#define ocb_alert_ratelimited(rate, format, args...) \
-		ocb_log_ratelimited_fl(rate, QDF_TRACE_LEVEL_FATAL,\
-			format, ## args)
-#define ocb_err_ratelimited(rate, format, args...) \
-		ocb_log_ratelimited_fl(rate, QDF_TRACE_LEVEL_ERROR,\
-			format, ## args)
-#define ocb_warn_ratelimited(rate, format, args...) \
-		ocb_log_ratelimited_fl(rate, QDF_TRACE_LEVEL_WARN,\
-			format, ## args)
-#define ocb_notice_ratelimited(rate, format, args...) \
-		ocb_log_ratelimited_fl(rate, QDF_TRACE_LEVEL_INFO,\
-			format, ## args)
-#define ocb_info_ratelimited(rate, format, args...) \
-		ocb_log_ratelimited_fl(rate, QDF_TRACE_LEVEL_INFO,\
-			format, ## args)
-#define ocb_debug_ratelimited(rate, format, args...) \
-		ocb_log_ratelimited_fl(rate, QDF_TRACE_LEVEL_DEBUG,\
-			format, ## args)
+#define __ocb_log_rl(level, format, args...) \
+	QDF_TRACE_RATE_LIMITED(QDF_MODULE_ID_OCB, level, FL(format), ## args)
+
+#define ocb_alert_rl(params...) __ocb_log_rl(QDF_TRACE_LEVEL_FATAL, params)
+#define ocb_err_rl(params...) __ocb_log_rl(QDF_TRACE_LEVEL_ERROR, params)
+#define ocb_warn_rl(params...) __ocb_log_rl(QDF_TRACE_LEVEL_WARN, params)
+#define ocb_info_rl(params...) __ocb_log_rl(QDF_TRACE_LEVEL_INFO, params)
+#define ocb_debug_rl(params...) __ocb_log_rl(QDF_TRACE_LEVEL_DEBUG, params)
 
 #define ocb_log(level, args...) \
 		QDF_TRACE(QDF_MODULE_ID_OCB, level, ## args)

+ 8 - 22
core/hdd/inc/wlan_hdd_main.h

@@ -226,28 +226,14 @@
 
 #define WLAN_CHIP_VERSION   "WCNSS"
 
-#define hdd_log_ratelimited(rate, level, args...) \
-		QDF_TRACE_RATE_LIMITED(rate, QDF_MODULE_ID_HDD, level, ## args)
-#define hdd_log_ratelimited_fl(rate, level, format, args...) \
-		hdd_log_ratelimited(rate, level, FL(format), ## args)
-#define hdd_alert_ratelimited(rate, format, args...) \
-		hdd_log_ratelimited_fl(rate, QDF_TRACE_LEVEL_FATAL,\
-			format, ## args)
-#define hdd_err_ratelimited(rate, format, args...) \
-		hdd_log_ratelimited_fl(rate, QDF_TRACE_LEVEL_ERROR,\
-			format, ## args)
-#define hdd_warn_ratelimited(rate, format, args...) \
-		hdd_log_ratelimited_fl(rate, QDF_TRACE_LEVEL_WARN,\
-			format, ## args)
-#define hdd_notice_ratelimited(rate, format, args...) \
-		hdd_log_ratelimited_fl(rate, QDF_TRACE_LEVEL_INFO,\
-			format, ## args)
-#define hdd_info_ratelimited(rate, format, args...) \
-		hdd_log_ratelimited_fl(rate, QDF_TRACE_LEVEL_INFO,\
-			format, ## args)
-#define hdd_debug_ratelimited(rate, format, args...) \
-		hdd_log_ratelimited_fl(rate, QDF_TRACE_LEVEL_DEBUG,\
-			format, ## args)
+#define __hdd_log_rl(level, format, args...) \
+	QDF_TRACE_RATE_LIMITED(QDF_MODULE_ID_HDD, level, FL(format), ## args)
+
+#define hdd_alert_rl(params...) __hdd_log_rl(QDF_TRACE_LEVEL_FATAL, params)
+#define hdd_err_rl(params...) __hdd_log_rl(QDF_TRACE_LEVEL_ERROR, params)
+#define hdd_warn_rl(params...) __hdd_log_rl(QDF_TRACE_LEVEL_WARN, params)
+#define hdd_info_rl(params...) __hdd_log_rl(QDF_TRACE_LEVEL_INFO, params)
+#define hdd_debug_rl(params...) __hdd_log_rl(QDF_TRACE_LEVEL_DEBUG, params)
 
 #define hdd_log(level, args...) QDF_TRACE(QDF_MODULE_ID_HDD, level, ## args)
 #define hdd_logfl(level, format, args...) hdd_log(level, FL(format), ## args)

+ 2 - 8
core/hdd/src/wlan_hdd_scan.c

@@ -63,11 +63,6 @@
 #define SCAN_DONE_EVENT_BUF_SIZE 4096
 #define RATE_MASK 0x7f
 
-/*
- * Count to ratelimit the HDD logs during Scan and connect
- */
-#define HDD_SCAN_REJECT_RATE_LIMIT 5
-
 /**
  * enum essid_bcast_type - SSID broadcast type
  * @eBCAST_UNKNOWN: Broadcast unknown
@@ -534,9 +529,8 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
 	/* Check if scan is allowed at this point of time */
 	if (hdd_is_connection_in_progress(&curr_session_id, &curr_reason)) {
 		scan_ebusy_cnt++;
-		hdd_err_ratelimited(HDD_SCAN_REJECT_RATE_LIMIT,
-			"Scan not allowed. scan_ebusy_cnt: %d Session %d Reason %d",
-			scan_ebusy_cnt, curr_session_id, curr_reason);
+		hdd_err_rl("Scan not allowed. scan_ebusy_cnt: %d Session %d Reason %d",
+			   scan_ebusy_cnt, curr_session_id, curr_reason);
 		if (hdd_ctx->last_scan_reject_session_id != curr_session_id ||
 		    hdd_ctx->last_scan_reject_reason != curr_reason ||
 		    !hdd_ctx->last_scan_reject_timestamp) {

+ 1 - 8
core/hdd/src/wlan_hdd_tx_rx.c

@@ -65,11 +65,6 @@
 #include "wlan_hdd_power.h"
 #include <wlan_hdd_tsf.h>
 
-/*
- * Count to ratelimit the HDD logs during TX failures
- */
-#define HDD_TX_BLOCKED_RATE 256
-
 #ifdef QCA_LL_TX_FLOW_CONTROL_V2
 /*
  * Mapping Linux AC interpretation to SME AC.
@@ -539,9 +534,7 @@ static inline bool hdd_is_tx_allowed(struct sk_buff *skb, uint8_t peer_id)
 	peer = cdp_peer_find_by_local_id(soc, pdev, peer_id);
 
 	if (peer == NULL) {
-		hdd_err_ratelimited(HDD_TX_BLOCKED_RATE,
-				    "Unable to find peer entry for staid: %d",
-				    peer_id);
+		hdd_err_rl("Unable to find peer entry for staid: %d", peer_id);
 		return false;
 	}
 

+ 10 - 24
core/mac/src/include/sir_debug.h

@@ -1,9 +1,9 @@
 /*
- * Copyright (c) 2011-2012, 2014-2015, 2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2012, 2014-2015, 2017-2018 The Linux Foundation. All
+ * rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
- *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
  * above copyright notice and this permission notice appear in all
@@ -46,28 +46,14 @@
 #define MAC_ADDR_ARRAY(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
 #define MAC_ADDRESS_STR "%02x:%02x:%02x:%02x:%02x:%02x"
 
-#define pe_log_rate_limited(rate, level, args...) \
-		QDF_TRACE_RATE_LIMITED(rate, QDF_MODULE_ID_PE, level, ## args)
-#define pe_log_rate_limited_fl(rate, level, format, args...) \
-		pe_log_rate_limited(rate, level, FL(format), ## args)
-#define pe_alert_rate_limited(rate, format, args...) \
-		pe_log_rate_limited_fl(rate, QDF_TRACE_LEVEL_FATAL,\
-			format, ## args)
-#define pe_err_rate_limited(rate, format, args...) \
-		pe_log_rate_limited_fl(rate, QDF_TRACE_LEVEL_ERROR,\
-			format, ## args)
-#define pe_warn_rate_limited(rate, format, args...) \
-		pe_log_rate_limited_fl(rate, QDF_TRACE_LEVEL_WARN,\
-			format, ## args)
-#define pe_notice_rate_limited(rate, format, args...) \
-		pe_log_rate_limited_fl(rate, QDF_TRACE_LEVEL_INFO,\
-			format, ## args)
-#define pe_info_rate_limited(rate, format, args...) \
-		pe_log_rate_limited_fl(rate, QDF_TRACE_LEVEL_INFO,\
-			format, ## args)
-#define pe_debug_rate_limited(rate, format, args...) \
-		pe_log_rate_limited_fl(rate, QDF_TRACE_LEVEL_DEBUG,\
-			format, ## args)
+#define __pe_log_rl(level, format, args...) \
+	QDF_TRACE_RATE_LIMITED(QDF_MODULE_ID_PE, level, FL(format), ## args)
+
+#define pe_alert_rl(params...) __pe_log_rl(QDF_TRACE_LEVEL_FATAL, params)
+#define pe_err_rl(params...) __pe_log_rl(QDF_TRACE_LEVEL_ERROR, params)
+#define pe_warn_rl(params...) __pe_log_rl(QDF_TRACE_LEVEL_WARN, params)
+#define pe_info_rl(params...) __pe_log_rl(QDF_TRACE_LEVEL_INFO, params)
+#define pe_debug_rl(params...) __pe_log_rl(QDF_TRACE_LEVEL_DEBUG, params)
 
 #define pe_log(level, args...) QDF_TRACE(QDF_MODULE_ID_PE, level, ## args)
 #define pe_logfl(level, format, args...) pe_log(level, FL(format), ## args)

+ 1 - 2
core/mac/src/pe/lim/lim_api.c

@@ -1238,7 +1238,6 @@ static QDF_STATUS pe_drop_pending_rx_mgmt_frames(tpAniSirGlobal mac_ctx,
  *
  * Return: QDF_STATUS_SUCCESS - in case of success
  */
- #define ERROR_LOG_RATE_LIMIT     16
 static QDF_STATUS pe_handle_mgmt_frame(struct wlan_objmgr_psoc *psoc,
 			struct wlan_objmgr_peer *peer, qdf_nbuf_t buf,
 			struct mgmt_rx_event_params *mgmt_rx_params,
@@ -1268,7 +1267,7 @@ static QDF_STATUS pe_handle_mgmt_frame(struct wlan_objmgr_psoc *psoc,
 
 	ret = wma_form_rx_packet(buf, mgmt_rx_params, pVosPkt);
 	if (ret) {
-		pe_err_rate_limited(ERROR_LOG_RATE_LIMIT, "Failed to fill cds packet from event buffer");
+		pe_err_rl("Failed to fill cds packet from event buffer");
 		return QDF_STATUS_E_FAILURE;
 	}
 

+ 1 - 2
core/mac/src/pe/lim/lim_utils.c

@@ -6659,8 +6659,7 @@ void lim_update_extcap_struct(tpAniSirGlobal mac_ctx,
 	}
 
 	if (DOT11F_EID_EXTCAP != buf[0] || buf[1] > DOT11F_IE_EXTCAP_MAX_LEN) {
-		pe_debug_rate_limited(30, "Invalid IEs eid: %d elem_len: %d",
-				buf[0], buf[1]);
+		pe_debug_rl("Invalid IEs eid: %d elem_len: %d", buf[0], buf[1]);
 		return;
 	}
 

+ 7 - 13
core/mac/src/sys/legacy/src/utils/src/parser_api.c

@@ -2144,8 +2144,7 @@ sir_convert_probe_req_frame2_struct(tpAniSirGlobal pMac,
 	}
 
 	if (!pr.SuppRates.present) {
-		pe_debug_rate_limited(30,
-				"Mandatory IE Supported Rates not present!");
+		pe_debug_rl("Mandatory IE Supported Rates not present!");
 		return eSIR_FAILURE;
 	} else {
 		pProbeReq->suppRatesPresent = 1;
@@ -2417,8 +2416,7 @@ tSirRetStatus sir_convert_probe_frame2_struct(tpAniSirGlobal pMac,
 	}
 
 	if (!pr->SuppRates.present) {
-		pe_debug_rate_limited(30,
-				"Mandatory IE Supported Rates not present!");
+		pe_debug_rl("Mandatory IE Supported Rates not present!");
 	} else {
 		pProbeResp->suppRatesPresent = 1;
 		convert_supp_rates(pMac, &pProbeResp->supportedRates,
@@ -3018,8 +3016,7 @@ sir_convert_assoc_resp_frame2_struct(tpAniSirGlobal pMac,
 
 	if (!ar->SuppRates.present) {
 		pAssocRsp->suppRatesPresent = 0;
-		pe_debug_rate_limited(30,
-				"Mandatory IE Supported Rates not present!");
+		pe_debug_rl("Mandatory IE Supported Rates not present!");
 	} else {
 		pAssocRsp->suppRatesPresent = 1;
 		convert_supp_rates(pMac, &pAssocRsp->supportedRates,
@@ -3415,8 +3412,7 @@ sir_beacon_ie_ese_bcn_report(tpAniSirGlobal pMac,
 	}
 
 	if (!pBies->SuppRates.present) {
-		pe_debug_rate_limited(30,
-				"Mandatory IE Supported Rates not present!");
+		pe_debug_rl("Mandatory IE Supported Rates not present!");
 	} else {
 		eseBcnReportMandatoryIe.suppRatesPresent = 1;
 		convert_supp_rates(pMac, &eseBcnReportMandatoryIe.supportedRates,
@@ -3711,8 +3707,7 @@ sir_parse_beacon_ie(tpAniSirGlobal pMac,
 	}
 
 	if (!pBies->SuppRates.present) {
-		pe_debug_rate_limited(30,
-				"Mandatory IE Supported Rates not present!");
+		pe_debug_rl("Mandatory IE Supported Rates not present!");
 	} else {
 		pBeaconStruct->suppRatesPresent = 1;
 		convert_supp_rates(pMac, &pBeaconStruct->supportedRates,
@@ -4064,8 +4059,7 @@ sir_convert_beacon_frame2_struct(tpAniSirGlobal pMac,
 	}
 
 	if (!pBeacon->SuppRates.present) {
-		pe_debug_rate_limited(30,
-				"Mandatory IE Supported Rates not present!");
+		pe_debug_rl("Mandatory IE Supported Rates not present!");
 	} else {
 		pBeaconStruct->suppRatesPresent = 1;
 		convert_supp_rates(pMac, &pBeaconStruct->supportedRates,
@@ -4165,7 +4159,7 @@ sir_convert_beacon_frame2_struct(tpAniSirGlobal pMac,
 		pBeaconStruct->channelNumber = pBeacon->HTInfo.primaryChannel;
 	} else {
 		pBeaconStruct->channelNumber = mappedRXCh;
-		pe_debug_rate_limited(30, "In Beacon No Channel info");
+		pe_debug_rl("In Beacon No Channel info");
 	}
 
 	if (pBeacon->RSN.present) {