Move paging queue specific handling to signal callback outside RSL code
The signal is already there but not being used. Let's further split generic paging code from RSL specificites. Change-Id: Iabc1c29908a5136501d6dc6e60f8777dab511b86changes/59/32159/2
parent
4de0769720
commit
d38ccedad7
|
@ -150,9 +150,6 @@ void paging_request_stop(struct bsc_msc_data **msc_p, enum bsc_paging_reason *re
|
|||
struct gsm_bts *bts, struct bsc_subscr *bsub);
|
||||
void paging_request_cancel(struct bsc_subscr *bsub, enum bsc_paging_reason reasons);
|
||||
|
||||
/* update paging load */
|
||||
void paging_update_buffer_space(struct gsm_bts *bts, uint16_t);
|
||||
|
||||
/* pending paging requests */
|
||||
unsigned int paging_pending_requests_nr(const struct gsm_bts *bts);
|
||||
|
||||
|
|
|
@ -2311,10 +2311,9 @@ static int rsl_rx_ccch_load(struct msgb *msg)
|
|||
switch (rslh->data[0]) {
|
||||
case RSL_IE_PAGING_LOAD:
|
||||
sd.pg_buf_space = rslh->data[1] << 8 | rslh->data[2];
|
||||
if (is_ipaccess_bts(sign_link->trx->bts) && sd.pg_buf_space == UINT16_MAX) {
|
||||
if (is_ipaccess_bts(sd.bts) && sd.pg_buf_space == UINT16_MAX) {
|
||||
sd.pg_buf_space = paging_estimate_available_slots(sd.bts, sd.bts->ccch_load_ind_period);
|
||||
}
|
||||
paging_update_buffer_space(sign_link->trx->bts, sd.pg_buf_space);
|
||||
osmo_signal_dispatch(SS_CCCH, S_CCCH_PAGING_LOAD, &sd);
|
||||
break;
|
||||
case RSL_IE_RACH_LOAD:
|
||||
|
|
|
@ -684,7 +684,7 @@ void paging_request_cancel(struct bsc_subscr *bsub, enum bsc_paging_reason reaso
|
|||
}
|
||||
|
||||
/*! Update the BTS paging buffer slots on given BTS */
|
||||
void paging_update_buffer_space(struct gsm_bts *bts, uint16_t free_slots)
|
||||
static void paging_update_buffer_space(struct gsm_bts *bts, uint16_t free_slots)
|
||||
{
|
||||
LOG_BTS(bts, DPAG, LOGL_DEBUG, "Rx CCCH Load Indication from BTS (available_slots %u -> %u)\n",
|
||||
bts->paging.available_slots, free_slots);
|
||||
|
@ -841,8 +841,24 @@ static int nm_sig_cb(unsigned int subsys, unsigned int signal,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Callback function to be called every time we receive a signal from CCCH */
|
||||
static int ccch_sig_cb(unsigned int subsys, unsigned int signal,
|
||||
void *handler_data, void *signal_data)
|
||||
{
|
||||
struct ccch_signal_data *sd;
|
||||
|
||||
if (signal != S_CCCH_PAGING_LOAD)
|
||||
return 0;
|
||||
|
||||
sd = signal_data;
|
||||
|
||||
paging_update_buffer_space(sd->bts, sd->pg_buf_space);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* To be called once at startup of the process: */
|
||||
void paging_global_init(void)
|
||||
{
|
||||
osmo_signal_register_handler(SS_NM, nm_sig_cb, NULL);
|
||||
osmo_signal_register_handler(SS_CCCH, ccch_sig_cb, NULL);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue