Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c96d5095 authored by sheenam monga's avatar sheenam monga
Browse files

qcacld-3.0: Rate limit the logging

Incase peer sends multiple Association
Request or multiple Association Request,
there can be crash due to excessive
logging.

So, rate limit the logging.
Also, this is also valid in case peer
sends multiple Disassociation or
Deauthentication request.

Change-Id: Iec4f70e8154ca0001f6d752f65449bb1d7bce5da
CRs-Fixed: 2891926
parent 3a5b06aa
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2011-2012, 2014-2015, 2017-2019 The Linux Foundation. All
 * Copyright (c) 2011-2012, 2014-2015, 2017-2019, 2021 The Linux Foundation. All
 * rights reserved.
 *
 * Permission to use, copy, modify, and/or distribute this software for
@@ -57,6 +57,10 @@
	QDF_TRACE_INFO_NO_FL(QDF_MODULE_ID_PE, params)
#define pe_nofl_debug(params...) \
	QDF_TRACE_DEBUG_NO_FL(QDF_MODULE_ID_PE, params)
#define pe_nofl_rl_debug(params...) \
	QDF_TRACE_DEBUG_RL_NO_FL(QDF_MODULE_ID_PE, params)
#define pe_nofl_rl_info(params...) \
	QDF_TRACE_INFO_RL_NO_FL(QDF_MODULE_ID_PE, params)

#define PE_ENTER() QDF_TRACE_ENTER(QDF_MODULE_ID_PE, "enter")
#define PE_EXIT() QDF_TRACE_EXIT(QDF_MODULE_ID_PE, "exit")
+6 −6
Original line number Diff line number Diff line
/*
 * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
 *
 * Permission to use, copy, modify, and/or distribute this software for
 * any purpose with or without fee is hereby granted, provided that the
@@ -2244,9 +2244,9 @@ void lim_process_assoc_req_frame(struct mac_context *mac_ctx, uint8_t *rx_pkt_in
	hdr = WMA_GET_RX_MAC_HEADER(rx_pkt_info);
	frame_len = WMA_GET_RX_PAYLOAD_LEN(rx_pkt_info);

	pe_nofl_debug("Assoc req RX: subtype %d vdev %d sys role %d lim state %d rssi %d from " QDF_MAC_ADDR_FMT,
		      sub_type, session->vdev_id, GET_LIM_SYSTEM_ROLE(session),
		      session->limMlmState,
	pe_nofl_rl_debug("Assoc req RX: subtype %d vdev %d sys role %d lim state %d rssi %d from " QDF_MAC_ADDR_FMT,
			 sub_type, session->vdev_id,
			 GET_LIM_SYSTEM_ROLE(session), session->limMlmState,
			 WMA_GET_RX_RSSI_NORMALIZED(rx_pkt_info),
			 QDF_MAC_ADDR_REF(hdr->sa));

+6 −6
Original line number Diff line number Diff line
/*
 * Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
 * Copyright (c) 2011-2021 The Linux Foundation. All rights reserved.
 *
 * Permission to use, copy, modify, and/or distribute this software for
 * any purpose with or without fee is hereby granted, provided that the
@@ -661,7 +661,7 @@ lim_process_assoc_rsp_frame(struct mac_context *mac_ctx,
		return;
	}

	pe_nofl_info("Assoc rsp RX: subtype %d vdev %d sys role %d lim state %d rssi %d from " QDF_MAC_ADDR_FMT,
	pe_nofl_rl_info("Assoc rsp RX: subtype %d vdev %d sys role %d lim state %d rssi %d from " QDF_MAC_ADDR_FMT,
			subtype, session_entry->vdev_id,
			GET_LIM_SYSTEM_ROLE(session_entry),
			session_entry->limMlmState, rssi,
+10 −10
Original line number Diff line number Diff line
/*
 * Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
 * Copyright (c) 2011-2021 The Linux Foundation. All rights reserved.
 *
 * Permission to use, copy, modify, and/or distribute this software for
 * any purpose with or without fee is hereby granted, provided that the
@@ -417,7 +417,7 @@ static void lim_process_sae_auth_frame(struct mac_context *mac_ctx,
	body_ptr = WMA_GET_RX_MPDU_DATA(rx_pkt_info);
	frame_len = WMA_GET_RX_PAYLOAD_LEN(rx_pkt_info);

	pe_nofl_info("SAE Auth RX type %d subtype %d from "QDF_MAC_ADDR_FMT,
	pe_nofl_rl_info("SAE Auth RX type %d subtype %d from " QDF_MAC_ADDR_FMT,
			mac_hdr->fc.type, mac_hdr->fc.subType,
			QDF_MAC_ADDR_REF(mac_hdr->sa));

@@ -1340,7 +1340,7 @@ lim_process_auth_frame(struct mac_context *mac_ctx, uint8_t *rx_pkt_info,
	}
	auth_alg = *(uint16_t *) body_ptr;

	pe_nofl_info("Auth RX: vdev %d sys role %d lim_state %d from " QDF_MAC_ADDR_FMT " rssi %d auth_alg %d seq %d",
	pe_nofl_rl_info("Auth RX: vdev %d sys role %d lim_state %d from " QDF_MAC_ADDR_FMT " rssi %d auth_alg %d seq %d",
			pe_session->vdev_id, GET_LIM_SYSTEM_ROLE(pe_session),
			pe_session->limMlmState,
			QDF_MAC_ADDR_REF(mac_hdr->sa),
+7 −7
Original line number Diff line number Diff line
/*
 * Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
 * Copyright (c) 2011-2021 The Linux Foundation. All rights reserved.
 *
 * Permission to use, copy, modify, and/or distribute this software for
 * any purpose with or without fee is hereby granted, provided that the
@@ -149,7 +149,7 @@ lim_process_deauth_frame(struct mac_context *mac, uint8_t *pRxPacketInfo,
	/* Get reasonCode from Deauthentication frame body */
	reasonCode = sir_read_u16(pBody);

	pe_nofl_info("Deauth RX: vdev %d from "QDF_MAC_ADDR_FMT" for "QDF_MAC_ADDR_FMT" RSSI = %d reason %d mlm state = %d, sme state = %d systemrole = %d ",
	pe_nofl_rl_info("Deauth RX: vdev %d from " QDF_MAC_ADDR_FMT " for " QDF_MAC_ADDR_FMT " RSSI = %d reason %d mlm state = %d, sme state = %d systemrole = %d ",
			pe_session->vdev_id, QDF_MAC_ADDR_REF(pHdr->sa),
			QDF_MAC_ADDR_REF(pHdr->da), frame_rssi,
			reasonCode, pe_session->limMlmState,
Loading