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
diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp
index 9394905..66bc84f 100644
--- a/tests/alloc/AllocTest.cpp
+++ b/tests/alloc/AllocTest.cpp
@@ -97,9 +97,8 @@
tbf->trx->trx_no) == tbf);
}
*tbf_var = tbf;
- if (!(pdch->assigned_tfi() & (1 << tbf->tfi())))
- fprintf(stderr, "ERROR: "
- "TFI not marked as used in PDCH\n");
+ OSMO_ASSERT(pdch->assigned_tfi(tbf->direction) &
+ (1 << tbf->tfi()));
}
}
}