aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcu_l1_if.cpp
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2012-08-07 16:00:56 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2012-08-07 16:00:56 +0200
commit07e97cf8a551b05d7f5f3f9583b68b2eff0f1c23 (patch)
tree2e5663d0d7d23aa4153b079894f20b94515fbd7c /src/pcu_l1_if.cpp
parentcbcd124588abf91be129aee3f37505ca60706de9 (diff)
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)
Diffstat (limited to 'src/pcu_l1_if.cpp')
-rw-r--r--src/pcu_l1_if.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index e5fbad98..2ed023a3 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -247,11 +247,12 @@ static int pcu_rx_rach_ind(struct gsm_pcu_if_rach_ind *rach_ind)
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 @@ int flush_pdch(struct gprs_rlcmac_pdch *pdch)
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 @@ bssgp_failed:
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 @@ bssgp_failed:
if (pdch->enable) {
pcu_tx_act_req(trx, ts, 0);
pdch->enable = 0;
- flush_pdch(pdch);
+ flush_pdch(pdch, trx, ts);
}
}
}