RSL: Add basic support for CSD transparent mode

We now have a lchan->csd_mode member that determines if RSL should
activate the channel in CSD transparent services or not.  The previous
code always assumed CSD is non-transparent.

(This requires libosmocore >= eed26116c96f03c6128fac3dead9054714af6cab)
This commit is contained in:
Harald Welte 2012-08-24 15:33:56 +02:00
parent bb53e3577a
commit e422798866
2 changed files with 58 additions and 6 deletions

View File

@ -149,6 +149,18 @@ struct amr_multirate_conf {
};
/* /BTS ONLY */
enum lchan_csd_mode {
LCHAN_CSD_M_NT,
LCHAN_CSD_M_T_1200_75,
LCHAN_CSD_M_T_600,
LCHAN_CSD_M_T_1200,
LCHAN_CSD_M_T_2400,
LCHAN_CSD_M_T_9600,
LCHAN_CSD_M_T_14400,
LCHAN_CSD_M_T_29000,
LCHAN_CSD_M_T_32000,
};
struct gsm_lchan {
/* The TS that we're part of */
struct gsm_bts_trx_ts *ts;
@ -160,6 +172,7 @@ struct gsm_lchan {
enum rsl_cmod_spd rsl_cmode;
/* If TCH, traffic channel mode */
enum gsm48_chan_mode tch_mode;
enum lchan_csd_mode csd_mode;
/* State */
enum gsm_lchan_state state;
/* Power levels for MS and BTS */

View File

@ -363,14 +363,53 @@ static int channel_mode_from_lchan(struct rsl_ie_chan_mode *cm,
cm->chan_rate = RSL_CMOD_SP_GSM3;
break;
case GSM48_CMODE_DATA_14k5:
cm->chan_rate = RSL_CMOD_SP_NT_14k5;
break;
case GSM48_CMODE_DATA_12k0:
cm->chan_rate = RSL_CMOD_SP_NT_12k0;
break;
case GSM48_CMODE_DATA_6k0:
cm->chan_rate = RSL_CMOD_SP_NT_6k0;
break;
switch (lchan->csd_mode) {
case LCHAN_CSD_M_NT:
/* non-transparent CSD with RLP */
switch (lchan->tch_mode) {
case GSM48_CMODE_DATA_14k5:
cm->chan_rate = RSL_CMOD_SP_NT_14k5;
break;
case GSM48_CMODE_DATA_12k0:
cm->chan_rate = RSL_CMOD_SP_NT_12k0;
break;
case GSM48_CMODE_DATA_6k0:
cm->chan_rate = RSL_CMOD_SP_NT_6k0;
break;
default:
return -EINVAL;
}
break;
/* transparent data services below */
case LCHAN_CSD_M_T_1200_75:
cm->chan_rate = RSL_CMOD_CSD_T_1200_75;
break;
case LCHAN_CSD_M_T_600:
cm->chan_rate = RSL_CMOD_CSD_T_600;
break;
case LCHAN_CSD_M_T_1200:
cm->chan_rate = RSL_CMOD_CSD_T_1200;
break;
case LCHAN_CSD_M_T_2400:
cm->chan_rate = RSL_CMOD_CSD_T_2400;
break;
case LCHAN_CSD_M_T_9600:
cm->chan_rate = RSL_CMOD_CSD_T_9600;
break;
case LCHAN_CSD_M_T_14400:
cm->chan_rate = RSL_CMOD_CSD_T_14400;
break;
case LCHAN_CSD_M_T_29000:
cm->chan_rate = RSL_CMOD_CSD_T_29000;
break;
case LCHAN_CSD_M_T_32000:
cm->chan_rate = RSL_CMOD_CSD_T_32000;
break;
default:
return -EINVAL;
}
default:
return -EINVAL;
}