2023-01-26 14:21:13 +00:00
|
|
|
/* GPRS RLC/MAC Entity (one per MS) */
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <osmocom/gprs/rlcmac/rlcmac.h>
|
|
|
|
#include <osmocom/gprs/rlcmac/llc_queue.h>
|
2023-03-08 17:14:43 +00:00
|
|
|
#include <osmocom/gprs/rlcmac/tbf_dl_ass_fsm.h>
|
2023-01-26 14:21:13 +00:00
|
|
|
|
2023-02-09 15:43:07 +00:00
|
|
|
struct gprs_rlcmac_dl_tbf;
|
2023-01-26 14:21:13 +00:00
|
|
|
struct gprs_rlcmac_ul_tbf;
|
|
|
|
|
|
|
|
struct gprs_rlcmac_entity {
|
|
|
|
struct llist_head entry; /* item in (struct gprs_rlcmac_ctx)->gre_list */
|
|
|
|
uint32_t tlli;
|
|
|
|
|
2023-05-24 16:30:57 +00:00
|
|
|
/* Used to match paging requests coming from CS domain: */
|
|
|
|
uint32_t ptmsi;
|
|
|
|
char imsi[OSMO_IMSI_BUF_SIZE];
|
|
|
|
|
2023-01-26 14:21:13 +00:00
|
|
|
struct gprs_rlcmac_llc_queue *llc_queue;
|
|
|
|
|
2023-03-08 17:14:43 +00:00
|
|
|
/* Manage TBF Starting Time delay during TBF assignment: */
|
|
|
|
struct gprs_rlcmac_tbf_dl_ass_fsm_ctx dl_tbf_dl_ass_fsm;
|
|
|
|
|
2023-02-09 15:43:07 +00:00
|
|
|
struct gprs_rlcmac_dl_tbf *dl_tbf;
|
2023-01-26 14:21:13 +00:00
|
|
|
struct gprs_rlcmac_ul_tbf *ul_tbf;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct gprs_rlcmac_entity *gprs_rlcmac_entity_alloc(uint32_t tlli);
|
|
|
|
void gprs_rlcmac_entity_free(struct gprs_rlcmac_entity *gre);
|
|
|
|
|
2023-02-27 16:16:16 +00:00
|
|
|
bool gprs_rlcmac_entity_in_packet_idle_mode(const struct gprs_rlcmac_entity *gre);
|
|
|
|
bool gprs_rlcmac_entity_in_packet_transfer_mode(const struct gprs_rlcmac_entity *gre);
|
|
|
|
bool gprs_rlcmac_entity_have_tx_data_queued(const struct gprs_rlcmac_entity *gre);
|
|
|
|
|
2023-01-26 14:21:13 +00:00
|
|
|
int gprs_rlcmac_entity_llc_enqueue(struct gprs_rlcmac_entity *gre, uint8_t *ll_pdu, unsigned int ll_pdu_len,
|
|
|
|
enum osmo_gprs_rlcmac_llc_sapi sapi, uint8_t radio_prio);
|
|
|
|
|
2023-03-29 12:27:35 +00:00
|
|
|
struct msgb *gprs_rlcmac_gre_create_pkt_ctrl_ack(const struct gprs_rlcmac_entity *gre);
|
|
|
|
|
2023-01-26 14:21:13 +00:00
|
|
|
#define LOGGRE(gre, level, fmt, args...) \
|
|
|
|
LOGRLCMAC(level, "GRE(%08x) " fmt, (gre)->tlli, ## args)
|