Jelajahi Sumber

qcacld-3.0: Clean up probe req after HB failed code

Since HB failed logic change to send deauth, we don't
need probe logic after HB failed. Clean up timer and
unnecessary code.

Change-Id: I26d9235c157065a21469b01abf31751825a1f277
CRs-Fixed: 3158364
chunquan 3 tahun lalu
induk
melakukan
ae8134b2ce

+ 0 - 2
components/mlme/core/src/wlan_mlme_main.c

@@ -715,8 +715,6 @@ static void mlme_init_timeout_cfg(struct wlan_objmgr_psoc *psoc,
 			cfg_get(psoc, CFG_ASSOC_FAILURE_TIMEOUT);
 	timeouts->reassoc_failure_timeout =
 			cfg_get(psoc, CFG_REASSOC_FAILURE_TIMEOUT);
-	timeouts->probe_after_hb_fail_timeout =
-			cfg_get(psoc, CFG_PROBE_AFTER_HB_FAIL_TIMEOUT);
 	timeouts->olbc_detect_timeout =
 			cfg_get(psoc, CFG_OLBC_DETECT_TIMEOUT);
 	timeouts->addts_rsp_timeout =

+ 1 - 22
components/mlme/dispatcher/inc/cfg_mlme_timeout.h

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2011-2019, 2021 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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
@@ -128,27 +129,6 @@
 		CFG_VALUE_OR_DEFAULT, \
 		"reassoc failure timeout")
 
-/*
- * <ini>
- * probe_after_hb_fail_timeout - Probe after HB failure timeout value
- * @Min: 10
- * @Max: 10000
- * @Default: 70
- *
- * This cfg is used to configure the Probe after HB failure timeout.
- *
- * Usage: Internal
- *
- * </ini>
- */
-#define CFG_PROBE_AFTER_HB_FAIL_TIMEOUT CFG_INI_UINT( \
-		"probe_after_hb_fail_timeout", \
-		10, \
-		10000, \
-		70, \
-		CFG_VALUE_OR_DEFAULT, \
-		"probe after HB fail timeout")
-
 /*
  * <ini>
  * olbc_detect_timeout - olbc detect timeout value
@@ -315,7 +295,6 @@
 	CFG(CFG_AUTH_RSP_TIMEOUT) \
 	CFG(CFG_ASSOC_FAILURE_TIMEOUT) \
 	CFG(CFG_REASSOC_FAILURE_TIMEOUT) \
-	CFG(CFG_PROBE_AFTER_HB_FAIL_TIMEOUT) \
 	CFG(CFG_OLBC_DETECT_TIMEOUT) \
 	CFG(CFG_ADDTS_RSP_TIMEOUT) \
 	CFG(CFG_HEART_BEAT_THRESHOLD) \

+ 0 - 2
components/mlme/dispatcher/inc/wlan_mlme_public_struct.h

@@ -2279,7 +2279,6 @@ struct wlan_mlme_power {
  * @auth_rsp_timeout: authenticate response timeout
  * @assoc_failure_timeout: assoc failure timeout
  * @reassoc_failure_timeout: re-assoc failure timeout
- * @probe_after_hb_fail_timeout: Probe after HB fail timeout
  * @olbc_detect_timeout: OLBC detect timeout
  * @addts_rsp_timeout: ADDTS rsp timeout value
  * @heart_beat_threshold: Heart beat threshold
@@ -2295,7 +2294,6 @@ struct wlan_mlme_timeout {
 	uint32_t auth_rsp_timeout;
 	uint32_t assoc_failure_timeout;
 	uint32_t reassoc_failure_timeout;
-	uint32_t probe_after_hb_fail_timeout;
 	uint32_t olbc_detect_timeout;
 	uint32_t addts_rsp_timeout;
 	uint32_t heart_beat_threshold;

+ 1 - 4
core/mac/inc/ani_global.h

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. 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
@@ -262,9 +262,6 @@ typedef struct sLimTimers {
 	TX_TIMER gLimAssocFailureTimer;
 	TX_TIMER gLimReassocFailureTimer;
 
-	/* / Wait for Probe after Heartbeat failure timer on STA */
-	TX_TIMER gLimProbeAfterHBTimer;
-
 	/* Authentication related timers */
 	TX_TIMER gLimAuthFailureTimer;
 

