From 690a734ebf392af8a8c8f443b2099e491d5aef3e Mon Sep 17 00:00:00 2001 From: Jacob Erlbeck Date: Mon, 30 Nov 2015 18:09:17 +0100 Subject: edge: Add gprs_rlcmac_pdch::rcv_block_egprs stub This stub function gets called when an EGPRS data package arrives. Sponsored-by: On-Waves ehf --- src/bts.cpp | 28 ++++++++++++++++++++++++++++ src/bts.h | 2 ++ 2 files changed, 30 insertions(+) diff --git a/src/bts.cpp b/src/bts.cpp index 988d5f95..9f313c5c 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -1158,12 +1158,40 @@ int gprs_rlcmac_pdch::rcv_block(uint8_t *data, uint8_t len, uint32_t fn, if (cs.isGprs()) return rcv_block_gprs(data, fn, meas, cs); + if (cs.isEgprs()) + return rcv_block_egprs(data, fn, meas, cs); + bts()->decode_error(); LOGP(DRLCMACUL, LOGL_ERROR, "Unsupported coding scheme %s\n", cs.name()); return -EINVAL; } +int gprs_rlcmac_pdch::rcv_block_egprs(uint8_t *data, uint32_t fn, + struct pcu_l1_meas *meas, GprsCodingScheme cs) +{ + if (!bts()->bts_data()->egprs_enabled) { + LOGP(DRLCMACUL, LOGL_ERROR, + "Got %s RLC block but EGPRS is not enabled\n", + cs.name()); + return -EINVAL; + } + + if (!cs.isEgprsGmsk()) { + LOGP(DRLCMACUL, LOGL_ERROR, + "Got %s RLC block but EGPRS is not implemented for 8PSK yet\n", + cs.name()); + bts()->decode_error(); + return -EINVAL; + } + + LOGP(DRLCMACUL, LOGL_ERROR, + "Got %s RLC block but EGPRS decoding is not implemented yet\n", + cs.name()); + bts()->decode_error(); + return -EINVAL; +} + int gprs_rlcmac_pdch::rcv_block_gprs(uint8_t *data, uint32_t fn, struct pcu_l1_meas *meas, GprsCodingScheme cs) { diff --git a/src/bts.h b/src/bts.h index ecbc0c93..4650db1b 100644 --- a/src/bts.h +++ b/src/bts.h @@ -66,6 +66,8 @@ struct gprs_rlcmac_pdch { struct pcu_l1_meas *meas); int rcv_block_gprs(uint8_t *data, uint32_t fn, struct pcu_l1_meas *meas, GprsCodingScheme cs); + int rcv_block_egprs(uint8_t *data, uint32_t fn, + struct pcu_l1_meas *meas, GprsCodingScheme cs); gprs_rlcmac_bts *bts_data() const; BTS *bts() const; -- cgit v1.2.3