Переглянути джерело

qcacld-3.0: Remove obsolete SCH code

Remove dead code present in SCH module.

Change-Id: If428504a9e5288b9bc2bbba27fe1cf5a38746874
CRs-Fixed: 2051304
Naveen Rawat 8 роки тому
батько
коміт
af4388c513

+ 0 - 8
core/mac/src/include/sir_params.h

@@ -726,14 +726,6 @@ typedef struct sSirMbMsgP2p {
 
 #define SIR_LIM_MSG_TYPES_END            (SIR_LIM_MSG_TYPES_BEGIN+0xFF)
 
-/* SCH message types */
-#define SIR_SCH_MSG_TYPES_BEGIN        (SIR_SCH_MODULE_ID << 8)
-#define SIR_SCH_CHANNEL_SWITCH_REQUEST (SIR_SCH_MSG_TYPES_BEGIN)
-#define SIR_SCH_START_SCAN_REQ         (SIR_SCH_MSG_TYPES_BEGIN + 1)
-#define SIR_SCH_START_SCAN_RSP         (SIR_SCH_MSG_TYPES_BEGIN + 2)
-#define SIR_SCH_END_SCAN_NTF           (SIR_SCH_MSG_TYPES_BEGIN + 3)
-#define SIR_SCH_MSG_TYPES_END          (SIR_SCH_MSG_TYPES_BEGIN+0xFF)
-
 /* PMM message types */
 #define SIR_PMM_MSG_TYPES_BEGIN        (SIR_PMM_MODULE_ID << 8)
 #define SIR_PMM_CHANGE_PM_MODE         (SIR_PMM_MSG_TYPES_BEGIN)

+ 0 - 13
core/mac/src/include/sys_global.h

@@ -29,24 +29,11 @@
 #define __SYS_GLOBAL_H__
 
 typedef struct sAniSirSys {
-
 	uint32_t gSysFrameCount[4][16];
 	uint32_t gSysBbtReceived;
 	uint32_t sys_bbt_pending_mgmt_count;
 	uint32_t gSysBbtPostedToLim;
-	uint32_t gSysBbtPostedToSch;
-	uint32_t gSysBbtPostedToPmm;
-	uint32_t gSysBbtPostedToHal;
 	uint32_t gSysBbtDropped;
-	uint32_t gSysBbtNonLearnFrameInv;
-	uint32_t gSysBbtLearnFrameInv;
-	uint32_t gSysBbtCrcFail;
-	uint32_t gSysBbtDuplicates;
-	uint32_t gSysReleaseCount;
-	uint32_t probeError, probeBadSsid, probeIgnore, probeRespond;
-
-	uint32_t gSysEnableLearnMode;
-	uint32_t gSysEnableScanMode;
 	uint32_t gSysEnableLinkMonitorMode;
 	qdf_spinlock_t bbt_mgmt_lock;
 } tAniSirSys, *tpAniSirSys;

+ 0 - 13
core/mac/src/pe/include/sch_api.h

@@ -43,9 +43,6 @@
 
 #include "ani_global.h"
 
-/* / Send start scan response message */
-extern void sch_send_start_scan_rsp(tpAniSirGlobal pMac);
-
 /* update only the broadcast qos params */
 extern void sch_qos_update_broadcast(tpAniSirGlobal pMac,
 				     tpPESession psessionEntry);
@@ -64,15 +61,6 @@ extern void sch_edca_profile_update(tpAniSirGlobal pMac,
 extern tSirRetStatus sch_set_fixed_beacon_fields(tpAniSirGlobal pMac,
 						 tpPESession psessionEntry);
 
-/* / Initialize globals */
-extern void sch_init_globals(tpAniSirGlobal pMac);
-
-/* / Initialize CF Poll template */
-extern void sch_initializeCfPollTemplate(tpAniSirGlobal pMac);
-
-/* / Initialize CF End template */
-extern void sch_initializeCfEndTemplate(tpAniSirGlobal pMac);
-
 /* / Process the scheduler messages */
 extern void sch_process_message(tpAniSirGlobal pMac,
 				struct scheduler_msg *pSchMsg);
@@ -92,7 +80,6 @@ extern tSirRetStatus sch_beacon_edca_process(tpAniSirGlobal pMac,
 					     tpPESession psessionEntry);
 
 void sch_generate_tim(tpAniSirGlobal, uint8_t **, uint16_t *, uint8_t);
-#define SCH_RR_TIMEOUT                   (SCH_RR_TIMEOUT_MS / SYS_TICK_DUR_MS)
 
 void sch_set_beacon_interval(tpAniSirGlobal pMac, tpPESession psessionEntry);
 

+ 1 - 94
core/mac/src/pe/include/sch_global.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2014, 2017 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -63,42 +63,8 @@
 struct schMisc {
 	uint16_t gSchBeaconInterval;
 
-	/* / Current CFP count */
-	uint8_t gSchCFPCount;
-
-	/* / CFP Duration remaining */
-	uint8_t gSchCFPDurRemaining;
-
-	/* / CFP Maximum Duration */
-	uint8_t gSchCFPMaxDuration;
-
-	/* / Current DTIM count */
-	uint8_t gSchDTIMCount;
-
-	/* / Whether we have initiated a CFP or not */
-	uint8_t gSchCFPInitiated;
-
-	/* / Whether we have initiated a CFB or not */
-	uint8_t gSchCFBInitiated;
-
-	/* / CFP is enabled and AP is configured as HCF */
-	uint8_t gSchCFPEnabled;
-
-	/* / CFB is enabled and AP is configured as HCF */
-	uint8_t gSchCFBEnabled;
-
 	/* --------- STA ONLY state ----------- */
 
-	/* / Indicates whether RR timer is running or not */
-	uint8_t rrTimer[8];
-
-	/* / Indicates the remaining RR timeout value if the RR timer is running */
-	uint16_t rrTimeout[8];
-
-	/* / Number of RRs transmitted */
-	uint16_t numRR[8];
-	uint16_t numRRtimeouts[8];
-
 	/* / flag to indicate that beacon template has been updated */
 	uint8_t fBeaconChanged;
 
@@ -108,69 +74,10 @@ struct schMisc {
 
 /* ****************** MISC defs ********************************* */
 
-typedef struct schStaWaitList {
-	uint16_t staId;
-	uint16_t count;
-} tStaWaitList, *tpStaWaitList;
-
 /* / Global SCH structure */
 typedef struct sAniSirSch {
 	/* / The scheduler object */
 	struct schMisc schObject;
-
-	/* schQoSClass unsolicited; */
-
-	/* / Whether HCF is enabled or not */
-	uint8_t gSchHcfEnabled;
-
-	/* / Whether scan is requested by LIM or not */
-	uint8_t gSchScanRequested;
-
-	/* / Whether scan request is received by SCH or not */
-	uint8_t gSchScanReqRcvd;
-
-	/* / Debug flag to disable beacon generation */
-	uint32_t gSchGenBeacon;
-
-#define SCH_MAX_ARR 100
-	uint32_t gSchBeaconsWritten;
-	uint32_t gSchBeaconsSent;
-	uint32_t gSchBBXportRcvCnt;
-	uint32_t gSchRRRcvCnt, qosNullCnt;
-	uint32_t gSchBcnRcvCnt;
-	uint32_t gSchUnknownRcvCnt;
-
-	uint32_t gSchBcnParseErrorCnt;
-	uint32_t gSchBcnIgnored;
-
-	uint32_t numPoll, numData, numCorrupt;
-	uint32_t numBogusInt, numTxAct0;
-
-#define SCH_MAX_NUM_SCH 21
-	uint32_t lastBeaconLength;
-	uint16_t rrTimeout;
-	uint32_t pollPeriod;
-	uint32_t multipleSched;
-	uint32_t pollFeedbackHist[8];
-	uint32_t dataFeedbackHist[8];
-	uint32_t maxPollTimeouts;
-	uint32_t checkCfbFlagStuck;
-
-	/* / Sta Wait list */
-	tpStaWaitList pStaWaitList;
-
-	/* / Pointer to next available entry in sta wait list */
-	uint16_t staWaitListIn;
-	/* / Pointer to first waiting sta in sta wait list */
-	uint16_t staWaitListOut;
-	/* / Total number of waiting STAs in sta wait list */
-	uint16_t staWaitListCount;
-	/* / Total number of schedules to be waited */
-	uint16_t staWaitListTotalWait;
-
-	/* / Number of entries in DPH activity queue that were ignored */
-	uint32_t ignoreDph;
-
 } tAniSirSch, *tpAniSirSch;
 
 #endif

+ 0 - 4
core/mac/src/pe/lim/lim_process_probe_req_frame.c

@@ -390,7 +390,6 @@ lim_process_probe_req_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
 			pe_err("Parse error ProbeReq, length: %d, SA is: "
 					MAC_ADDRESS_STR, frame_len,
 					MAC_ADDR_ARRAY(mac_hdr->sa));
-			mac_ctx->sys.probeError++;
 			return;
 		}
 		if (session->pePersona == QDF_P2P_GO_MODE) {
@@ -489,7 +488,6 @@ lim_process_probe_req_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
 				pe_debug("Ignore ProbeReq frm with unmatch SSID received from");
 					lim_print_mac_addr(mac_ctx, mac_hdr->sa,
 						LOGD);
-					mac_ctx->sys.probeBadSsid++;
 			}
 		} else {
 			/*
@@ -516,12 +514,10 @@ lim_process_probe_req_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
 multipleSSIDcheck:
 		pe_debug("Ignore ProbeReq frm with unmatch SSID rcved from");
 			lim_print_mac_addr(mac_ctx, mac_hdr->sa, LOGD);
-		mac_ctx->sys.probeBadSsid++;
 	} else {
 		/* Ignore received Probe Request frame */
 		pe_debug("Ignoring Probe Request frame received from");
 		lim_print_mac_addr(mac_ctx, mac_hdr->sa, LOGD);
-		mac_ctx->sys.probeIgnore++;
 	}
 	return;
 }

+ 0 - 2
core/mac/src/pe/lim/lim_send_management_frames.c

@@ -830,8 +830,6 @@ lim_send_probe_rsp_mgmt_frame(tpAniSirGlobal mac_ctx,
 	pe_debug("Sending Probe Response frame to");
 	lim_print_mac_addr(mac_ctx, peer_macaddr, LOGD);
 
-	mac_ctx->sys.probeRespond++;
-
 	if (mac_ctx->lim.gpLimRemainOnChanReq)
 		qdf_mem_copy(frame + sizeof(tSirMacMgmtHdr) + payload,
 			     mac_ctx->lim.gpLimRemainOnChanReq->probeRspIe,

+ 0 - 75
core/mac/src/pe/sch/sch_api.c

@@ -51,7 +51,6 @@
 
 #include "sch_api.h"
 
-#include "sch_sys_params.h"
 #include "lim_trace.h"
 #include "lim_types.h"
 #include "lim_utils.h"
@@ -62,54 +61,6 @@
 /* */
 /*                          Static Variables */
 /* */
-/* ------------------------------------------------------------------- */
-
-/* -------------------------------------------------------------------- */
-/**
- * sch_init_globals
- *
- * FUNCTION:
- * Initialize globals
- *
- * LOGIC:
- *
- * ASSUMPTIONS:
- *
- * NOTE:
- *
- * @param None
- * @return None
- */
-
-void sch_init_globals(tpAniSirGlobal pMac)
-{
-	pMac->sch.gSchHcfEnabled = false;
-
-	pMac->sch.gSchScanRequested = false;
-	pMac->sch.gSchScanReqRcvd = false;
-
-	pMac->sch.gSchGenBeacon = 1;
-	pMac->sch.gSchBeaconsSent = 0;
-	pMac->sch.gSchBeaconsWritten = 0;
-	pMac->sch.gSchBcnParseErrorCnt = 0;
-	pMac->sch.gSchBcnIgnored = 0;
-	pMac->sch.gSchBBXportRcvCnt = 0;
-	pMac->sch.gSchUnknownRcvCnt = 0;
-	pMac->sch.gSchBcnRcvCnt = 0;
-	pMac->sch.gSchRRRcvCnt = 0;
-	pMac->sch.qosNullCnt = 0;
-	pMac->sch.numData = 0;
-	pMac->sch.numPoll = 0;
-	pMac->sch.numCorrupt = 0;
-	pMac->sch.numBogusInt = 0;
-	pMac->sch.numTxAct0 = 0;
-	pMac->sch.rrTimeout = SCH_RR_TIMEOUT;
-	pMac->sch.pollPeriod = SCH_POLL_PERIOD;
-	pMac->sch.multipleSched = 1;
-	pMac->sch.maxPollTimeouts = 20;
-	pMac->sch.checkCfbFlagStuck = 0;
-}
-
 /* -------------------------------------------------------------------- */
 /**
  * sch_post_message
@@ -135,32 +86,6 @@ tSirRetStatus sch_post_message(tpAniSirGlobal pMac, struct scheduler_msg *pMsg)
 }
 
 /* --------------------------------------------------------------------------- */
-/**
- * sch_send_start_scan_rsp
- *
- * FUNCTION:
- *
- * LOGIC:
- *
- * ASSUMPTIONS:
- *
- * NOTE:
- *
- * @param None
- * @return None
- */
-
-void sch_send_start_scan_rsp(tpAniSirGlobal pMac)
-{
-	struct scheduler_msg msgQ = {0};
-	uint32_t retCode;
-
-	msgQ.type = SIR_SCH_START_SCAN_RSP;
-	retCode = lim_post_msg_api(pMac, &msgQ);
-	if (retCode != eSIR_SUCCESS)
-		pe_err("Posting START_SCAN_RSP to LIM failed, reason=%X",
-			retCode);
-}
 
 /**
  * sch_send_beacon_req

+ 11 - 19
core/mac/src/pe/sch/sch_beacon_gen.c

@@ -829,25 +829,17 @@ static void write_beacon_to_memory(tpAniSirGlobal pMac, uint16_t size,
 	if (!pMac->sch.schObject.fBeaconChanged)
 		return;
 
-	pMac->sch.gSchGenBeacon = 1;
-	if (pMac->sch.gSchGenBeacon) {
-		pMac->sch.gSchBeaconsSent++;
-
-		/* */
-		/* Copy beacon data to SoftMAC shared memory... */
-		/* Do this by sending a message to HAL */
-		/* */
-
-		size = (size + 3) & (~3);
-		if (eSIR_SUCCESS !=
-		    sch_send_beacon_req(pMac, psessionEntry->pSchBeaconFrameBegin,
-					size, psessionEntry))
-			pe_err("sch_send_beacon_req() returned an error (zsize %d)",
-			       size);
-			else {
-				pMac->sch.gSchBeaconsWritten++;
-			}
-	}
+	/*
+	 * Copy beacon data to SoftMAC shared memory...
+	 * Do this by sending a message to HAL
+	 */
+
+	size = (size + 3) & (~3);
+	if (eSIR_SUCCESS != sch_send_beacon_req(pMac,
+	   psessionEntry->pSchBeaconFrameBegin, size, psessionEntry))
+		pe_err("sch_send_beacon_req() returned an error (zsize %d)",
+			size);
+
 	pMac->sch.schObject.fBeaconChanged = 0;
 }
 

+ 0 - 3
core/mac/src/pe/sch/sch_beacon_process.c

@@ -251,7 +251,6 @@ ap_beacon_process(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
 	else if (SIR_BAND_2_4_GHZ == rf_band)
 		ap_beacon_process_24_ghz(mac_ctx, rx_pkt_info, bcn_struct,
 					 bcn_prm, session, phy_mode);
-	mac_ctx->sch.gSchBcnIgnored++;
 }
 
 /* -------------------------------------------------------------------- */
@@ -999,12 +998,10 @@ sch_beacon_process(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
 
 	qdf_mem_zero(&bcn_prm, sizeof(tUpdateBeaconParams));
 	bcn_prm.paramChangeBitmap = 0;
-	mac_ctx->sch.gSchBcnRcvCnt++;
 	/* Convert the beacon frame into a structure */
 	if (sir_convert_beacon_frame2_struct(mac_ctx, (uint8_t *) rx_pkt_info,
 		&bcn) != eSIR_SUCCESS) {
 		pe_err("beacon parsing failed");
-		mac_ctx->sch.gSchBcnParseErrorCnt++;
 		return;
 	}
 

+ 0 - 34
core/mac/src/pe/sch/sch_message.c

@@ -108,32 +108,6 @@ void sch_process_message(tpAniSirGlobal pMac, struct scheduler_msg *pSchMsg)
 	tpPESession psessionEntry = &pMac->lim.gpSession[0];
 
 	switch (pSchMsg->type) {
-
-	case SIR_SCH_CHANNEL_SWITCH_REQUEST:
-		pe_debug("Channel switch request not handled");
-		break;
-
-	case SIR_SCH_START_SCAN_REQ:
-		pMac->sch.gSchScanReqRcvd = true;
-		if (pMac->sch.gSchHcfEnabled) {
-			/* In HCF mode, wait for TFP to stop before sending a response */
-			if (pMac->sch.schObject.gSchCFBInitiated ||
-			    pMac->sch.schObject.gSchCFPInitiated) {
-				pe_debug("Waiting for TFP to halt before sending "
-					 "start scan response");
-			} else
-				sch_send_start_scan_rsp(pMac);
-		} else {
-			/* In eDCF mode, send the response right away */
-			sch_send_start_scan_rsp(pMac);
-		}
-		break;
-
-	case SIR_SCH_END_SCAN_NTF:
-		pe_debug("Received STOP_SCAN_NTF from LIM");
-		pMac->sch.gSchScanReqRcvd = false;
-		break;
-
 	case SIR_CFG_PARAM_UPDATE_IND:
 
 		if (wlan_cfg_get_int(pMac, (uint16_t) pSchMsg->bodyval, &val) !=
@@ -147,14 +121,6 @@ void sch_process_message(tpAniSirGlobal pMac, struct scheduler_msg *pSchMsg)
 				sch_set_beacon_interval(pMac, psessionEntry);
 			break;
 
-		case WNI_CFG_DTIM_PERIOD:
-			pMac->sch.schObject.gSchDTIMCount = 0;
-			break;
-
-		case WNI_CFG_CFP_PERIOD:
-			pMac->sch.schObject.gSchCFPCount = 0;
-			break;
-
 		case WNI_CFG_EDCA_PROFILE:
 			sch_edca_profile_update(pMac, psessionEntry);
 			break;

+ 2 - 65
core/mac/src/pe/sch/sch_sys_params.h

@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 2011-2012, 2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2012, 2014, 2017 The Linux Foundation.
+ * All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -40,68 +41,4 @@
 #ifndef __SCH_SYS_PARAMS_H__
 #define __SCH_SYS_PARAMS_H__
 
-/* / Unsolicited poll period (ms) (0 to disable) */
-#define SCH_POLL_PERIOD                1000
-
-/* / RR timeout value (ms) (0 to disable) */
-#define SCH_RR_TIMEOUT_MS                40
-
-/* / Default CP:CFP ratio */
-#define SCH_DEFAULT_CP_TO_CFP_RATIO       0
-
-/* / Default maximum CFP duration (us) */
-#define SCH_DEFAULT_MAX_CFP_TIME       60000
-
-/* / Default minimum CP duration (us) */
-#define SCH_DEFAULT_MIN_CP_TIME         100
-
-/* / Amount of delay prior to starting CFP (us) */
-#define SCH_CFP_START_DELAY             100
-
-/* / Unit of Txop in micro seconds */
-#define TXOP_UNIT_IN_USEC                32
-
-/* / Minimum amount of time granted per instruction on average (units of txop) */
-#define MIN_TXOP_PER_INSTRUCTION         50
-
-/* / Maximum amount of time granted per instruction (units of txop) */
-#define MAX_TXOP_PER_INSTRUCTION        300     /* HACK - 100 */
-
-/* / Maximum amount of time granted to one entire schedule (units of txop) */
-#define MAX_TXOP_PER_SCHEDULE           400
-
-/* / Scheduling quantum (units of TXOP) */
-#define SCH_QUANTUM_QUEUE                 4
-
-/* / Maximum unused quantum allowed to be accumulated by a queue */
-#define MAX_ACCUMULATED_QUANTUM         500
-
-/* / Minimum allocated quantum for an uplink flow before a poll instruction is written */
-#define SCH_MIN_UL_ALLOC                 12
-
-/* ---- Scheduling Policy ---- */
-
-/* / Number of QOS classes */
-#define SCH_NUM_QOS_CLASSES    2
-
-#define SCH_POLICY_STRICT_PRI  0
-#define SCH_POLICY_DRR         1
-
-/* / Scheduling quantum for each class if using DRR */
-#define SCH_QUANTUM_CLASS      100
-
-/* / The default scheduling policy between classes */
-#define SCH_POLICY_DEFAULT     SCH_POLICY_STRICT_PRI
-
-/* Scheduling weights for each priority */
-
-#define SCH_QUANTUM_0    40
-#define SCH_QUANTUM_1    36
-#define SCH_QUANTUM_2    32
-#define SCH_QUANTUM_3    28
-#define SCH_QUANTUM_4    24
-#define SCH_QUANTUM_5    20
-#define SCH_QUANTUM_6    16
-#define SCH_QUANTUM_7    12
-
 #endif

+ 0 - 2
core/mac/src/sys/legacy/src/system/src/sys_entry_func.c

@@ -79,9 +79,7 @@ tSirRetStatus sys_init_globals(tpAniSirGlobal pMac)
 
 	qdf_mem_set((uint8_t *) &pMac->sys, sizeof(pMac->sys), 0);
 
-	pMac->sys.gSysEnableScanMode = 1;
 	pMac->sys.gSysEnableLinkMonitorMode = 0;
-	sch_init_globals(pMac);
 
 	return eSIR_SUCCESS;
 }