+ 0 - 4
core/mac/src/pe/include/lim_session.h

@@ -440,10 +440,6 @@ struct pe_session {
 	tLimChannelSwitchInfo gLimChannelSwitch;
 	/* *********************End 11H related**************************** */
 
-	/*Flag to Track Status/Indicate HBFailure on this session */
-	bool LimHBFailureStatus;
-	int32_t hb_failure_ap_rssi;
-
 	uint32_t gLimPhyMode;
 	uint8_t txLdpcIniFeatureEnabled;
 	/**

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

@@ -1735,7 +1735,6 @@ void lim_ps_offload_handle_missed_beacon_ind(struct mac_context *mac,
 
 	/* Set Beacon Miss in Powersave Offload */
 	pe_session->pmmOffloadInfo.bcnmiss = true;
-	pe_session->hb_failure_ap_rssi = missed_beacon_ind->rssi;
 	pe_err("Received Heart Beat Failure");
 
 	/*  Do AP probing immediately */

+ 0 - 1
core/mac/src/pe/lim/lim_assoc_utils.c

@@ -457,7 +457,6 @@ lim_cleanup_rx_path(struct mac_context *mac, tpDphHashNode sta,
 		       eLIM_MLM_WT_DEL_STA_RSP_STATE));
 		pe_session->limMlmState = eLIM_MLM_WT_DEL_STA_RSP_STATE;
 		/* Deactivating probe after heart beat timer */
-		lim_deactivate_and_change_timer(mac, eLIM_PROBE_AFTER_HB_TIMER);
 		lim_deactivate_and_change_timer(mac, eLIM_JOIN_FAIL_TIMER);
 	}
 #ifdef WLAN_DEBUG

+ 0 - 3
core/mac/src/pe/lim/lim_link_monitoring_algo.c

