Adding single block allocation
It is mandatory to support it because MS may request a single block.
In this case the network must assign a single block.
It is possible to force single block allocation for all uplink requests
on RACH. (VTY option)
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index e5fbad9..2ed023a 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -247,11 +247,12 @@
return rc;
}
-int flush_pdch(struct gprs_rlcmac_pdch *pdch)
+int flush_pdch(struct gprs_rlcmac_pdch *pdch, uint8_t trx, uint8_t ts)
{
uint8_t tfi;
struct gprs_rlcmac_tbf *tbf;
struct gprs_rlcmac_paging *pag;
+ struct gprs_rlcmac_sba *sba, *sba2;
/* kick all TBF on slot */
for (tfi = 0; tfi < 32; tfi++) {
@@ -266,6 +267,13 @@
while ((pag = gprs_rlcmac_dequeue_paging(pdch)))
talloc_free(pag);
+ llist_for_each_entry_safe(sba, sba2, &gprs_rlcmac_sbas, list) {
+ if (sba->trx == trx && sba->ts == ts) {
+ llist_del(&sba->list);
+ talloc_free(sba);
+ }
+ }
+
return 0;
}
@@ -294,7 +302,8 @@
bts->trx[trx].arfcn = info_ind->trx[trx].arfcn;
for (ts = 0; ts < 8; ts++) {
if (bts->trx[trx].pdch[ts].enable)
- flush_pdch(&bts->trx[trx].pdch[ts]);
+ flush_pdch(&bts->trx[trx].pdch[ts],
+ trx, ts);
}
}
gprs_bssgp_destroy();
@@ -399,7 +408,7 @@
if (pdch->enable) {
pcu_tx_act_req(trx, ts, 0);
pdch->enable = 0;
- flush_pdch(pdch);
+ flush_pdch(pdch, trx, ts);
}
}
}