-/**
- * @brief API for configuration request from RRM towards MAC.
- *
- * @details
- *
- * Function: HandleSchCfgReq
- *
- * This API is invoked by RRM towards MAC to configure MAC.
- * These API validates the Pst, spId, suId and transfers the config request
- * specific information to corresponding ownership module (GOM) API.
- *
- *
- * @param[in] Pst *pst
- * @param[in] RgrCfgTransId transId
- * @param[in] RgrCfgReqInfo *cfgReqInfo
- * @return S16
- * -# ROK
- * -# RFAILED
- **/
-#ifdef ANSI
-PUBLIC S16 HandleSchCfgReq
-(
- Pst *pst,
- RgrCfgTransId transId,
- RgrCfgReqInfo *cfgReqInfo
- )
-#else
-PUBLIC S16 HandleSchCfgReq(pst, transId, cfgReqInfo)
- Pst *pst;
- RgrCfgTransId transId;
- RgrCfgReqInfo *cfgReqInfo;
-#endif
-{
-
- SpId spId = 0;
- S16 ret = ROK;
- U8 cfmStatus = 0x00ff;
- U8 prntTrans[RGR_CFG_TRANSID_SIZE+1];
- Inst instId = pst->dstInst-SCH_INST_START;
-
- TRC3(HandleSchCfgReq);
-
- cmMemcpy((U8 *)prntTrans, (U8 *)transId.trans, RGR_CFG_TRANSID_SIZE);
- prntTrans[RGR_CFG_TRANSID_SIZE] = '\0';
-
-
- if (cfgReqInfo == NULLP)
- {
- RLOG_ARG0(L_ERROR,DBG_INSTID,instId,"Input Message Buffer is NULL");
- schSendCfgCfm(pst->region, pst->pool, transId, cfmStatus);
- RETVALUE(RFAILED);
- }
-#if 0
- if (spId < rgSchCb[instId].numSaps)
- {
- switch(rgSchCb[instId].rgrSap[spId].sapSta.sapState)
- {
- case LRG_BND: /* SAP is already bound */
- RLOG0(L_DEBUG,"SAP is already bound");
- break;
- default: /* Should never reach here */
-#if (ERRCLASS & ERRCLS_ADD_RES)
- RGSCHLOGERROR(instId, ERRCLS_INT_PAR, ERG005,
- (ErrVal)rgSchCb[instId].rgrSap[spId].sapSta.sapState,
- "Invalid SAP State: HandleSchCfgReq failed\n");
-#endif
- SPutSBuf(pst->region, pst->pool, (Data *)cfgReqInfo,
- (Size)sizeof(*cfgReqInfo));
- schSendCfgCfm(pst->region, pst->pool, transId, cfmStatus);
- RETVALUE(RFAILED);
- }
- }
- else
- {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- RGSCHLOGERROR(instId, ERRCLS_INT_PAR, ERG006,
- (ErrVal)rgSchCb[instId].rgrSap[spId].sapCfg.spId,
- "Invalid SAP Id:HandleSchCfgReq failed\n");
-#endif
- SPutSBuf(pst->region, pst->pool, (Data *)cfgReqInfo,
- (Size)sizeof(*cfgReqInfo));
- schSendCfgCfm(pst->region, pst->pool, transId, cfmStatus);
- RETVALUE(RFAILED);
- }
-#endif
- /* Handle configuration */
- ret = rgSCHGomHndlCfg(pst, &rgSchCb[instId],
- transId, cfgReqInfo);
- if (ret != ROK)
- {
- RLOG_ARG0(L_ERROR,DBG_INSTID,instId,"Configuration Request Handling Failed");
- RETVALUE(RFAILED);
- }
-
- RETVALUE(ROK);
-} /* HandleSchCfgReq */
-