Browse Source

qcacld-3.0: Remove unused function proc_set_req_internal

Remove the legacy function proc_set_req_internal which
is used as a handler for messages of type
WNI_CFG_SET_REQ or WNI_CFG_SET_REQ_NO_RSP.

Change-Id: If294329954f18c3890d977e7e9d4499b57ceba89
CRs-Fixed: 2140634
Varun Reddy Yeturu 7 years ago
parent
commit
4d521c55ae

+ 0 - 2
core/mac/inc/wni_api.h

@@ -397,8 +397,6 @@ enum ewni_tdls_connection_tracker_notification {
 /*---------------------------------------------------------------------*/
 #define WNI_CFG_DNLD_RSP               (WNI_CFG_MSG_TYPES_BEGIN | 0x80)
 #define WNI_CFG_GET_REQ                (WNI_CFG_MSG_TYPES_BEGIN | 0x81)
-#define WNI_CFG_SET_REQ                (WNI_CFG_MSG_TYPES_BEGIN | 0x82)
-#define WNI_CFG_SET_REQ_NO_RSP         (WNI_CFG_MSG_TYPES_BEGIN | 0x83) /* No RSP for this set */
 
 /* Shall be removed after stats integration */
 

+ 1 - 202
core/mac/src/cfg/cfg_proc_msg.c

@@ -1740,20 +1740,16 @@ cfgstatic_string cfg_static_string[CFG_MAX_STATIC_STRING] = {
 /*--------------------------------------------------------------------*/
 static void proc_dnld_rsp(tpAniSirGlobal, uint16_t, uint32_t *);
 static void proc_get_req(tpAniSirGlobal, uint16_t, uint32_t *);
-static void proc_set_req(tpAniSirGlobal, uint16_t, uint32_t *);
-static void proc_set_req_no_rsp(tpAniSirGlobal, uint16_t, uint32_t *);
 
 static uint8_t check_param(tpAniSirGlobal, uint16_t, uint32_t, uint32_t,
 			   uint32_t *);
-static void get_str_value(uint8_t *, uint8_t *, uint32_t);
-
 /*--------------------------------------------------------------------*/
 /* Module global variables                                            */
 /*--------------------------------------------------------------------*/
 
 /* CFG function table */
 void (*g_cfg_func[])(tpAniSirGlobal, uint16_t, uint32_t *) = {
-	proc_dnld_rsp, proc_get_req, proc_set_req, proc_set_req_no_rsp
+	proc_dnld_rsp, proc_get_req
 };
 
 /**---------------------------------------------------------------------
@@ -2100,175 +2096,6 @@ static void proc_get_req(tpAniSirGlobal pMac, uint16_t length, uint32_t *pParam)
 
 } /*** end procGetReq() ***/
 
-/**---------------------------------------------------------------------
- * proc_set_req_internal()
- *
- * FUNCTION:
- * This function processes CFG_SET_REQ message from host.
- *
- * LOGIC:
- *
- * ASSUMPTIONS:
- * - The message content is coded in TLV format.
- * - For string parameter, the length field is byte accurate.  However,
- *   the next TLV set will begin on the next word boundary.
- *
- * NOTE:
- * - For every parameter ID specified on the list, CFG will send a separate
- * CFG_SET_RSP back to host.
- *
- * @param length:  message length
- * @param pParam:  parameter list pointer
- * @param fRsp: whether to send response to host. true means sending.
- * @return None
- *
- */
-static void
-proc_set_req_internal(tpAniSirGlobal pMac, uint16_t length, uint32_t *pParam,
-		      bool fRsp)
-{
-	uint16_t cfgId, valueLen, valueLenRoundedUp4;
-	uint32_t value, result;
-
-	pe_debug("Rcvd cfg set request %d bytes", length);
-
-	if (!pMac->cfg.gCfgStatus) {
-		cfgId = (uint16_t) sir_read_u32_n((uint8_t *) pParam);
-		pe_debug("CFG not ready, param %d", cfgId);
-		pMac->cfg.gParamList[WNI_CFG_SET_CNF_RES] =
-			WNI_CFG_NOT_READY;
-		pMac->cfg.gParamList[WNI_CFG_SET_CNF_PID] = cfgId;
-		if (fRsp) {
-			cfg_send_host_msg(pMac, WNI_CFG_SET_CNF,
-					  WNI_CFG_SET_CNF_LEN, WNI_CFG_SET_CNF_NUM,
-					  pMac->cfg.gParamList, 0, 0);
-		}
-	} else {
-		/* Process all TLVs in buffer */
-		while (length >= (sizeof(uint32_t) * 2)) {
-			cfgId = (uint16_t) *pParam++;
-			valueLen = (uint16_t) *pParam++;
-			length -= (sizeof(uint32_t) * 2);
-			/* value length rounded up to a 4 byte multiple */
-			valueLenRoundedUp4 = (((valueLen + 3) >> 2) << 2);
-
-			/* Check for valid request before proceeding */
-			if (check_param
-				    (pMac, cfgId, CFG_CTL_WE, WNI_CFG_RO_PARAM,
-				    &result)) {
-				/* Process integer parameter */
-				if ((pMac->cfg.gCfgEntry[cfgId].
-				     control & CFG_CTL_INT) != 0) {
-					/* Set VALUE */
-					if (valueLen != sizeof(uint32_t)) {
-						pe_debug("Invalid value length: %d in set param: %d (tot: %d)",
-							       valueLen, cfgId,
-							       length);
-						result =
-							WNI_CFG_INVALID_LEN;
-					} else {
-						value = *pParam;
-						pe_debug("Cfg set int: %d len: %d(%d) val: %d",
-							       cfgId, valueLen,
-							       valueLenRoundedUp4,
-							       value);
-						result =
-							(cfg_set_int
-								 (pMac, cfgId,
-								 value) ==
-							 eSIR_SUCCESS ?
-							 WNI_CFG_SUCCESS :
-							 WNI_CFG_OTHER_ERROR);
-						if (result == WNI_CFG_SUCCESS) {
-							if (cfg_need_restart
-								    (pMac, cfgId)) {
-								result =
-									WNI_CFG_NEED_RESTART;
-							} else
-							if (cfg_need_reload
-								    (pMac, cfgId)) {
-								result =
-									WNI_CFG_NEED_RELOAD;
-							}
-						}
-					}
-				}
-				/* Process string parameter */
-				else {
-					if (valueLenRoundedUp4 > length) {
-						pe_debug("Invalid string length: %d in set param: %d (tot: %d)",
-							       valueLen, cfgId,
-							       length);
-						result =
-							WNI_CFG_INVALID_LEN;
-					} else {
-						get_str_value((uint8_t *) pParam,
-							      pMac->cfg.gSBuffer,
-							      valueLen);
-						pe_debug("Cfg set str: %d len: %d(%d) bytes",
-							       cfgId, valueLen,
-							       valueLenRoundedUp4);
-						result =
-							(cfg_set_str
-								 (pMac, cfgId,
-								 pMac->cfg.gSBuffer,
-								 valueLen) ==
-							 eSIR_SUCCESS ?
-							 WNI_CFG_SUCCESS :
-							 WNI_CFG_OTHER_ERROR);
-						if (result == WNI_CFG_SUCCESS) {
-							if (cfg_need_restart
-								    (pMac, cfgId)) {
-								result =
-									WNI_CFG_NEED_RESTART;
-							} else
-							if (cfg_need_reload
-								    (pMac, cfgId)) {
-								result =
-									WNI_CFG_NEED_RELOAD;
-							}
-						}
-					}
-				}
-			} else {
-				pe_debug("Check param failed, param CFGID: %d",
-						cfgId);
-				result = WNI_CFG_INVALID_LEN;
-			}
-
-			/* Send confirm message to host */
-			pMac->cfg.gParamList[WNI_CFG_SET_CNF_RES] = result;
-			pMac->cfg.gParamList[WNI_CFG_SET_CNF_PID] = cfgId;
-			if (fRsp) {
-				cfg_send_host_msg(pMac, WNI_CFG_SET_CNF,
-						  WNI_CFG_SET_CNF_LEN,
-						  WNI_CFG_SET_CNF_NUM,
-						  pMac->cfg.gParamList, 0, 0);
-			} else {
-				pe_debug("CFGID: %d no rsp", cfgId);
-			}
-
-			if (valueLenRoundedUp4 > length)
-				length = 0;
-			else {
-				length -= valueLenRoundedUp4;
-				pParam += (valueLenRoundedUp4 >> 2);
-			}
-		}
-	}
-}
-
-static void proc_set_req(tpAniSirGlobal pMac, uint16_t length, uint32_t *pParam)
-{
-	proc_set_req_internal(pMac, length, pParam, true);
-}
-
-static void
-proc_set_req_no_rsp(tpAniSirGlobal pMac, uint16_t length, uint32_t *pParam)
-{
-	proc_set_req_internal(pMac, length, pParam, false);
-}
-
 /**---------------------------------------------------------------------
  * check_param()
  *
@@ -2322,34 +2149,6 @@ check_param(tpAniSirGlobal pMac, uint16_t cfgId, uint32_t flag,
 
 } /*** cfgParamCheck() ***/
 
-/**---------------------------------------------------------------------
- * get_str_value()
- *
- * FUNCTION:
- * This function copies a string value from the specified buffer.
- *
- * LOGIC:
- *
- * ASSUMPTIONS:
- *
- * NOTE:
- *
- * @param pBuf:    input data buffer
- * @param pValue:  address where data is returned
- * @param length:  number of bytes to copy
- *
- * @return None
- *
- */
-static void get_str_value(uint8_t *pBuf, uint8_t *pValue, uint32_t length)
-{
-	uint8_t *pEnd;
-
-	pEnd = pValue + length;
-	while (pValue < pEnd)
-		*pValue++ = *pBuf++;
-} /*** end get_str_value() ***/
-
 /**---------------------------------------------------------------------
  * process_cfg_download_req()
  *

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

@@ -406,10 +406,6 @@ char *lim_msg_str(uint32_t msgType)
 		return "WNI_CFG_DNLD_RSP";
 	case WNI_CFG_GET_REQ:
 		return "WNI_CFG_GET_REQ";
-	case WNI_CFG_SET_REQ:
-		return "WNI_CFG_SET_REQ";
-	case WNI_CFG_SET_REQ_NO_RSP:
-		return "WNI_CFG_SET_REQ_NO_RSP";
 	case eWNI_PMC_ENTER_IMPS_RSP:
 		return "eWNI_PMC_ENTER_IMPS_RSP";
 	case eWNI_PMC_EXIT_IMPS_RSP:

+ 0 - 2
core/mac/src/sys/common/src/wlan_qct_sys.c

@@ -212,8 +212,6 @@ void sys_process_mmh_msg(tpAniSirGlobal pMac, struct scheduler_msg *pMsg)
 		break;
 
 	case WNI_CFG_GET_REQ:
-	case WNI_CFG_SET_REQ:
-	case WNI_CFG_SET_REQ_NO_RSP:
 	case eWNI_SME_SYS_READY_IND:
 		/* Forward this message to the PE module */
 		targetMQ = QDF_MODULE_ID_PE;

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

@@ -797,8 +797,6 @@ uint8_t *mac_trace_get_cfg_msg_string(uint16_t cfg_msg)
 		CASE_RETURN_STRING(SIR_CFG_DOWNLOAD_COMPLETE_IND);
 		CASE_RETURN_STRING(WNI_CFG_DNLD_RSP);
 		CASE_RETURN_STRING(WNI_CFG_GET_REQ);
-		CASE_RETURN_STRING(WNI_CFG_SET_REQ);
-		CASE_RETURN_STRING(WNI_CFG_SET_REQ_NO_RSP);
 	default:
 		return (uint8_t *) "UNKNOWN";
 		break;