summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2017-02-24 15:18:08 +0100
committerPhilipp Maier <pmaier@sysmocom.de>2017-02-24 16:07:24 +0100
commit3f65fb0786be48b4fad0ea7cbf8f38663e302b6a (patch)
treeab08058087a8188094ea8e2d179fa3bf7ee7d21f
parent8858d50ab6d9bd1543ae7ec96b1c27037bbf6703 (diff)
fixup_for_chreq_cause_codespmaier/rbs2000
-rw-r--r--openbsc/include/openbsc/gsm_data_shared.h2
-rw-r--r--openbsc/src/libbsc/abis_rsl.c6
-rw-r--r--openbsc/src/libbsc/gsm_04_08_utils.c8
-rw-r--r--openbsc/src/libcommon/gsm_data_shared.c10
4 files changed, 20 insertions, 6 deletions
diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h
index df34a9b2a..2b4e4e4e2 100644
--- a/openbsc/include/openbsc/gsm_data_shared.h
+++ b/openbsc/include/openbsc/gsm_data_shared.h
@@ -840,7 +840,7 @@ struct gsm_bts *gsm_bts_num(struct gsm_network *net, int num);
struct gsm_bts_trx *gsm_bts_trx_alloc(struct gsm_bts *bts);
struct gsm_bts_trx *gsm_bts_trx_num(const struct gsm_bts *bts, int num);
-
+const struct value_string gsm_chreq_descs[7];
const struct value_string gsm_pchant_names[13];
const struct value_string gsm_pchant_descs[13];
const char *gsm_pchan_name(enum gsm_phys_chan_config c);
diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c
index 3da96617c..f6832f512 100644
--- a/openbsc/src/libbsc/abis_rsl.c
+++ b/openbsc/src/libbsc/abis_rsl.c
@@ -1860,6 +1860,10 @@ static int rsl_rx_chan_rqd(struct msgb *msg)
/* Determine channel request cause code */
chreq_reason = get_reason_by_chreq(rqd_ref->ra, bts->network->neci);
+ LOGP(DRSL, LOGL_NOTICE, "BTS %d CHAN RQD: reason: %s (ra=0x%02x, neci=0x%02x, chreq_reason=0x%02x)\n",
+ msg->lchan->ts->trx->bts->nr,
+ get_value_string(gsm_chreq_descs, chreq_reason),
+ rqd_ref->ra, bts->network->neci, chreq_reason);
/* Hanle PBCH related rach requests (in case of BSC-co-located-PCU */
if (chreq_reason == GSM_CHREQ_REASON_PDCH)
@@ -1892,7 +1896,7 @@ static int rsl_rx_chan_rqd(struct msgb *msg)
/*
* Expecting lchan state to be NONE, except for dyn TS in PDCH mode.
* Those are expected to be ACTIVE: the PDCH release will be sent from
- * rsl_chan_activate_lchan() below.
+ * rsl_chan_activate_lchan() below../include/openbsc/gsm_data_shared.h
*/
if (lchan->state != LCHAN_S_NONE
&& !(lchan->ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH
diff --git a/openbsc/src/libbsc/gsm_04_08_utils.c b/openbsc/src/libbsc/gsm_04_08_utils.c
index c227fb98d..63ccf6f59 100644
--- a/openbsc/src/libbsc/gsm_04_08_utils.c
+++ b/openbsc/src/libbsc/gsm_04_08_utils.c
@@ -78,8 +78,8 @@ static const struct chreq chreq_type_neci1[] = {
{ 0x63, 0xff, CHREQ_T_RESERVED_SDCCH },
{ 0x70, 0xf8, CHREQ_T_PDCH_TWO_PHASE },
{ 0x78, 0xfc, CHREQ_T_PDCH_ONE_PHASE },
- { 0x79, 0xfa, CHREQ_T_PDCH_ONE_PHASE },
- { 0x7a, 0xf9, CHREQ_T_PDCH_ONE_PHASE },
+ { 0x78, 0xfa, CHREQ_T_PDCH_ONE_PHASE },
+ { 0x78, 0xf9, CHREQ_T_PDCH_ONE_PHASE },
{ 0x7f, 0xff, CHREQ_T_RESERVED_IGNORE },
};
@@ -99,8 +99,8 @@ static const struct chreq chreq_type_neci0[] = {
{ 0x63, 0xff, CHREQ_T_RESERVED_SDCCH },
{ 0x70, 0xf8, CHREQ_T_PDCH_TWO_PHASE },
{ 0x78, 0xfc, CHREQ_T_PDCH_ONE_PHASE },
- { 0x79, 0xfa, CHREQ_T_PDCH_ONE_PHASE },
- { 0x7a, 0xf9, CHREQ_T_PDCH_ONE_PHASE },
+ { 0x78, 0xfa, CHREQ_T_PDCH_ONE_PHASE },
+ { 0x78, 0xf9, CHREQ_T_PDCH_ONE_PHASE },
{ 0x7f, 0xff, CHREQ_T_RESERVED_IGNORE },
};
diff --git a/openbsc/src/libcommon/gsm_data_shared.c b/openbsc/src/libcommon/gsm_data_shared.c
index c79c44b36..71a18c457 100644
--- a/openbsc/src/libcommon/gsm_data_shared.c
+++ b/openbsc/src/libcommon/gsm_data_shared.c
@@ -51,6 +51,16 @@ static void gsm_mo_init(struct gsm_abis_mo *mo, struct gsm_bts *bts,
gsm_abis_mo_reset(mo);
}
+const struct value_string gsm_chreq_descs[7] = {
+ { GSM_CHREQ_REASON_EMERG, "cmergancy call" },
+ { GSM_CHREQ_REASON_PAG, "answer to paging" },
+ { GSM_CHREQ_REASON_CALL, "call re-establishment" },
+ { GSM_CHREQ_REASON_LOCATION_UPD,"Location updating" },
+ { GSM_CHREQ_REASON_PDCH, "one phase packet access" },
+ { GSM_CHREQ_REASON_OTHER, "other" },
+ { 0, NULL }
+};
+
const struct value_string gsm_pchant_names[13] = {
{ GSM_PCHAN_NONE, "NONE" },
{ GSM_PCHAN_CCCH, "CCCH" },