lapdm: remove get_rsl_name() and use libosmogsm:gsm_rsl_name() instead
This commit is contained in:
parent
3538c38835
commit
e4ea01041e
|
@ -2166,34 +2166,6 @@ static int l2_ph_chan_conf(struct msgb *msg, struct lapdm_entity *le, uint32_t f
|
||||||
return rslms_sendmsg(msg, le);
|
return rslms_sendmsg(msg, le);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Names for Radio Link Layer Management */
|
|
||||||
static const struct value_string rsl_msg_names[] = {
|
|
||||||
{ RSL_MT_DATA_REQ, "RSL_MT_DATA_REQ" },
|
|
||||||
{ RSL_MT_DATA_IND, "RSL_MT_DATA_IND" },
|
|
||||||
{ RSL_MT_ERROR_IND, "RSL_MT_ERROR_IND" },
|
|
||||||
{ RSL_MT_EST_REQ, "RSL_MT_EST_REQ" },
|
|
||||||
{ RSL_MT_EST_CONF, "RSL_MT_EST_CONF" },
|
|
||||||
{ RSL_MT_EST_IND, "RSL_MT_EST_IND" },
|
|
||||||
{ RSL_MT_EST_IND, "RSL_MT_REL_REQ" },
|
|
||||||
{ RSL_MT_REL_REQ, "RSL_MT_REL_REQ" },
|
|
||||||
{ RSL_MT_REL_CONF, "RSL_MT_REL_CONF" },
|
|
||||||
{ RSL_MT_REL_IND, "RSL_MT_REL_IND" },
|
|
||||||
{ RSL_MT_UNIT_DATA_REQ, "RSL_MT_UNIT_DATA_REQ" },
|
|
||||||
{ RSL_MT_UNIT_DATA_IND, "RSL_MT_UNIT_DATA_IND" },
|
|
||||||
{ RSL_MT_SUSP_REQ, "RSL_MT_SUSP_REQ" },
|
|
||||||
{ RSL_MT_SUSP_CONF, "RSL_MT_SUSP_CONF" },
|
|
||||||
{ RSL_MT_RES_REQ, "RSL_MT_RES_REQ" },
|
|
||||||
{ RSL_MT_RECON_REQ, "RSL_MT_RECON_REQ" },
|
|
||||||
{ RSL_MT_CHAN_RQD, "RSL_MT_CHAN_RQD" },
|
|
||||||
{ RSL_MT_CHAN_CONF, "RSL_MT_CHAN_CONF" },
|
|
||||||
{ 0, NULL }
|
|
||||||
};
|
|
||||||
|
|
||||||
const char *get_rsl_name(int value)
|
|
||||||
{
|
|
||||||
return get_value_string(rsl_msg_names, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *lapdm_state_names[] = {
|
const char *lapdm_state_names[] = {
|
||||||
"LAPDm_STATE_NULL",
|
"LAPDm_STATE_NULL",
|
||||||
"LAPDm_STATE_IDLE",
|
"LAPDm_STATE_IDLE",
|
||||||
|
@ -2284,7 +2256,7 @@ static int rslms_rx_rll(struct msgb *msg, struct lapdm_channel *lc)
|
||||||
}
|
}
|
||||||
|
|
||||||
LOGP(DRSL, LOGL_INFO, "(%p) RLL Message '%s' received in state %s\n",
|
LOGP(DRSL, LOGL_INFO, "(%p) RLL Message '%s' received in state %s\n",
|
||||||
lc->name, get_rsl_name(msg_type), lapdm_state_names[dl->state]);
|
lc->name, rsl_msg_name(msg_type), lapdm_state_names[dl->state]);
|
||||||
|
|
||||||
/* find function for current state and message */
|
/* find function for current state and message */
|
||||||
for (i = 0; i < L2DOWNSLLEN; i++) {
|
for (i = 0; i < L2DOWNSLLEN; i++) {
|
||||||
|
|
|
@ -744,7 +744,7 @@ static int rcv_cch(struct osmocom_ms *ms, struct msgb *msg)
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
LOGP(DRSL, LOGL_INFO, "Received '%s' from layer1\n",
|
LOGP(DRSL, LOGL_INFO, "Received '%s' from layer1\n",
|
||||||
get_rsl_name(msg_type));
|
rsl_msg_name(msg_type));
|
||||||
|
|
||||||
if (state == SCAN_STATE_RACH && msg_type == RSL_MT_CHAN_CONF) {
|
if (state == SCAN_STATE_RACH && msg_type == RSL_MT_CHAN_CONF) {
|
||||||
rc = chan_conf(ms, msg);
|
rc = chan_conf(ms, msg);
|
||||||
|
|
|
@ -4916,7 +4916,7 @@ static int gsm48_rcv_rll(struct osmocom_ms *ms, struct msgb *msg)
|
||||||
|
|
||||||
if (msg_type != RSL_MT_UNIT_DATA_IND) {
|
if (msg_type != RSL_MT_UNIT_DATA_IND) {
|
||||||
LOGP(DRSL, LOGL_INFO, "(ms %s) Received '%s' from L2 in state "
|
LOGP(DRSL, LOGL_INFO, "(ms %s) Received '%s' from L2 in state "
|
||||||
"%s\n", ms->name, get_rsl_name(msg_type),
|
"%s\n", ms->name, rsl_msg_name(msg_type),
|
||||||
gsm48_rr_state_names[rr->state]);
|
gsm48_rr_state_names[rr->state]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4948,7 +4948,7 @@ static int gsm48_rcv_cch(struct osmocom_ms *ms, struct msgb *msg)
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
LOGP(DRSL, LOGL_INFO, "(ms %s) Received '%s' from L2 in state "
|
LOGP(DRSL, LOGL_INFO, "(ms %s) Received '%s' from L2 in state "
|
||||||
"%s\n", ms->name, get_rsl_name(msg_type),
|
"%s\n", ms->name, rsl_msg_name(msg_type),
|
||||||
gsm48_rr_state_names[rr->state]);
|
gsm48_rr_state_names[rr->state]);
|
||||||
|
|
||||||
if (rr->state == GSM48_RR_ST_CONN_PEND
|
if (rr->state == GSM48_RR_ST_CONN_PEND
|
||||||
|
|
Loading…
Reference in New Issue