pdch: Instead of passing bts, trx, ts use the pdch

All dispatching will go through the PDCH. This will clean a lot
of the look-ups inside the gprs_rlcmac_data.c and continue with
adding structure to the pcu code.
This commit is contained in:
Holger Hans Peter Freyther 2013-10-26 16:42:38 +02:00
parent b65e08a7be
commit 9ae367f639
3 changed files with 14 additions and 3 deletions

View File

@ -339,3 +339,9 @@ void gprs_rlcmac_pdch::add_paging(struct gprs_rlcmac_paging *pag)
{
llist_add(&pag->list, &paging_list);
}
int gprs_rlcmac_pdch::rcv_block(uint8_t *data, uint8_t len, uint32_t fn, int8_t rssi)
{
return gprs_rlcmac_rcv_block(trx->bts->bts_data(),
trx->trx_no, ts_no, data, len, fn, rssi);
}

View File

@ -53,6 +53,9 @@ struct gprs_rlcmac_pdch {
void enable();
void disable();
/* dispatching of messages */
int rcv_block(uint8_t *data, uint8_t len, uint32_t fn, int8_t rssi);
#endif
uint8_t m_is_enabled; /* TS is enabled */

View File

@ -180,11 +180,13 @@ void pcu_l1if_tx_pch(bitvec * block, int plen, const char *imsi)
pcu_tx_data_req(0, 0, PCU_IF_SAPI_PCH, 0, 0, 0, data, 23+3);
}
extern "C" int pcu_rx_data_ind_pdtch(uint8_t trx, uint8_t ts, uint8_t *data,
extern "C" int pcu_rx_data_ind_pdtch(uint8_t trx_no, uint8_t ts_no, uint8_t *data,
uint8_t len, uint32_t fn, int8_t rssi)
{
return gprs_rlcmac_rcv_block(bts_main_data(),
trx, ts, data, len, fn, rssi);
struct gprs_rlcmac_pdch *pdch;
pdch = &bts_main_data()->trx[trx_no].pdch[ts_no];
return pdch->rcv_block(data, len, fn, rssi);
}
static int pcu_rx_data_ind(struct gsm_pcu_if_data *data_ind)