aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2016-01-11 13:27:07 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2016-02-05 13:26:34 +0100
commit314ec4db40d46634e38adcbe1be93986278b605a (patch)
tree573374385c39b29e487074b2bc806b247f78cf5d
parentf0e403911d1f00d83b8080e2d70fd9fe02dd4ad1 (diff)
tbf: Remove obsolete TLLI functions
This commit removes gprs_rlcmac_tbf::extract_tlli and Decoding::tlli_from_ul_data. Sponsored-by: On-Waves ehf
-rw-r--r--src/decoding.cpp41
-rw-r--r--src/decoding.h2
-rw-r--r--src/tbf.cpp27
-rw-r--r--src/tbf.h1
4 files changed, 0 insertions, 71 deletions
diff --git a/src/decoding.cpp b/src/decoding.cpp
index 4571641..cb1b34d 100644
--- a/src/decoding.cpp
+++ b/src/decoding.cpp
@@ -281,47 +281,6 @@ int Decoding::rlc_data_from_ul_data(
return num_chunks;
}
-int Decoding::tlli_from_ul_data(const uint8_t *data, uint8_t len,
- uint32_t *tlli)
-{
- struct rlc_ul_header *rh = (struct rlc_ul_header *)data;
- struct rlc_li_field *li;
- uint8_t e;
- uint32_t _tlli;
-
- if (!rh->ti)
- return -EINVAL;
-
- data += 3;
- len -= 3;
- e = rh->e;
- /* if E is not set (LI follows) */
- while (!e) {
- if (!len) {
- LOGP(DRLCMACUL, LOGL_NOTICE, "UL DATA LI extended, "
- "but no more data\n");
- return -EINVAL;
- }
- /* get new E */
- li = (struct rlc_li_field *)data;
- if (li->e == 0) /* if LI==0, E is interpreted as '1' */
- e = 1;
- else
- e = li->e;
- data++;
- len--;
- }
- if (len < 4) {
- LOGP(DRLCMACUL, LOGL_NOTICE, "UL DATA TLLI out of frame "
- "border\n");
- return -EINVAL;
- }
- memcpy(&_tlli, data, 4);
- *tlli = ntohl(_tlli);
-
- return 0;
-}
-
uint8_t Decoding::get_ms_class_by_capability(MS_Radio_Access_capability_t *cap)
{
int i;
diff --git a/src/decoding.h b/src/decoding.h
index 9492694..c75b19a 100644
--- a/src/decoding.h
+++ b/src/decoding.h
@@ -32,8 +32,6 @@ public:
bool is_complete;
};
- static int tlli_from_ul_data(const uint8_t *data, uint8_t len,
- uint32_t *tlli);
static int rlc_data_from_ul_data(
const struct gprs_rlc_data_block_info *rdbi,
GprsCodingScheme cs, const uint8_t *data, RlcData *chunks,
diff --git a/src/tbf.cpp b/src/tbf.cpp
index 9c5502a..1f0576a 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -1060,33 +1060,6 @@ int gprs_rlcmac_tbf::set_tlli_from_ul(uint32_t new_tlli)
return 1;
}
-int gprs_rlcmac_tbf::extract_tlli(const uint8_t *data, const size_t len)
-{
- struct rlc_ul_header *rh = (struct rlc_ul_header *)data;
- uint32_t new_tlli;
- int rc;
-
- OSMO_ASSERT(direction == GPRS_RLCMAC_UL_TBF);
-
- /* no TLLI yet */
- if (!rh->ti) {
- LOGP(DRLCMACUL, LOGL_NOTICE, "UL DATA TFI=%d without "
- "TLLI, but no TLLI received yet\n", rh->tfi);
- return 0;
- }
- rc = Decoding::tlli_from_ul_data(data, len, &new_tlli);
- if (rc) {
- bts->decode_error();
- LOGP(DRLCMACUL, LOGL_NOTICE, "Failed to decode TLLI "
- "of UL DATA TFI=%d.\n", rh->tfi);
- return 0;
- }
- LOGP(DRLCMACUL, LOGL_INFO, "Decoded premier TLLI=0x%08x of "
- "UL DATA TFI=%d.\n", new_tlli, rh->tfi);
-
- return set_tlli_from_ul(new_tlli);
-}
-
const char *tbf_name(gprs_rlcmac_tbf *tbf)
{
return tbf->name();
diff --git a/src/tbf.h b/src/tbf.h
index 7c3fba8..cd98273 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -218,7 +218,6 @@ struct gprs_rlcmac_tbf {
protected:
gprs_rlcmac_bts *bts_data() const;
- int extract_tlli(const uint8_t *data, const size_t len);
int set_tlli_from_ul(uint32_t new_tlli);
void merge_and_clear_ms(GprsMs *old_ms);