Move paging generation into PDCH
Previously paging was prepared inside BTS function and than handed over to PDCH function. Move the actual preparation into PDCH to better decouple PDCH from BTS. Related: OS#1539 Change-Id: I389fb16b6e54040770c21f88edbcb8e045636928
This commit is contained in:
parent
735e435e8e
commit
4382e4e8fe
24
src/bts.cpp
24
src/bts.cpp
|
@ -303,7 +303,6 @@ int BTS::add_paging(uint8_t chan_needed, uint8_t *identity_lv)
|
||||||
uint8_t l, trx, ts, any_tbf = 0;
|
uint8_t l, trx, ts, any_tbf = 0;
|
||||||
struct gprs_rlcmac_tbf *tbf;
|
struct gprs_rlcmac_tbf *tbf;
|
||||||
LListHead<gprs_rlcmac_tbf> *pos;
|
LListHead<gprs_rlcmac_tbf> *pos;
|
||||||
struct gprs_rlcmac_paging *pag;
|
|
||||||
uint8_t slot_mask[8];
|
uint8_t slot_mask[8];
|
||||||
int8_t first_ts; /* must be signed */
|
int8_t first_ts; /* must be signed */
|
||||||
|
|
||||||
|
@ -359,16 +358,10 @@ int BTS::add_paging(uint8_t chan_needed, uint8_t *identity_lv)
|
||||||
for (ts = 0; ts < 8; ts++) {
|
for (ts = 0; ts < 8; ts++) {
|
||||||
if ((slot_mask[trx] & (1 << ts))) {
|
if ((slot_mask[trx] & (1 << ts))) {
|
||||||
/* schedule */
|
/* schedule */
|
||||||
pag = talloc_zero(tall_pcu_ctx,
|
if (!m_bts.trx[trx].pdch[ts].add_paging(chan_needed, identity_lv))
|
||||||
struct gprs_rlcmac_paging);
|
|
||||||
if (!pag)
|
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
pag->chan_needed = chan_needed;
|
|
||||||
memcpy(pag->identity_lv, identity_lv,
|
LOGP(DRLCMAC, LOGL_INFO, "Paging on PACCH of TRX=%d TS=%d\n", trx, ts);
|
||||||
identity_lv[0] + 1);
|
|
||||||
m_bts.trx[trx].pdch[ts].add_paging(pag);
|
|
||||||
LOGP(DRLCMAC, LOGL_INFO, "Paging on PACCH of "
|
|
||||||
"TRX=%d TS=%d\n", trx, ts);
|
|
||||||
any_tbf = 1;
|
any_tbf = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -955,9 +948,18 @@ continue_next:
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
void gprs_rlcmac_pdch::add_paging(struct gprs_rlcmac_paging *pag)
|
bool gprs_rlcmac_pdch::add_paging(uint8_t chan_needed, uint8_t *identity_lv)
|
||||||
{
|
{
|
||||||
|
struct gprs_rlcmac_paging *pag = talloc_zero(tall_pcu_ctx, struct gprs_rlcmac_paging);
|
||||||
|
if (!pag)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
pag->chan_needed = chan_needed;
|
||||||
|
memcpy(pag->identity_lv, identity_lv, identity_lv[0] + 1);
|
||||||
|
|
||||||
llist_add(&pag->list, &paging_list);
|
llist_add(&pag->list, &paging_list);
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void gprs_rlcmac_pdch::rcv_control_ack(Packet_Control_Acknowledgement_t *packet, uint32_t fn)
|
void gprs_rlcmac_pdch::rcv_control_ack(Packet_Control_Acknowledgement_t *packet, uint32_t fn)
|
||||||
|
|
|
@ -73,7 +73,7 @@ struct gprs_rlcmac_pdch {
|
||||||
struct gprs_rlcmac_paging *dequeue_paging();
|
struct gprs_rlcmac_paging *dequeue_paging();
|
||||||
struct msgb *packet_paging_request();
|
struct msgb *packet_paging_request();
|
||||||
|
|
||||||
void add_paging(struct gprs_rlcmac_paging *pag);
|
bool add_paging(uint8_t chan_needed, uint8_t *identity_lv);
|
||||||
|
|
||||||
void free_resources();
|
void free_resources();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue