pdch: rcv pkt meas rep: Allocate MS object early in path and use it
Let's create the MS object early if doesn't exist and fill in the information, so that we can operate on it in an early way (for instance, logging macros), this way it's easier to trace the lifecycle of subscribers. Change-Id: I3ec7eb970310698dd228ae6ad65ec5ca833bab3fchanges/07/19707/2
parent
59fc0bda6e
commit
b69928cfaf
|
@ -75,7 +75,7 @@ int gprs_rlcmac_received_lost(struct gprs_rlcmac_dl_tbf *tbf, uint16_t received,
|
|||
|
||||
int gprs_rlcmac_lost_rep(struct gprs_rlcmac_dl_tbf *tbf);
|
||||
|
||||
int gprs_rlcmac_meas_rep(Packet_Measurement_Report_t *pmr);
|
||||
int gprs_rlcmac_meas_rep(GprsMs *ms, Packet_Measurement_Report_t *pmr);
|
||||
|
||||
int gprs_rlcmac_rssi(struct gprs_rlcmac_tbf *tbf, int8_t rssi);
|
||||
|
||||
|
|
|
@ -37,14 +37,13 @@ extern "C" {
|
|||
/* TODO: trigger the measurement report from the pollcontroller and use it for flow control */
|
||||
|
||||
/* received Measurement Report */
|
||||
int gprs_rlcmac_meas_rep(Packet_Measurement_Report_t *pmr)
|
||||
int gprs_rlcmac_meas_rep(GprsMs *ms, Packet_Measurement_Report_t *pmr)
|
||||
{
|
||||
NC_Measurement_Report_t *ncr;
|
||||
NC_Measurements_t *nc;
|
||||
int i;
|
||||
|
||||
LOGP(DRLCMACMEAS, LOGL_INFO, "Measurement Report of TLLI=0x%08x:",
|
||||
pmr->TLLI);
|
||||
LOGPMS(ms, DRLCMACMEAS, LOGL_INFO, "Rx Measurement Report:");
|
||||
|
||||
switch (pmr->UnionType) {
|
||||
case 0:
|
||||
|
|
21
src/pdch.cpp
21
src/pdch.cpp
|
@ -663,18 +663,21 @@ void gprs_rlcmac_pdch::rcv_resource_request(Packet_Resource_Request_t *request,
|
|||
|
||||
void gprs_rlcmac_pdch::rcv_measurement_report(Packet_Measurement_Report_t *report, uint32_t fn)
|
||||
{
|
||||
struct gprs_rlcmac_sba *sba = bts()->sba()->find(this, fn);
|
||||
if (sba) {
|
||||
GprsMs *ms = bts()->ms_store().get_ms(report->TLLI);
|
||||
if (!ms)
|
||||
LOGP(DRLCMAC, LOGL_NOTICE, "MS send measurement "
|
||||
"but TLLI 0x%08x is unknown\n", report->TLLI);
|
||||
else
|
||||
ms->set_ta(sba->ta);
|
||||
struct gprs_rlcmac_sba *sba;
|
||||
GprsMs *ms;
|
||||
|
||||
ms = bts()->ms_by_tlli(report->TLLI);
|
||||
if (!ms) {
|
||||
LOGP(DRLCMAC, LOGL_NOTICE, "MS send measurement "
|
||||
"but TLLI 0x%08x is unknown\n", report->TLLI);
|
||||
ms = bts()->ms_alloc(0, 0);
|
||||
ms->set_tlli(report->TLLI);
|
||||
}
|
||||
if ((sba = bts()->sba()->find(this, fn))) {
|
||||
ms->set_ta(sba->ta);
|
||||
bts()->sba()->free_sba(sba);
|
||||
}
|
||||
gprs_rlcmac_meas_rep(report);
|
||||
gprs_rlcmac_meas_rep(ms, report);
|
||||
}
|
||||
|
||||
/* Received Uplink RLC control block. */
|
||||
|
|
Loading…
Reference in New Issue