@@ -459,9 +459,6 @@ void lim_handle_heart_beat_failure(struct mac_context *mac_ctx,
 	WLAN_HOST_DIAG_LOG_REPORT(log_ptr);
 #endif /* FEATURE_WLAN_DIAG_SUPPORT */
 
-	/* Ensure HB Status for the session has been reseted */
-	session->LimHBFailureStatus = false;
-
 	if (LIM_IS_STA_ROLE(session) &&
 	    lim_is_sb_disconnect_allowed(session)) {
 		if (!mac_ctx->sys.gSysEnableLinkMonitorMode) {

+ 0 - 3
core/mac/src/pe/lim/lim_process_message_queue.c

@@ -1867,9 +1867,6 @@ static void lim_process_messages(struct mac_context *mac_ctx,
 							session_entry);
 		}
 		break;
-	case SIR_LIM_PROBE_HB_FAILURE_TIMEOUT:
-		lim_handle_heart_beat_failure_timeout(mac_ctx);
-		break;
 	case SIR_LIM_CNF_WAIT_TIMEOUT:
 		/* Does not receive CNF or dummy packet */
 		lim_handle_cnf_wait_timeout(mac_ctx, (uint16_t) msg->bodyval);

+ 1 - 40
core/mac/src/pe/lim/lim_timer_utils.c

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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
@@ -125,18 +126,6 @@ static bool lim_create_non_ap_timers(struct mac_context *mac)
 		return false;
 	}
 
-	/* Change timer to reactivate it in future */
-	cfgValue = SYS_MS_TO_TICKS(
-		mac->mlme_cfg->timeouts.probe_after_hb_fail_timeout);
-	if (tx_timer_create(mac, &mac->lim.lim_timers.gLimProbeAfterHBTimer,
-			    "Probe after Heartbeat TIMEOUT",
-			    lim_timer_handler,
-			    SIR_LIM_PROBE_HB_FAILURE_TIMEOUT,
-			    cfgValue, 0, TX_NO_ACTIVATE) != TX_SUCCESS) {
-		pe_err("unable to create ProbeAfterHBTimer");
-		return false;
-	}
-
 	/*
 	 * SAE auth timer of 5secs. This is required for duration of entire SAE
 	 * authentication.
@@ -255,7 +244,6 @@ err_timer:
 	while (((int32_t)-- i) >= 0) {
 		tx_timer_delete(&mac->lim.lim_timers.gpLimCnfWaitTimer[i]);
 	}
-	tx_timer_delete(&mac->lim.lim_timers.gLimProbeAfterHBTimer);
 	tx_timer_delete(&mac->lim.lim_timers.gLimAuthFailureTimer);
 	tx_timer_delete(&mac->lim.lim_timers.gLimAddtsRspTimer);
 	tx_timer_delete(&mac->lim.lim_timers.gLimAssocFailureTimer);
@@ -625,33 +613,6 @@ void lim_deactivate_and_change_timer(struct mac_context *mac, uint32_t timerId)
 
 		break;
 
-	case eLIM_PROBE_AFTER_HB_TIMER:
-		if (tx_timer_deactivate
-			    (&mac->lim.lim_timers.gLimProbeAfterHBTimer) !=
-		    TX_SUCCESS) {
-			/* Could not deactivate Heartbeat timer. */
-			/* Log error */
-			pe_err("unable to deactivate probeAfterHBTimer");
-		} else {
-			pe_debug("Deactivated probe after hb timer");
-		}
-
-		/* Change timer to reactivate it in future */
-		val = SYS_MS_TO_TICKS(
-			mac->mlme_cfg->timeouts.probe_after_hb_fail_timeout);
-
-		if (tx_timer_change(&mac->lim.lim_timers.gLimProbeAfterHBTimer,
-				    val, 0) != TX_SUCCESS) {
-			/* Could not change HeartBeat timer. */
-			/* Log error */
-			pe_err("unable to change ProbeAfterHBTimer");
-		} else {
-			pe_debug("Probe after HB timer value is changed: %u",
-				val);
-		}
-
-		break;
-
 	case eLIM_DISASSOC_ACK_TIMER:
 		if (tx_timer_deactivate(
 			&mac->lim.lim_timers.gLimDisassocAckTimer) !=

+ 1 - 1
core/mac/src/pe/lim/lim_timer_utils.h

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2011-2014, 2016-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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
@@ -44,7 +45,6 @@ enum limtimertype {
 	eLIM_CNF_WAIT_TIMER,
 	eLIM_AUTH_RSP_TIMER,
 	eLIM_UPDATE_OLBC_CACHE_TIMER,
-	eLIM_PROBE_AFTER_HB_TIMER,
 	eLIM_ADDTS_RSP_TIMER,
 	eLIM_CHANNEL_SWITCH_TIMER,
 	eLIM_WPS_OVERLAP_TIMER,

+ 1 - 1
core/mac/src/pe/lim/lim_trace.c

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2013-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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
@@ -54,7 +55,6 @@ static uint8_t *__lim_trace_get_timer_string(uint16_t timerId)
 		CASE_RETURN_STRING(eLIM_CNF_WAIT_TIMER);
 		CASE_RETURN_STRING(eLIM_AUTH_RSP_TIMER);
 		CASE_RETURN_STRING(eLIM_UPDATE_OLBC_CACHE_TIMER);
-		CASE_RETURN_STRING(eLIM_PROBE_AFTER_HB_TIMER);
 		CASE_RETURN_STRING(eLIM_ADDTS_RSP_TIMER);
 		CASE_RETURN_STRING(eLIM_CHANNEL_SWITCH_TIMER);
 		CASE_RETURN_STRING(eLIM_WPS_OVERLAP_TIMER);

+ 0 - 100
core/mac/src/pe/lim/lim_utils.c

@@ -464,9 +464,6 @@ void lim_deactivate_timers(struct mac_context *mac_ctx)
 	/* Deactivate Authentication failure timer. */
 	tx_timer_deactivate(&lim_timer->gLimAuthFailureTimer);
 
-	/* Deactivate wait-for-probe-after-Heartbeat timer. */
-	tx_timer_deactivate(&lim_timer->gLimProbeAfterHBTimer);
-
 	/* Deactivate cnf wait timer */
 	for (n = 0; n < (mac_ctx->lim.maxStation + 1); n++) {
 		tx_timer_deactivate(&lim_timer->gpLimCnfWaitTimer[n]);
@@ -614,9 +611,6 @@ void lim_cleanup_mlm(struct mac_context *mac_ctx)
 		/* Delete Authentication failure timer. */
 		tx_timer_delete(&lim_timer->gLimAuthFailureTimer);
 
-		/* Delete wait-for-probe-after-Heartbeat timer. */
-		tx_timer_delete(&lim_timer->gLimProbeAfterHBTimer);
-
 		/* Delete cnf wait timer */
 		for (n = 0; n < (mac_ctx->lim.maxStation + 1); n++) {
 			tx_timer_delete(&lim_timer->gpLimCnfWaitTimer[n]);
@@ -4477,30 +4471,6 @@ void lim_handle_heart_beat_timeout_for_session(struct mac_context *mac_ctx,
 					(LIM_IS_STA_ROLE(psession_entry)))
 			lim_handle_heart_beat_failure(mac_ctx, psession_entry);
 	}
-	/*
-	 * In the function lim_handle_heart_beat_failure things can change
-	 * so check for the session entry  valid and the other things
-	 * again
-	 */
-	if ((psession_entry->valid == true) &&
-		(psession_entry->bssType == eSIR_INFRASTRUCTURE_MODE) &&
-			(LIM_IS_STA_ROLE(psession_entry)) &&
-				(psession_entry->LimHBFailureStatus == true)) {
-		tLimTimers *lim_timer  = &mac_ctx->lim.lim_timers;
-		/*
-		 * Activate Probe After HeartBeat Timer incase HB
-		 * Failure detected
-		 */
-		pe_debug("Sending Probe for Session: %d",
-			psession_entry->vdev_id);
-		lim_deactivate_and_change_timer(mac_ctx,
-			eLIM_PROBE_AFTER_HB_TIMER);
-		MTRACE(mac_trace(mac_ctx, TRACE_CODE_TIMER_ACTIVATE, 0,
-			eLIM_PROBE_AFTER_HB_TIMER));
-		if (tx_timer_activate(&lim_timer->gLimProbeAfterHBTimer)
-					!= TX_SUCCESS)
-			pe_err("Fail to re-activate Probe-after-hb timer");
-	}
 }
 
 void lim_process_add_sta_rsp(struct mac_context *mac_ctx,
@@ -4561,76 +4531,6 @@ void lim_update_beacon(struct mac_context *mac_ctx)
 	}
 }
 
-/**
- * lim_handle_heart_beat_failure_timeout - handle heart beat failure
- * @mac_ctx: pointer to Global Mac Structure
- *
- * Function handle heart beat failure timeout
- *
- * Return: none
- */
-void lim_handle_heart_beat_failure_timeout(struct mac_context *mac_ctx)
-{
-	uint8_t i;
-	struct pe_session *psession_entry;
-	/*
-	 * Probe response is not received  after HB failure.
-	 * This is handled by LMM sub module.
-	 */
-	for (i = 0; i < mac_ctx->lim.maxBssId; i++) {
-		if (mac_ctx->lim.gpSession[i].valid != true)
-			continue;
-		psession_entry = &mac_ctx->lim.gpSession[i];
-		if (psession_entry->LimHBFailureStatus != true)
-			continue;
-		pe_debug("SME: %d MLME: %d HB-Count: %d",
-				psession_entry->limSmeState,
-				psession_entry->limMlmState,
-				psession_entry->LimRxedBeaconCntDuringHB);
-
-#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM
-		lim_diag_event_report(mac_ctx, WLAN_PE_DIAG_HB_FAILURE_TIMEOUT,
-					psession_entry, 0, 0);
-#endif
-		if (lim_is_sb_disconnect_allowed(psession_entry) &&
-		    (!LIM_IS_CONNECTION_ACTIVE(psession_entry) ||
-		     /*
-		      * Disconnect even if we have not received a single
-		      * beacon after connection.
-		      */
-		     !psession_entry->currentBssBeaconCnt)) {
-			pe_nofl_info("HB fail vdev %d",psession_entry->vdev_id);
-			lim_send_deauth_mgmt_frame(mac_ctx,
-				REASON_DISASSOC_DUE_TO_INACTIVITY,
-				psession_entry->bssId, psession_entry, false);
-
-			/*
-			 * AP did not respond to Probe Request.
-			 * Tear down link with it.
-			 */
-			lim_tear_down_link_with_ap(mac_ctx,
-						psession_entry->peSessionId,
-						REASON_BEACON_MISSED,
-						eLIM_LINK_MONITORING_DISASSOC);
-			mac_ctx->lim.gLimProbeFailureAfterHBfailedCnt++;
-		} else {
-			pe_err("Unexpected wt-probe-timeout in state");
-			lim_print_mlm_state(mac_ctx, LOGE,
-				psession_entry->limMlmState);
-			if (mac_ctx->sme.tx_queue_cb)
-				mac_ctx->sme.tx_queue_cb(mac_ctx->hdd_handle,
-						psession_entry->smeSessionId,
-						WLAN_WAKE_ALL_NETIF_QUEUE,
-						WLAN_CONTROL_PATH);
-		}
-	}
-	/*
-	 * Deactivate Timer ProbeAfterHB Timer -> As its a oneshot timer,
-	 * need not deactivate the timer
-	 * tx_timer_deactivate(&mac->lim.lim_timers.gLimProbeAfterHBTimer);
-	 */
-}
-
 struct pe_session *lim_is_ap_session_active(struct mac_context *mac)
 {
 	uint8_t i;

+ 0 - 1
core/mac/src/pe/lim/lim_utils.h

@@ -791,7 +791,6 @@ static inline uint16_t ch_width_in_mhz(enum phy_ch_width ch_width)
 }
 
 struct pe_session *lim_is_ap_session_active(struct mac_context *mac);
-void lim_handle_heart_beat_failure_timeout(struct mac_context *mac);
 
 #define limGetWscIEPtr(mac, ie, ie_len) \
 	wlan_get_vendor_ie_ptr_from_oui(SIR_MAC_WSC_OUI, \

+ 1 - 1
core/mac/src/sys/legacy/src/utils/src/mac_trace.c

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2013-2021 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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
@@ -578,7 +579,6 @@ uint8_t *mac_trace_get_lim_msg_string(uint16_t lim_msg)
 		CASE_RETURN_STRING(SIR_LIM_ASSOC_FAIL_TIMEOUT);
 		CASE_RETURN_STRING(SIR_LIM_REASSOC_FAIL_TIMEOUT);
 		CASE_RETURN_STRING(SIR_LIM_HEART_BEAT_TIMEOUT);
-		CASE_RETURN_STRING(SIR_LIM_PROBE_HB_FAILURE_TIMEOUT);
 		CASE_RETURN_STRING(SIR_LIM_ADDTS_RSP_TIMEOUT);
 		CASE_RETURN_STRING(SIR_LIM_LINK_TEST_DURATION_TIMEOUT);
 		CASE_RETURN_STRING(SIR_LIM_CNF_WAIT_TIMEOUT);