aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-10-27 13:38:54 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-10-30 21:24:13 +0100
commitfc498c9e7bb572ac1255f80fc2ab1794b9bc39ce (patch)
tree93b2d5a5b83b1c206a15fdb9acc76c26332f2e01 /src
parent875fc895a80f485729a4be075c8b620b3cd52d47 (diff)
tbf: Go through the trx to get the ARFCN
Diffstat (limited to 'src')
-rw-r--r--src/bts.cpp4
-rw-r--r--src/encoding.cpp4
-rw-r--r--src/tbf.cpp1
-rw-r--r--src/tbf.h1
4 files changed, 4 insertions, 6 deletions
diff --git a/src/bts.cpp b/src/bts.cpp
index d8cfeca..c4d565f 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -444,7 +444,7 @@ int BTS::rcv_rach(uint8_t ra, uint32_t Fn, int16_t qta)
m_bts.alpha, m_bts.gamma, -1);
else
plen = Encoding::write_immediate_assignment(&m_bts, immediate_assignment, 0, ra,
- Fn, tbf->ta, tbf->arfcn, tbf->first_ts, tbf->tsc,
+ Fn, tbf->ta, tbf->trx->arfcn, tbf->first_ts, tbf->tsc,
tbf->tfi, tbf->dir.ul.usf[tbf->first_ts], 0, 0, 0, 0,
m_bts.alpha, m_bts.gamma, -1);
pcu_l1if_tx_agch(immediate_assignment, plen);
@@ -503,7 +503,7 @@ void BTS::snd_dl_ass(gprs_rlcmac_tbf *tbf, uint8_t poll, const char *imsi)
* so the assignment will not conflict with possible RACH requests. */
plen = Encoding::write_immediate_assignment(&m_bts, immediate_assignment, 1, 125,
(tbf->pdch[tbf->first_ts]->last_rts_fn + 21216) % 2715648, tbf->ta,
- tbf->arfcn, tbf->first_ts, tbf->tsc, tbf->tfi, 0, tbf->tlli, poll,
+ tbf->trx->arfcn, tbf->first_ts, tbf->tsc, tbf->tfi, 0, tbf->tlli, poll,
tbf->poll_fn, 0, m_bts.alpha, m_bts.gamma, -1);
pcu_l1if_tx_pch(immediate_assignment, plen, imsi);
bitvec_free(immediate_assignment);
diff --git a/src/encoding.cpp b/src/encoding.cpp
index 2b15a27..20c995e 100644
--- a/src/encoding.cpp
+++ b/src/encoding.cpp
@@ -207,7 +207,7 @@ void Encoding::write_packet_uplink_assignment(
bitvec_write_field(dest, wp,0x1,1); // Frequency Parameters information elements = present
bitvec_write_field(dest, wp,tbf->tsc,3); // Training Sequence Code (TSC)
bitvec_write_field(dest, wp,0x0,2); // ARFCN = present
- bitvec_write_field(dest, wp,tbf->arfcn,10); // ARFCN
+ bitvec_write_field(dest, wp,tbf->trx->arfcn,10); // ARFCN
#else
bitvec_write_field(dest, wp,0x0,1); // Frequency Parameters = off
#endif
@@ -289,7 +289,7 @@ void Encoding::write_packet_downlink_assignment(RlcMacDownlink_t * block, uint8_
block->u.Packet_Downlink_Assignment.Exist_Frequency_Parameters = 0x1; // Frequency Parameters = on
block->u.Packet_Downlink_Assignment.Frequency_Parameters.TSC = tbf->tsc; // Training Sequence Code (TSC)
block->u.Packet_Downlink_Assignment.Frequency_Parameters.UnionType = 0x0; // ARFCN = on
- block->u.Packet_Downlink_Assignment.Frequency_Parameters.u.ARFCN = tbf->arfcn; // ARFCN
+ block->u.Packet_Downlink_Assignment.Frequency_Parameters.u.ARFCN = tbf->trx->arfcn; // ARFCN
block->u.Packet_Downlink_Assignment.Exist_DOWNLINK_TFI_ASSIGNMENT = 0x1; // DOWNLINK TFI ASSIGNMENT = on
block->u.Packet_Downlink_Assignment.DOWNLINK_TFI_ASSIGNMENT = tbf->tfi; // TFI
diff --git a/src/tbf.cpp b/src/tbf.cpp
index a434c8f..7b6bbfb 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -583,7 +583,6 @@ next_diagram:
tbf->tfi = tfi;
tbf->trx_no = trx;
tbf->trx = &bts->trx[trx];
- tbf->arfcn = bts->trx[trx].arfcn;
tbf->ms_class = ms_class;
tbf->ws = 64;
tbf->sns = 128;
diff --git a/src/tbf.h b/src/tbf.h
index ea18444..196454a 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -122,7 +122,6 @@ struct gprs_rlcmac_tbf {
uint8_t tlli_valid;
struct gprs_rlcmac_trx *trx;
uint8_t trx_no;
- uint16_t arfcn;
uint8_t tsc;
uint8_t first_ts; /* first TS used by TBF */
uint8_t first_common_ts; /* first TS that the phone can send and