diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-07-08 12:53:16 +0200 |
---|---|---|
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-07-16 10:25:14 +0200 |
commit | 47a57f6f869f19704bbb993fc157a86fd0c85e58 (patch) | |
tree | 81a749e414cea4a732e1eccd513f5548d87488bb /src/bts.cpp | |
parent | 61205a7e6539b3926c3039e8dcabda6aa9b408ef (diff) |
pdch: Manage TFIs per direction
Currently a single bit set is used to maintain a set of used TFI
without distinguishing between uplink and downlink. Since the
namespaces of UL and DL TFI are separate, this implementation is
not correct.
This commit changes gprs_rlcmac_pdch to use a separate bit set for
each direction. It also replace the corresponding conditional fprintf
statement in check_tfi_usage (AllocTest.cpp) by an equivalent
OSMO_ASSERT.
Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/bts.cpp')
-rw-r--r-- | src/bts.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bts.cpp b/src/bts.cpp index b96971db..bd1e025e 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -1144,12 +1144,12 @@ void gprs_rlcmac_pdch::attach_tbf(gprs_rlcmac_tbf *tbf) ul_tbf = static_cast<gprs_rlcmac_ul_tbf *>(tbf); m_assigned_usf |= 1 << ul_tbf->m_usf[ts_no]; } - m_assigned_tfi |= 1UL << tbf->tfi(); + m_assigned_tfi[tbf->direction] |= 1UL << tbf->tfi(); LOGP(DRLCMAC, LOGL_INFO, "PDCH(TS %d, TRX %d): Attaching %s, %d TBFs, " "USFs = %02x, TFIs = %08x.\n", ts_no, trx_no(), tbf->name(), m_num_tbfs[tbf->direction], - m_assigned_usf, m_assigned_tfi); + m_assigned_usf, m_assigned_tfi[tbf->direction]); } void gprs_rlcmac_pdch::detach_tbf(gprs_rlcmac_tbf *tbf) @@ -1163,12 +1163,12 @@ void gprs_rlcmac_pdch::detach_tbf(gprs_rlcmac_tbf *tbf) ul_tbf = static_cast<gprs_rlcmac_ul_tbf *>(tbf); m_assigned_usf &= ~(1 << ul_tbf->m_usf[ts_no]); } - m_assigned_tfi &= ~(1UL << tbf->tfi()); + m_assigned_tfi[tbf->direction] &= ~(1UL << tbf->tfi()); LOGP(DRLCMAC, LOGL_INFO, "PDCH(TS %d, TRX %d): Detaching %s, %d TBFs, " "USFs = %02x, TFIs = %08x.\n", ts_no, trx_no(), tbf->name(), m_num_tbfs[tbf->direction], - m_assigned_usf, m_assigned_tfi); + m_assigned_usf, m_assigned_tfi[tbf->direction]); } void gprs_rlcmac_pdch::reserve(enum gprs_rlcmac_tbf_direction dir) |