aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-11-30 18:09:17 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-12-15 15:19:42 +0100
commit690a734ebf392af8a8c8f443b2099e491d5aef3e (patch)
treefa60c12bcd0944fb076aa36632e146f8257e6973
parent9e862e1e7f94e693615a843cbbbca0f4417e277f (diff)
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
-rw-r--r--src/bts.cpp28
-rw-r--r--src/bts.h2
2 files changed, 30 insertions, 0 deletions
diff --git a/src/bts.cpp b/src/bts.cpp
index 988d5f9..9f313c5 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 ecbc0c9..4650db1 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;