[layer23] Paging response depends on the supported channels: SDCCH, TCH/F, and TCH/H

This commit is contained in:
Andreas.Eversberg 2010-08-11 16:11:28 +00:00
parent cb73be0d0c
commit a5b023cd98
3 changed files with 46 additions and 6 deletions

View File

@ -10,6 +10,10 @@
#define GSM_CIPHER_A5_7 6
#define GSM_CIPHER_RESERVED 7
#define GSM_CAP_SDCCH 0
#define GSM_CAP_SDCCH_TCHF 1
#define GSM_CAP_SDCCH_TCHF_TCHH 2
struct gsm_support {
struct osmocom_ms *ms;
@ -72,6 +76,7 @@ struct gsm_support {
uint8_t gps_conv;
/* radio */
uint8_t ch_cap; /* channel capability */
int8_t min_rxlev_db;
uint8_t scan_to;
uint8_t sync_to;

View File

@ -960,6 +960,7 @@ static int gsm48_rr_rx_cm_enq(struct osmocom_ms *ms, struct msgb *msg)
/* start random access */
static int gsm48_rr_chan_req(struct osmocom_ms *ms, int cause, int paging)
{
struct gsm_support *sup = &ms->support;
struct gsm48_rrlayer *rr = &ms->rrlayer;
struct gsm322_cellsel *cs = &ms->cellsel;
struct gsm48_sysinfo *s = cs->si;
@ -1063,16 +1064,38 @@ cause = RR_EST_CAUSE_LOC_UPD;
chan_req_val);
break;
case RR_EST_CAUSE_ANS_PAG_TCH_F:
/* ms supports no dual rate */
chan_req_mask = 0x1f;
chan_req_val = 0x80;
switch (sup->ch_cap) {
case GSM_CAP_SDCCH_TCHF:
chan_req_mask = 0x1f;
chan_req_val = 0x80;
break;
case GSM_CAP_SDCCH_TCHF_TCHH:
chan_req_mask = 0x0f;
chan_req_val = 0x20;
break;
case GSM_CAP_SDCCH:
chan_req_mask = 0x0f;
chan_req_val = 0x10;
break;
}
LOGP(DRR, LOGL_INFO, "CHANNEL REQUEST: %02x (PAGING TCH/F)\n",
chan_req_val);
break;
case RR_EST_CAUSE_ANS_PAG_TCH_ANY:
/* ms supports no dual rate */
chan_req_mask = 0x1f;
chan_req_val = 0x80;
switch (sup->ch_cap) {
case GSM_CAP_SDCCH_TCHF:
chan_req_mask = 0x1f;
chan_req_val = 0x80;
break;
case GSM_CAP_SDCCH_TCHF_TCHH:
chan_req_mask = 0x0f;
chan_req_val = 0x30;
break;
case GSM_CAP_SDCCH:
chan_req_mask = 0x0f;
chan_req_val = 0x10;
break;
}
LOGP(DRR, LOGL_INFO, "CHANNEL REQUEST: %02x (PAGING TCH/H or "
"TCH/F)\n", chan_req_val);
break;

View File

@ -100,6 +100,7 @@ void gsm_support_init(struct osmocom_ms *ms)
//sup->sm_val = ;
/* radio */
sup->ch_cap = GSM_CAP_SDCCH_TCHF;
sup->min_rxlev_db = -100; // TODO
sup->sync_to = 6; /* how long to wait sync (0.9 s) */
sup->scan_to = 4; /* how long to wait for all sysinfos (>=4 s) */
@ -148,6 +149,17 @@ void gsm_support_dump(struct gsm_support *sup,
print(priv, " A5/6 : %s\n", (sup->a5_6) ? "yes" : "no");
print(priv, " A5/7 : %s\n", (sup->a5_7) ? "yes" : "no");
print(priv, " A5/1 : %s\n", (sup->a5_1) ? "yes" : "no");
switch (sup->ch_cap) {
case GSM_CAP_SDCCH:
print(priv, " Channels : SDCCH only\n");
break;
case GSM_CAP_SDCCH_TCHF:
print(priv, " Channels : SDCCH + TCH/F\n");
break;
case GSM_CAP_SDCCH_TCHF_TCHH:
print(priv, " Channels : SDCCH + TCH/F + TCH/H\n");
break;
}
print(priv, " Min RXLEV: %d\n", sup->min_rxlev_db);
}