# HG changeset patch # User Mychaela Falconia # Date 1458499854 0 # Node ID 908566db15381c2de8d69e535c2444791060ac83 # Parent c83d3346d4b9c6d0c6f77c4c1d62c1b15edd5721 gsm-fw feature tch-reroute: init and config fleshed out diff -r c83d3346d4b9 -r 908566db1538 gsm-fw/L1/cfile/l1_init.c --- a/gsm-fw/L1/cfile/l1_init.c Sat Mar 19 07:01:54 2016 +0000 +++ b/gsm-fw/L1/cfile/l1_init.c Sun Mar 20 18:50:54 2016 +0000 @@ -1851,10 +1851,13 @@ #if TRACE_TYPE==3 reset_stats(); #endif - #if(OP_L1_STANDALONE == 1 || L1_NAVC == 1 )//NAVC + #if(OP_L1_STANDALONE == 1 || L1_NAVC == 1 )//NAVC Cust_navc_ctrl_status(1);//start - NAVC - #endif//end of (OP_L1_STANDALONE == 1 || L1_NAVC == 1 ) + #endif//end of (OP_L1_STANDALONE == 1 || L1_NAVC == 1 ) + #if FEATURE_TCH_REROUTE + feature_tch_reroute_init(); + #endif } /*-------------------------------------------------------*/ diff -r c83d3346d4b9 -r 908566db1538 gsm-fw/L1/cfile/tch_feature.c --- a/gsm-fw/L1/cfile/tch_feature.c Sat Mar 19 07:01:54 2016 +0000 +++ b/gsm-fw/L1/cfile/tch_feature.c Sun Mar 20 18:50:54 2016 +0000 @@ -13,13 +13,43 @@ T_RVT_USER_ID tch_reroute_rvt_id; BOOL tch_reroute_downlink; +static void handle_tch_config_reg(T_RVT_BUFFER pkt) +{ + UWORD8 config; + T_RVT_BUFFER buf; + T_RVT_RET rc; + + config = pkt[1] & 0x01; + tch_reroute_downlink = config; + + /* send TCH_CONFIG_CONF response */ + rc = rvt_mem_alloc(tch_reroute_rvt_id, 2, &buf); + if (rc == RVT_OK) { + buf[0] = TCH_CONFIG_CONF; + buf[1] = config; + rvt_send_trace_no_cpy(buf, tch_reroute_rvt_id, 2, + RVT_BINARY_FORMAT); + } +} + /* * The following function is the callback registered with RVT; it gets * called in RVT HISR context. */ static void tch_rvt_input_callback(T_RVT_BUFFER pkt, UINT16 pktlen) { - /* guts to be filled */ + if (pktlen < 1) + return; + switch (pkt[0]) { + case TCH_CONFIG_REQ: + if (pktlen != 2) + return; + handle_tch_config_reg(pkt); + break; + case TCH_ULBITS_REQ: + /* to be filled */ + break; + } } void feature_tch_reroute_init()