ms: clarify delayed MS release process related code and logging
Change-Id: Ieaea6ab07b4b2822bcf394f2d0e9298b9f3c5854
This commit is contained in:
parent
423bf8c408
commit
4fe090146f
|
@ -79,11 +79,10 @@ static struct gpr_ms_callback gprs_default_cb = {
|
|||
.ms_active = gprs_default_cb_ms_active,
|
||||
};
|
||||
|
||||
void ms_timeout(void *data)
|
||||
static void ms_release_timer_cb(void *data)
|
||||
{
|
||||
struct GprsMs *ms = (struct GprsMs *) data;
|
||||
LOGP(DRLCMAC, LOGL_INFO, "Timeout for MS object, TLLI = 0x%08x\n",
|
||||
ms_tlli(ms));
|
||||
LOGPMS(ms, DRLCMAC, LOGL_INFO, "Release timer expired\n");
|
||||
|
||||
if (ms->timer.data) {
|
||||
ms->timer.data = NULL;
|
||||
|
@ -116,7 +115,7 @@ struct GprsMs *ms_alloc(struct gprs_rlcmac_bts *bts, uint32_t tlli)
|
|||
|
||||
ms->imsi[0] = '\0';
|
||||
memset(&ms->timer, 0, sizeof(ms->timer));
|
||||
ms->timer.cb = ms_timeout;
|
||||
ms->timer.cb = ms_release_timer_cb;
|
||||
llc_queue_init(&ms->llc_queue);
|
||||
|
||||
ms_set_mode(ms, GPRS);
|
||||
|
@ -218,22 +217,26 @@ void ms_unref(struct GprsMs *ms)
|
|||
ms_update_status(ms);
|
||||
}
|
||||
|
||||
void ms_start_timer(struct GprsMs *ms)
|
||||
static void ms_release_timer_start(struct GprsMs *ms)
|
||||
{
|
||||
if (ms->delay == 0)
|
||||
return;
|
||||
|
||||
LOGPMS(ms, DRLCMAC, LOGL_DEBUG, "Schedule MS release in %u secs\n", ms->delay);
|
||||
|
||||
if (!ms->timer.data)
|
||||
ms->timer.data = ms_ref(ms);
|
||||
|
||||
osmo_timer_schedule(&ms->timer, ms->delay, 0);
|
||||
}
|
||||
|
||||
void ms_stop_timer(struct GprsMs *ms)
|
||||
static void ms_release_timer_stop(struct GprsMs *ms)
|
||||
{
|
||||
if (!ms->timer.data)
|
||||
return;
|
||||
|
||||
LOGPMS(ms, DRLCMAC, LOGL_DEBUG, "Cancel scheduled MS release\n");
|
||||
|
||||
osmo_timer_del(&ms->timer);
|
||||
ms->timer.data = NULL;
|
||||
ms_unref(ms);
|
||||
|
@ -306,7 +309,7 @@ static void ms_attach_ul_tbf(struct GprsMs *ms, struct gprs_rlcmac_ul_tbf *tbf)
|
|||
ms->ul_tbf = tbf;
|
||||
|
||||
if (tbf)
|
||||
ms_stop_timer(ms);
|
||||
ms_release_timer_stop(ms);
|
||||
|
||||
ms_unref(ms);
|
||||
}
|
||||
|
@ -327,7 +330,7 @@ static void ms_attach_dl_tbf(struct GprsMs *ms, struct gprs_rlcmac_dl_tbf *tbf)
|
|||
ms->dl_tbf = tbf;
|
||||
|
||||
if (tbf)
|
||||
ms_stop_timer(ms);
|
||||
ms_release_timer_stop(ms);
|
||||
|
||||
ms_unref(ms);
|
||||
}
|
||||
|
@ -374,7 +377,7 @@ void ms_detach_tbf(struct GprsMs *ms, struct gprs_rlcmac_tbf *tbf)
|
|||
ms_set_reserved_slots(ms, NULL, 0, 0);
|
||||
|
||||
if (ms_tlli(ms) != 0)
|
||||
ms_start_timer(ms);
|
||||
ms_release_timer_start(ms);
|
||||
}
|
||||
|
||||
ms_update_status(ms);
|
||||
|
@ -386,7 +389,7 @@ void ms_reset(struct GprsMs *ms)
|
|||
"Clearing MS object, TLLI: 0x%08x, IMSI: '%s'\n",
|
||||
ms_tlli(ms), ms_imsi(ms));
|
||||
|
||||
ms_stop_timer(ms);
|
||||
ms_release_timer_stop(ms);
|
||||
|
||||
ms->tlli = GSM_RESERVED_TMSI;
|
||||
ms->new_dl_tlli = ms->tlli;
|
||||
|
|
|
@ -52,7 +52,7 @@ Attaching TBF to MS object, TLLI = 0xffeeddbb, TBF = TBF(TFI=0 TLLI=0xffeeddbb D
|
|||
Attaching TBF to MS object, TLLI = 0xffeeddbb, TBF = TBF(TFI=0 TLLI=0xffeeddbb DIR=DL STATE=NULL)
|
||||
Detaching TBF from MS object, TLLI = 0xffeeddbb, TBF = TBF(TFI=0 TLLI=0xffeeddbb DIR=UL STATE=NULL)
|
||||
Detaching TBF from MS object, TLLI = 0xffeeddbb, TBF = TBF(TFI=0 TLLI=0xffeeddbb DIR=DL STATE=NULL)
|
||||
Timeout for MS object, TLLI = 0xffeeddbb
|
||||
MS(TLLI=0xffeeddbb, IMSI=, TA=220, 0/0,) Release timer expired
|
||||
Destroying MS object, TLLI = 0xffeeddbb
|
||||
Creating MS object, TLLI = 0xffeeddbb
|
||||
Attaching TBF to MS object, TLLI = 0xffeeddbb, TBF = TBF(TFI=0 TLLI=0xffeeddbb DIR=DL STATE=NULL)
|
||||
|
|
|
@ -1382,6 +1382,7 @@ TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=RELEASING) unset ass. type CCCH [prev CCC
|
|||
TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=RELEASING) free
|
||||
PDCH(bts=0,trx=0,ts=4) Detaching TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=RELEASING), 0 TBFs, USFs = 00, TFIs = 00000000.
|
||||
Detaching TBF from MS object, TLLI = 0xc0123456, TBF = TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=RELEASING)
|
||||
MS(TLLI=0xc0123456, IMSI=001001000123456, TA=0, 45/0,) Schedule MS release in 10 secs
|
||||
********** DL-TBF ends here **********
|
||||
MS(TLLI=0xc0123456, IMSI=001001000123456, TA=0, 45/0,) ********** DL-TBF starts here **********
|
||||
MS(TLLI=0xc0123456, IMSI=001001000123456, TA=0, 45/0,) Allocating DL TBF
|
||||
|
@ -1398,6 +1399,7 @@ PDCH(bts=0,trx=0,ts=4) Attaching TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=NULL), 1
|
|||
TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=NULL) Setting Control TS 4
|
||||
TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=NULL) Allocated: trx = 0, ul_slots = 10, dl_slots = 10
|
||||
Attaching TBF to MS object, TLLI = 0xc0123456, TBF = TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=NULL)
|
||||
MS(TLLI=0xc0123456, IMSI=001001000123456, TA=0, 45/0, DL) Cancel scheduled MS release
|
||||
TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=NULL) [DOWNLINK] START
|
||||
TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=NULL) Send dowlink assignment on PCH, no TBF exist (IMSI=001001000123456)
|
||||
TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=NULL) changes state from NULL to ASSIGN
|
||||
|
|
Loading…
Reference in New Issue