FreeCalypso > hg > fc-magnetite
view src/aci2/aci/psa_sss.c @ 685:3fb7384e820d
tpudrv12.h: FCDEV3B goes back to being itself
A while back we had the idea of a FreeCalypso modem family whereby our
current fcdev3b target would some day morph into fcmodem, with multiple
FC modem family products, potentially either triband or quadband, being
firmware-compatible with each other and with our original FCDEV3B. But
in light of the discovery of Tango modules that earlier idea is now being
withdrawn: instead the already existing Tango hw is being adopted into
our FreeCalypso family.
Tango cannot be firmware-compatible with triband OM/FCDEV3B targets
because the original quadband RFFE on Tango modules is wired in TI's
original Leonardo arrangement. Because this Leonardo/Tango way is now
becoming the official FreeCalypso way of driving quadband RFFEs thanks
to the adoption of Tango into our FC family, our earlier idea of
extending FIC's triband RFFE control signals with TSPACT5 no longer makes
much sense - we will probably never produce any new hardware with that
once-proposed arrangement. Therefore, that triband-or-quadband FCFAM
provision is being removed from the code base, and FCDEV3B goes back to
being treated the same way as CONFIG_TARGET_GTAMODEM for RFFE control
purposes.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 24 Sep 2020 21:03:08 +0000 |
parents | 93999a60b835 |
children |
line wrap: on
line source
/* +----------------------------------------------------------------------------- | Project : GSM-PS (6147) | Modul : PSA_SSS +----------------------------------------------------------------------------- | Copyright 2002 Texas Instruments Berlin, AG | All rights reserved. | | This file is confidential and a trade secret of Texas | Instruments Berlin, AG | The receipt of or possession of this file does not convey | any rights to reproduce or disclose its contents or to | manufacture, use, or sell anything it may describe, in | whole, or in part, without the specific written consent of | Texas Instruments Berlin, AG. +----------------------------------------------------------------------------- | Purpose : This module defines the signalling functions of the | protocol stack adapter for supplementary services. +----------------------------------------------------------------------------- */ #ifndef PSA_SSS_C #define PSA_SSS_C #endif #include "aci_all.h" /*==== INCLUDES ===================================================*/ #include "aci_cmh.h" #include "ati_cmd.h" #include "aci_cmd.h" #include "aci.h" #include "psa.h" #include "psa_ss.h" #include "cmh_ss.h" #ifdef SIM_TOOLKIT #include "psa_cc.h" #include "psa_sat.h" #endif /* of SIM_TOOLKIT */ /*==== CONSTANTS ==================================================*/ /*==== TYPES ======================================================*/ /*==== EXPORT =====================================================*/ /*==== VARIABLES ==================================================*/ EXTERN T_PCEER causeMod; EXTERN SHORT causeCeer; /*==== FUNCTIONS ==================================================*/ static UBYTE inv_opcode; /* +-------------------------------------------------------------------+ | PROJECT : GSM-PS (6147) MODULE : PSA_SSS | | ROUTINE : psaSS_NewTrns | +-------------------------------------------------------------------+ PURPOSE : start a new SS transaction */ GLOBAL SHORT psaSS_NewTrns ( SHORT sId ) { T_SS_SRV_TBL * pStbNtry; /* holds pointer to service table entry */ BYTE ccdRet; /* holds CCD return value */ TRACE_FUNCTION ("psaSS_NewTrns()"); /* *------------------------------------------------------------------- * get a valid ti for a MOS, otherwise return *------------------------------------------------------------------- */ if( psaSS_getMOSTi( sId ) < 0 ) return ( -1 ); causeMod = P_CEER_mod; /* Clear module which was set for ceer */ causeCeer = CEER_NotPresent; /* Clear extended error cause */ /* *------------------------------------------------------------------- * create and send primitive *------------------------------------------------------------------- */ { PALLOC (mnss_begin_req, MNSS_BEGIN_REQ); /* * fill in primitive parameter: begin request */ pStbNtry = &ssShrdPrm.stb[sId]; mnss_begin_req -> ti = pStbNtry -> ti; if( pStbNtry -> SSver NEQ NOT_PRESENT_8BIT ) { mnss_begin_req -> ss_ver.len = 1; mnss_begin_req -> ss_ver.ver[0] = pStbNtry -> SSver; } else mnss_begin_req -> ss_ver.len = 0; { MCAST( com, COMPONENT ); memset( com, 0, sizeof( T_COMPONENT )); switch( ssShrdPrm.cmpType ) { case( CT_INV ): com -> v_inv_comp = TRUE; com -> inv_comp.v_inv_id = TRUE; com -> inv_comp.inv_id = pStbNtry -> iId = ssShrdPrm.iIdNxt++; com -> inv_comp.v_op_code = TRUE; com -> inv_comp.op_code = pStbNtry -> opCode = ssFIECodeBuf.buf[0]; inv_opcode = com->inv_comp.op_code; com -> inv_comp.v_params = TRUE; com -> inv_comp.params.l_params = ssFIECodeBuf.l_buf-8; com -> inv_comp.params.o_params = 8; memcpy( com -> inv_comp.params.b_params, ssFIECodeBuf.buf, ssFIECodeBuf.l_buf>>3 ); break; case( CT_RET_RSLT ): break; case( CT_RET_ERR ): break; case( CT_RET_REJ ): break; } mnss_begin_req -> fac_inf.l_fac = FACILITY_LEN<<3; mnss_begin_req -> fac_inf.o_fac = 0; ccdRet = ccd_codeMsg (CCDENT_FAC, UPLINK, (T_MSGBUF *) &mnss_begin_req -> fac_inf, (UBYTE *) _decodedMsg, COMPONENT); if( ccdRet NEQ ccdOK ) { CHAR buf[25]; sprintf( buf, "CCD Coding Error: %d",ccdRet ); TRACE_EVENT( buf ); PFREE( mnss_begin_req ); return( -1 ); } } pStbNtry -> srvType = ST_MOS; psaSS_DumpFIE ( &mnss_begin_req -> fac_inf ); cmhSS_sendFie ( CSCN_FACILITY_DIRECTION_OUT, CSCN_FACILITY_TRANS_TYPE_BEGIN, &mnss_begin_req -> fac_inf ); if ( ssShrdPrm.mltyTrnFlg EQ 0 ) { PSENDX (SS, mnss_begin_req); /* send primitive */ } else pStbNtry -> save_prim = mnss_begin_req; /* already one transaction in process */ /* * update service status */ pStbNtry -> srvStat = SSS_ACT; } return 0; } /* +-------------------------------------------------------------------+ | PROJECT : GSM-PS (6147) MODULE : PSA_SSS | | ROUTINE : psaSS_EndTrns | +-------------------------------------------------------------------+ PURPOSE : stop an existing SS transaction */ GLOBAL SHORT psaSS_EndTrns ( SHORT sId ) { T_SS_SRV_TBL * pStbNtry; /* holds pointer to service table entry */ TRACE_FUNCTION ("psaSS_EndTrns()"); /* *------------------------------------------------------------------- * create and send primitive *------------------------------------------------------------------- */ { PALLOC (mnss_end_req, MNSS_END_REQ); /* * fill in primitive parameter: end request */ pStbNtry = &ssShrdPrm.stb[sId]; mnss_end_req -> ti = pStbNtry -> ti; { UBYTE ccdRet; MCAST( com, COMPONENT ); memset( com, 0, sizeof( T_COMPONENT )); switch( ssShrdPrm.cmpType ) { case( CT_RET_RSLT ): com -> v_res_comp = TRUE; com -> res_comp.v_inv_id = TRUE; com -> res_comp.inv_id = pStbNtry -> iId; com -> res_comp.v_sequence = TRUE; com -> res_comp.sequence.v_op_code = TRUE; com -> res_comp.sequence.op_code = pStbNtry -> opCode; com -> res_comp.sequence.v_params = TRUE; com -> res_comp.sequence.params.l_params = ssFIECodeBuf.l_buf-8; com -> res_comp.sequence.params.o_params = 8; memcpy( com -> res_comp.sequence.params.b_params, ssFIECodeBuf.buf, ssFIECodeBuf.l_buf>>3 ); break; case( CT_RET_ERR ): com -> v_err_comp = TRUE; com -> err_comp.v_inv_id = TRUE; com -> err_comp.inv_id = pStbNtry -> iId; com -> err_comp.v_err_code = TRUE; com -> err_comp.err_code = pStbNtry -> errCd; break; case( CT_RET_REJ ): break; } mnss_end_req -> fac_inf.l_fac = FACILITY_LEN<<3; mnss_end_req -> fac_inf.o_fac = 0; ccdRet = ccd_codeMsg (CCDENT_FAC, UPLINK, (T_MSGBUF *) &mnss_end_req -> fac_inf, (UBYTE *) _decodedMsg, COMPONENT); if( ccdRet NEQ ccdOK ) { CHAR buf[25]; sprintf( buf, "CCD Coding Error: %d",ccdRet ); TRACE_EVENT( buf ); PFREE( mnss_end_req ); return( -1 ); } } psaSS_DumpFIE ( &mnss_end_req -> fac_inf ); cmhSS_sendFie ( CSCN_FACILITY_DIRECTION_OUT, CSCN_FACILITY_TRANS_TYPE_END, &mnss_end_req -> fac_inf ); PSENDX (SS, mnss_end_req); #ifdef SIM_TOOLKIT if ( sId EQ satShrdPrm.SentUSSDid AND satShrdPrm.cmdDet.cmdType EQ SAT_CMD_SEND_USSD ) { satShrdPrm.USSDterm = TRUE; } #endif /* * update call status */ pStbNtry -> srvStat = SSS_IDL; } psaSS_retMOSTi (sId); return 0; } /* +-------------------------------------------------------------------+ | PROJECT : GSM-PS (6147) MODULE : PSA_SSS | | ROUTINE : psaSS_CntTrns | +-------------------------------------------------------------------+ PURPOSE : continue with an existing SS transaction */ GLOBAL SHORT psaSS_CntTrns ( SHORT sId ) { T_SS_SRV_TBL * pStbNtry; /* holds pointer to service table entry */ TRACE_FUNCTION ("psaSS_CntTrns()"); /* *------------------------------------------------------------------- * create and send primitive *------------------------------------------------------------------- */ { PALLOC (mnss_facility_req, MNSS_FACILITY_REQ); /* * fill in primitive parameter: facility request */ pStbNtry = &ssShrdPrm.stb[sId]; mnss_facility_req -> ti = pStbNtry -> ti; { UBYTE ccdRet; MCAST( com, COMPONENT ); memset( com, 0, sizeof( T_COMPONENT )); switch( ssShrdPrm.cmpType ) { case( CT_RET_RSLT ): com -> v_res_comp = TRUE; com -> res_comp.v_inv_id = TRUE; com -> res_comp.inv_id = pStbNtry -> iId; /* patch for FTA 31.9.2.1: When empty facility should be returned, then message should contain ONLY the invoke id. CLB 061201 */ if( ssFIECodeBuf.l_buf NEQ 8 ) /* means there actually are parameters */ { com -> res_comp.v_sequence = TRUE; com -> res_comp.sequence.v_op_code = TRUE; com -> res_comp.sequence.op_code = pStbNtry -> opCode; pStbNtry -> opCode = inv_opcode; com -> res_comp.sequence.v_params = TRUE; com -> res_comp.sequence.params.l_params = ssFIECodeBuf.l_buf-8; com -> res_comp.sequence.params.o_params = 8; memcpy( com -> res_comp.sequence.params.b_params, ssFIECodeBuf.buf, ssFIECodeBuf.l_buf>>3 ); } break; case( CT_RET_ERR ): com -> v_err_comp = TRUE; com -> err_comp.v_inv_id = TRUE; com -> err_comp.inv_id = pStbNtry -> iId; com -> err_comp.v_err_code = TRUE; com -> err_comp.err_code = pStbNtry -> errCd; break; break; case( CT_RET_REJ ): break; } mnss_facility_req -> fac_inf.l_fac = FACILITY_LEN<<3; mnss_facility_req -> fac_inf.o_fac = 0; ccdRet = ccd_codeMsg (CCDENT_FAC, UPLINK, (T_MSGBUF *) &mnss_facility_req -> fac_inf, (UBYTE *) _decodedMsg, COMPONENT); if( ccdRet NEQ ccdOK ) { CHAR buf[25]; sprintf( buf, "CCD Coding Error: %d",ccdRet ); TRACE_EVENT( buf ); PFREE( mnss_facility_req ); return( -1 ); } } psaSS_DumpFIE ( &mnss_facility_req -> fac_inf ); cmhSS_sendFie ( CSCN_FACILITY_DIRECTION_OUT, CSCN_FACILITY_TRANS_TYPE, &mnss_facility_req -> fac_inf ); PSENDX (SS, mnss_facility_req); } return 0; } /*==== EOF ========================================================*/