[layer23] Several minor changes and minor fixes
This commit is contained in:
parent
7b89bb8a84
commit
1f1e867edc
|
@ -14,6 +14,7 @@
|
|||
#define FREQ_TYPE_REP_5 0x20 /* sub channel of SI 5 */
|
||||
#define FREQ_TYPE_REP_5bis 0x40 /* sub channel of SI 5bis */
|
||||
#define FREQ_TYPE_REP_5ter 0x80 /* sub channel of SI 5ter */
|
||||
#define FREQ_TYPE_SI_2_5 0xfc /* both SI 2 and SI 5 */
|
||||
|
||||
/* structure of one frequency */
|
||||
struct gsm_sysinfo_freq {
|
||||
|
|
|
@ -1901,6 +1901,7 @@ int mncc_send(struct osmocom_ms *ms, int msg_type, void *arg)
|
|||
/* check for SETUP message */
|
||||
if (msg_type != MNCC_SETUP_REQ) {
|
||||
/* Invalid call reference */
|
||||
LOGP(DCC, LOGL_NOTICE, "transaction not found\n");
|
||||
return mncc_release_ind(ms, NULL, data->callref,
|
||||
GSM48_CAUSE_LOC_PRN_S_LU,
|
||||
GSM48_CC_CAUSE_INVAL_TRANS_ID);
|
||||
|
@ -1922,6 +1923,12 @@ int mncc_send(struct osmocom_ms *ms, int msg_type, void *arg)
|
|||
}
|
||||
}
|
||||
|
||||
switch (msg_type) {
|
||||
case GSM_TCHF_FRAME:
|
||||
printf("TCH/F frame ignored!\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Find function for current state and message */
|
||||
for (i = 0; i < DOWNSLLEN; i++)
|
||||
if ((msg_type == downstatelist[i].type)
|
||||
|
|
|
@ -3102,9 +3102,6 @@ static int gsm48_rr_dl_est(struct osmocom_ms *ms)
|
|||
uint16_t ma[64];
|
||||
uint8_t ma_len;
|
||||
|
||||
/* 3.3.1.1.3.1 */
|
||||
stop_rr_t3126(rr);
|
||||
|
||||
if (rr->cd_now.h) {
|
||||
gsm48_decode_mobile_alloc(s, rr->cd_now.mob_alloc_lv + 1,
|
||||
rr->cd_now.mob_alloc_lv[0], ma, &ma_len, 0);
|
||||
|
@ -3114,6 +3111,9 @@ static int gsm48_rr_dl_est(struct osmocom_ms *ms)
|
|||
}
|
||||
}
|
||||
|
||||
/* 3.3.1.1.3.1 */
|
||||
stop_rr_t3126(rr);
|
||||
|
||||
/* send DL_EST_REQ */
|
||||
if (rr->rr_est_msg) {
|
||||
/* use queued message */
|
||||
|
|
|
@ -1047,7 +1047,7 @@ for (i = 0; i < (dl->tx_hist[0][2] >> 2); i++)
|
|||
printf(" == SENT\n");
|
||||
for (i = 0; i < length; i++)
|
||||
printf(" %02x", msg->l2h[3+i]);
|
||||
printf(" == RECEIVED\n");
|
||||
printf(" == RECEIVED (len=%d,%d)\n", msg->l2h[2] >> 2, length);
|
||||
rc = send_rll_simple(RSL_MT_REL_IND, mctx);
|
||||
msgb_free(msg);
|
||||
/* go to idle state */
|
||||
|
|
|
@ -216,24 +216,23 @@ int mncc_recv_mobile(struct osmocom_ms *ms, int msg_type, void *arg)
|
|||
if (!first_call && !ms->settings.cw) {
|
||||
vty_notify(ms, "Incomming call rejected while busy\n");
|
||||
LOGP(DMNCC, LOGL_INFO, "Incomming call but busy\n");
|
||||
cause = GSM48_CC_CAUSE_NORM_CALL_CLEAR;
|
||||
cause = GSM48_CC_CAUSE_USER_BUSY;
|
||||
goto release;
|
||||
}
|
||||
/* presentation allowed if present == 0 */
|
||||
if (data->calling.present || !data->calling.number[0])
|
||||
vty_notify(ms, "Incomming call (callref %x)\n",
|
||||
call->callref);
|
||||
vty_notify(ms, "Incomming call (anonymous)\n");
|
||||
else if (data->calling.type == 1)
|
||||
vty_notify(ms, "Incomming call from +%s (callref %x)\n",
|
||||
data->calling.number, call->callref);
|
||||
vty_notify(ms, "Incomming call (from +%s)\n",
|
||||
data->calling.number);
|
||||
else if (data->calling.type == 2)
|
||||
vty_notify(ms, "Incomming call from 0-%s (callref "
|
||||
"%x)\n", data->calling.number, call->callref);
|
||||
vty_notify(ms, "Incomming call (from 0-%s)\n",
|
||||
data->calling.number);
|
||||
else
|
||||
vty_notify(ms, "Incomming call from %s (callref %x)\n",
|
||||
data->calling.number, call->callref);
|
||||
LOGP(DMNCC, LOGL_INFO, "Incomming call (callref %x)\n",
|
||||
call->callref);
|
||||
vty_notify(ms, "Incomming call (from %s)\n",
|
||||
data->calling.number);
|
||||
LOGP(DMNCC, LOGL_INFO, "Incomming call (from %s callref %x)\n",
|
||||
data->calling.number, call->callref);
|
||||
memset(&mncc, 0, sizeof(struct gsm_mncc));
|
||||
mncc.callref = call->callref;
|
||||
mncc_send(ms, MNCC_CALL_CONF_REQ, &mncc);
|
||||
|
|
|
@ -66,28 +66,26 @@ void gsm_support_init(struct osmocom_ms *ms)
|
|||
sup->a5_6 = 0;
|
||||
sup->a5_7 = 0;
|
||||
/* radio support */
|
||||
sup->p_gsm = 1; /* P-GSM only */
|
||||
sup->p_gsm = 1; /* P-GSM */
|
||||
sup->e_gsm = 1; /* E-GSM */
|
||||
sup->r_gsm = 1; /* R-GSM */
|
||||
sup->r_capa = 0;
|
||||
sup->low_capa = 4; /* p,e,r power class */
|
||||
sup->dcs_1800 = 1;
|
||||
/* set supported frequencies */
|
||||
if (sup->e_gsm || sup->r_gsm)
|
||||
sup->freq_map[0] |= 1;
|
||||
if (sup->p_gsm || sup->e_gsm || sup->r_gsm)
|
||||
if (sup->p_gsm)
|
||||
for(i = 1; i <= 124; i++)
|
||||
sup->freq_map[i >> 3] |= (1 << (i & 7));
|
||||
if (sup->dcs_1800)
|
||||
for(i = 512; i <= 885; i++)
|
||||
sup->freq_map[i >> 3] |= (1 << (i & 7));
|
||||
if (sup->e_gsm)
|
||||
if (sup->e_gsm) {
|
||||
for(i = 975; i <= 1023; i++)
|
||||
sup->freq_map[i >> 3] |= (1 << (i & 7));
|
||||
// for(i = 978; i <= 978; i++)
|
||||
// sup->freq_map[i >> 3] |= (1 << (i & 7));
|
||||
sup->freq_map[0] |= 1;
|
||||
}
|
||||
if (sup->r_gsm)
|
||||
for(i = 955; i <= 1023; i++)
|
||||
for(i = 955; i <= 974; i++)
|
||||
sup->freq_map[i >> 3] |= (1 << (i & 7));
|
||||
sup->dcs_capa = 1; /* dcs power class */
|
||||
/* multi slot support */
|
||||
|
@ -113,7 +111,7 @@ struct gsm_support_scan_max gsm_sup_smax[] = {
|
|||
{ 306, 340, 15, 0 }, /* GSM 480 */
|
||||
{ 438, 511, 25, 0 },
|
||||
{ 128, 251, 30, 0 },
|
||||
{ 955, 124, 30, 0 },
|
||||
{ 955, 124, 30, 0 }, /* P,E,R GSM */
|
||||
{ 512, 885, 40, 0 }, /* DCS 1800 */
|
||||
{ 0, 0, 0, 0 }
|
||||
};
|
||||
|
@ -124,14 +122,14 @@ void gsm_support_dump(struct gsm_support *sup,
|
|||
{
|
||||
print(priv, "Supported features of MS '%s':\n", sup->ms->name);
|
||||
if (sup->r_gsm)
|
||||
print(priv, " R-GSM");
|
||||
if (sup->e_gsm || sup->r_gsm)
|
||||
print(priv, " E-GSM");
|
||||
if (sup->p_gsm || sup->p_gsm || sup->r_gsm)
|
||||
print(priv, " P-GSM");
|
||||
print(priv, " R-GSM (Channels 955-974)\n");
|
||||
if (sup->e_gsm)
|
||||
print(priv, " E-GSM (Channels 975-1023,0)\n");
|
||||
if (sup->p_gsm)
|
||||
print(priv, " P-GSM (Channels 1-124)\n");
|
||||
if (sup->dcs_1800)
|
||||
print(priv, " DCS1800");
|
||||
print(priv, " (Phase %d mobile station)\n", sup->rev_lev + 1);
|
||||
print(priv, " DCS1800 (Channels 512-885)\n");
|
||||
print(priv, " Phase %d mobile station\n", sup->rev_lev + 1);
|
||||
print(priv, " CECS : %s\n", (sup->es_ind) ? "yes" : "no");
|
||||
print(priv, " VGCS : %s\n", (sup->vgcs) ? "yes" : "no");
|
||||
print(priv, " VBS : %s\n", (sup->vbs) ? "yes" : "no");
|
||||
|
|
|
@ -71,26 +71,20 @@ int gsm48_sysinfo_dump(struct gsm48_sysinfo *s, uint16_t arfcn,
|
|||
buffer[j + 5] = 'S';
|
||||
else if ((s->freq[i+j].mask & FREQ_TYPE_HOPP))
|
||||
buffer[j + 5] = 'H';
|
||||
else if ((s->freq[i+j].mask & FREQ_TYPE_NCELL_2))
|
||||
buffer[j + 5] = 'N';
|
||||
else if ((s->freq[i+j].mask & FREQ_TYPE_NCELL_2bis))
|
||||
buffer[j + 5] = 'b';
|
||||
else if ((s->freq[i+j].mask & FREQ_TYPE_NCELL_2ter))
|
||||
buffer[j + 5] = 't';
|
||||
else if ((s->freq[i+j].mask & FREQ_TYPE_REP_5))
|
||||
buffer[j + 5] = 'R';
|
||||
else if ((s->freq[i+j].mask & FREQ_TYPE_REP_5bis))
|
||||
buffer[j + 5] = 'b';
|
||||
else if ((s->freq[i+j].mask & FREQ_TYPE_REP_5ter))
|
||||
buffer[j + 5] = 't';
|
||||
else if ((s->freq[i+j].mask & FREQ_TYPE_NCELL))
|
||||
buffer[j + 5] = 'n';
|
||||
else if ((s->freq[i+j].mask & FREQ_TYPE_REP))
|
||||
buffer[j + 5] = 'r';
|
||||
else if ((s->freq[i+j].mask & FREQ_TYPE_SI_2_5))
|
||||
buffer[j + 5] = '*';
|
||||
else
|
||||
buffer[j + 5] = '.';
|
||||
}
|
||||
sprintf(buffer + 69, " %d", i + 63);
|
||||
print(priv, "%s\n", buffer);
|
||||
}
|
||||
print(priv, " S = serv. cell H = hopping seq. N,b,t = neigh. cells "
|
||||
"R,b,t = cells to rep.\n\n");
|
||||
print(priv, " S = serv. cell H = hopping seq. n = SI2 (neigh.) "
|
||||
"r = SI5 (rep.) * = SI2+SI5\n\n");
|
||||
|
||||
/* serving cell */
|
||||
print(priv, "Serving Cell:\n");
|
||||
|
|
Loading…
Reference in New Issue