diff options
author | Max <msuraev@sysmocom.de> | 2016-02-11 16:55:45 +0100 |
---|---|---|
committer | Max <msuraev@sysmocom.de> | 2016-02-11 16:55:45 +0100 |
commit | a5ae651ee47f56301eaf1b344d9c1da13e3bd643 (patch) | |
tree | b9e7b616c56d0f394985f2f1f0411ade1239812e /src | |
parent | d28403cfebee4196b6f757846acd6a656b68cdc6 (diff) |
wip
Signed-off-by: Max <msuraev@sysmocom.de>
Diffstat (limited to 'src')
-rw-r--r-- | src/bts.cpp | 11 | ||||
-rw-r--r-- | src/tbf.cpp | 16 | ||||
-rw-r--r-- | src/tbf.h | 2 |
3 files changed, 17 insertions, 12 deletions
diff --git a/src/bts.cpp b/src/bts.cpp index 4f4a0862..ca9776c2 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -560,13 +560,18 @@ void BTS::trigger_dl_ts_recon(gprs_rlcmac_dl_tbf *dl_tbf)//FIXME: no actual send /* stop pending timer */ dl_tbf->stop_timer(); - LOGP(DRLCMAC, LOGL_DEBUG, "Send TS RECONFIGURE for %s on PCH (IMSI=%s)\n", tbf_name(dl_tbf), dl_tbf->imsi()); + LOGP(DRLCMAC, LOGL_DEBUG, "PTSR: Send TS RECONFIGURE for %s on PCH (IMSI=%s)\n", tbf_name(dl_tbf), dl_tbf->imsi()); - /* change state */ + // FIXME: change state - dl_ass_state vs tbf->state vs state_flags dl_tbf->set_state(GPRS_RLCMAC_RECONFIGURING); // FIXME - more flags? + if (!(dl_tbf->state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH))) // FIXME: are we doing it right here? + dl_tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); + dl_tbf->dl_ass_state = GPRS_RLCMAC_DL_ASS_SEND_ASS; + //tbf->was_releasing = tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE); // what's was_releasing for? + /* "send" PACKET TS RECON. */ - dl_tbf->m_wait_confirm = 1; // FIXME - do we have to wait for ACK from phone? + tbf_timer_start(dl_tbf, 0, Tassign_pacch); // FIXME - do we have to wait for ACK from phone? } /* depending on the current TBF, we assign on PACCH or AGCH */ diff --git a/src/tbf.cpp b/src/tbf.cpp index 8e14d3d0..6c0a0bb7 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -864,7 +864,7 @@ void gprs_rlcmac_tbf::handle_timeout() // dl_tbf->bts->trigger_dl_ass(dl_tbf, dl_tbf); // FIXME: use write_packet_ts_reconfigure() // [state/flags change] -> //LOGP(DRLCMAC, LOGL_NOTICE, "DL. ASS. for multislot\n"); - LOGP(DRLCMAC, LOGL_NOTICE, "P. TS. R. for multislot\n"); + LOGP(DRLCMAC, LOGL_NOTICE, "PTSR: trigger for multislot\n"); dl_tbf->bts->trigger_dl_ts_recon(dl_tbf); // abort(); // CRASH! } else @@ -917,38 +917,38 @@ struct msgb *gprs_rlcmac_tbf::create_dl_ts_recon(uint32_t fn, uint8_t ts) // LOGP(DRLCMAC, LOGL_NOTICE, "TS. R. -- ignoring due to incompatible state\n"); return NULL; } - LOGP(DRLCMAC, LOGL_NOTICE, "TS. R. -- GPRS_RLCMAC_RECONFIGURING: preparing msg\n"); + LOGP(DRLCMAC, LOGL_NOTICE, "PTSR: GPRS_RLCMAC_RECONFIGURING: preparing msg\n"); unsigned int rrbp = 0; uint32_t new_poll_fn = 0; struct msgb *msg; int rc = this->check_polling(fn, ts, &new_poll_fn, &rrbp); if (rc < 0) { - LOGP(DRLCMAC, LOGL_ERROR, "check polling failed!\n"); + LOGP(DRLCMAC, LOGL_ERROR, "PTSR: check polling failed!\n"); return NULL; } msg = msgb_alloc(23, "rlcmac_pack_ts_recon"); if (!msg) { - LOGP(DRLCMAC, LOGL_NOTICE, "TS. R. -- msg alloc failed\n"); + LOGP(DRLCMAC, LOGL_NOTICE, "PTSR: msg alloc failed\n"); return NULL; } bitvec *recon_vec = bitvec_alloc(123); if (!recon_vec) { msgb_free(msg); - LOGP(DRLCMAC, LOGL_NOTICE, "TS. R. -- bitvec alloc failed\n"); + LOGP(DRLCMAC, LOGL_NOTICE, "PTSR: bitvec alloc failed\n"); return NULL; } bitvec_unhex(recon_vec, "2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b"); - LOGP(DRLCMAC, LOGL_INFO, "%s start Packet TS Reconfigure (PACCH)\n", tbf_name(this)); + LOGP(DRLCMAC, LOGL_INFO, "PTSR: %s start Packet TS Reconfigure (PACCH)\n", tbf_name(this)); RlcMacDownlink_t * mac_control_block = (RlcMacDownlink_t *)talloc_zero(tall_pcu_ctx, RlcMacDownlink_t); Encoding::write_packet_ts_reconfigure(mac_control_block, this, new_poll_fn, rrbp, bts_data()->alpha, bts_data()->gamma, this->is_egprs_enabled()); - LOGP(DRLCMAC, LOGL_DEBUG, "+++++++++++++++++++++++++ TX : Packet TS Reconfigure +++++++++++++++++++++++++\n"); + LOGP(DRLCMAC, LOGL_DEBUG, "PTSR: +++++++++++++++++++++++++ TX : Packet TS Reconfigure +++++++++++++++++++++++++\n"); encode_gsm_rlcmac_downlink(recon_vec, mac_control_block); LOGPC(DCSN1, LOGL_NOTICE, "\n"); - LOGP(DRLCMAC, LOGL_DEBUG, "_________________________ TX : Packet TS Reconfigure _________________________\n"); + LOGP(DRLCMAC, LOGL_DEBUG, "PTSR: _________________________ TX : Packet TS Reconfigure _________________________\n"); bitvec_pack(recon_vec, msgb_put(msg, 23)); // FIXME - size? bitvec_free(recon_vec); talloc_free(mac_control_block); @@ -59,7 +59,7 @@ enum gprs_rlcmac_tbf_poll_state { enum gprs_rlcmac_tbf_dl_ass_state { GPRS_RLCMAC_DL_ASS_NONE = 0, - GPRS_RLCMAC_DL_ASS_SEND_ASS, /* send downlink assignment on next RTS */ + GPRS_RLCMAC_DL_ASS_SEND_ASS, /* send downlink assignment on next RTS */ GPRS_RLCMAC_DL_ASS_WAIT_ACK, /* wait for PACKET CONTROL ACK */ }; |