aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcu_l1_if.cpp
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2012-09-27 09:23:24 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2012-09-27 09:23:24 +0200
commita9be1547b1b4459d64d92207da2a29e41fcb3ba2 (patch)
treeb05502667c99050b587eab0691b2b54b221aa769 /src/pcu_l1_if.cpp
parent99a107dbeef03b2e80aff82023cdfc5c10109b5b (diff)
Use PCH confirm from BTS to start downlink packet flow
Since we don't know when the IMM.ASS message is sent on it's paging group on PCH, we will wait for confirm from BTS and start packet flow then.
Diffstat (limited to 'src/pcu_l1_if.cpp')
-rw-r--r--src/pcu_l1_if.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index 1eeacfaf..9e5e2f20 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -194,6 +194,26 @@ static int pcu_rx_data_ind(struct gsm_pcu_if_data *data_ind)
return rc;
}
+static int pcu_rx_data_cnf(struct gsm_pcu_if_data *data_cnf)
+{
+ int rc = 0;
+
+ LOGP(DL1IF, LOGL_DEBUG, "Data confirm received: sapi=%d fn=%d\n",
+ data_cnf->sapi, data_cnf->fn);
+
+ switch (data_cnf->sapi) {
+ case PCU_IF_SAPI_PCH:
+ rc = gprs_rlcmac_imm_ass_cnf(data_cnf->data, data_cnf->fn);
+ break;
+ default:
+ LOGP(DL1IF, LOGL_ERROR, "Received PCU data confirm with "
+ "unsupported sapi %d\n", data_cnf->sapi);
+ rc = -EINVAL;
+ }
+
+ return rc;
+}
+
static int pcu_rx_rts_req(struct gsm_pcu_if_rts_req *rts_req)
{
int rc = 0;
@@ -468,6 +488,9 @@ int pcu_rx(uint8_t msg_type, struct gsm_pcu_if *pcu_prim)
case PCU_IF_MSG_DATA_IND:
rc = pcu_rx_data_ind(&pcu_prim->u.data_ind);
break;
+ case PCU_IF_MSG_DATA_CNF:
+ rc = pcu_rx_data_cnf(&pcu_prim->u.data_cnf);
+ break;
case PCU_IF_MSG_RTS_REQ:
rc = pcu_rx_rts_req(&pcu_prim->u.rts_req);
break;