Send RR paging requests to PCU, in order to page on PACCH
This commit is contained in:
parent
1ddb183736
commit
1195148fc6
|
@ -8,6 +8,7 @@ int pcu_tx_data_ind(struct gsm_bts_trx_ts *ts, uint8_t is_ptcch, uint32_t fn,
|
|||
uint16_t arfcn, uint8_t block_nr, uint8_t *data, uint8_t len);
|
||||
int pcu_tx_rach_ind(struct gsm_bts *bts, int16_t qta, uint8_t ra, uint32_t fn);
|
||||
int pcu_tx_time_ind(uint32_t fn);
|
||||
int pcu_tx_pag_req(uint8_t *identity_lv, uint8_t chan_needed);
|
||||
|
||||
int pcu_sock_init(void);
|
||||
void pcu_sock_exit(void);
|
||||
|
|
|
@ -389,6 +389,39 @@ int pcu_tx_time_ind(uint32_t fn)
|
|||
return pcu_sock_send(&bts_gsmnet, msg);
|
||||
}
|
||||
|
||||
int pcu_tx_pag_req(uint8_t *identity_lv, uint8_t chan_needed)
|
||||
{
|
||||
struct pcu_sock_state *state = bts_gsmnet.pcu_state;
|
||||
struct msgb *msg;
|
||||
struct gsm_pcu_if *pcu_prim;
|
||||
struct gsm_pcu_if_pag_req *pag_req;
|
||||
|
||||
/* check if identity does not fit: length > sizeof(lv) - 1 */
|
||||
if (identity_lv[0] >= sizeof(pag_req->identity_lv)) {
|
||||
LOGP(DPCU, LOGL_ERROR, "Paging identity too large (%d)\n",
|
||||
identity_lv[0]);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* socket not created */
|
||||
if (!state) {
|
||||
LOGP(DPCU, LOGL_DEBUG, "PCU socket not created, ignoring "
|
||||
"paging message\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
msg = pcu_msgb_alloc(PCU_IF_MSG_PAG_REQ, 0);
|
||||
if (!msg)
|
||||
return -ENOMEM;
|
||||
pcu_prim = (struct gsm_pcu_if *) msg->data;
|
||||
pag_req = &pcu_prim->u.pag_req;
|
||||
|
||||
pag_req->chan_needed = chan_needed;
|
||||
memcpy(pag_req->identity_lv, identity_lv, identity_lv[0] + 1);
|
||||
|
||||
return pcu_sock_send(&bts_gsmnet, msg);
|
||||
}
|
||||
|
||||
static int pcu_rx_data_req(struct gsm_bts *bts, uint8_t msg_type,
|
||||
struct gsm_pcu_if_data *data_req)
|
||||
{
|
||||
|
|
|
@ -398,6 +398,8 @@ static int rsl_rx_paging_cmd(struct gsm_bts_trx *trx, struct msgb *msg)
|
|||
/* FIXME: notfiy the BSC somehow ?*/
|
||||
}
|
||||
|
||||
pcu_tx_pag_req(identity_lv, chan_needed);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
static struct gsm_bts *bts;
|
||||
static struct gsm_bts_role_bts *btsb;
|
||||
int gprs_enabled = 0;
|
||||
int pcu_direct = 0;
|
||||
|
||||
static const uint8_t static_ilv[] = {
|
||||
0x08, 0x59, 0x51, 0x30, 0x99, 0x00, 0x00, 0x00, 0x19
|
||||
|
|
Loading…
Reference in New Issue