aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2016-01-07 18:59:28 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2016-02-05 13:26:33 +0100
commitf2ba4cbf51ba5ec4183a9153ba2ce51df9050881 (patch)
tree1157aea2e784fccff2328e116742182c596bf64b /src
parent7e7a261de0751bf2361e86761c7eb9fa7dbcdf9a (diff)
edge: Rename gprs_rlc_ul_header_egprs and gprs_rlc_ul_data_block_info
These struct names are more specific than necessary. They are used for GPRS (uplink) already. In downlink direction, only a few fields will be added to the header struct. Add addition, gprs_rlc_ul_header_egprs does not map directly to an encoded header, like many other 'header' structs do. Change the names to fit both modes and both directions: gprs_rlc_ul_header_egprs -> gprs_rlc_data_info gprs_rlc_ul_data_block_info -> gprs_rlc_data_block_info Sponsored-by: On-Waves ehf
Diffstat (limited to 'src')
-rw-r--r--src/bts.cpp2
-rw-r--r--src/decoding.cpp10
-rw-r--r--src/decoding.h8
-rw-r--r--src/rlc.h8
-rw-r--r--src/tbf.h4
-rw-r--r--src/tbf_ul.cpp10
6 files changed, 21 insertions, 21 deletions
diff --git a/src/bts.cpp b/src/bts.cpp
index 52811c2..1ef735b 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -1156,7 +1156,7 @@ int gprs_rlcmac_pdch::rcv_data_block(uint8_t *data, uint32_t fn,
struct pcu_l1_meas *meas, GprsCodingScheme cs)
{
int rc;
- struct gprs_rlc_ul_header_egprs rlc_dec;
+ struct gprs_rlc_data_info rlc_dec;
struct gprs_rlcmac_ul_tbf *tbf;
unsigned len = cs.maxBytesUL();
diff --git a/src/decoding.cpp b/src/decoding.cpp
index abaa97f..4571641 100644
--- a/src/decoding.cpp
+++ b/src/decoding.cpp
@@ -180,7 +180,7 @@ static int parse_extensions_gprs(const uint8_t *data, unsigned int data_len,
}
int Decoding::rlc_data_from_ul_data(
- const struct gprs_rlc_ul_data_block_info *rdbi, GprsCodingScheme cs,
+ const struct gprs_rlc_data_block_info *rdbi, GprsCodingScheme cs,
const uint8_t *data, RlcData *chunks, unsigned int chunks_size,
uint32_t *tlli)
{
@@ -369,7 +369,7 @@ void Decoding::extract_rbb(const uint8_t *rbb, char *show_rbb)
show_rbb[64] = '\0';
}
-int Decoding::rlc_parse_ul_data_header(struct gprs_rlc_ul_header_egprs *rlc,
+int Decoding::rlc_parse_ul_data_header(struct gprs_rlc_data_info *rlc,
const uint8_t *data, GprsCodingScheme cs)
{
const struct gprs_rlc_ul_header_egprs_3 *egprs3;
@@ -464,7 +464,7 @@ int Decoding::rlc_parse_ul_data_header(struct gprs_rlc_ul_header_egprs *rlc,
* \returns the number of bytes copied
*/
unsigned int Decoding::rlc_copy_to_aligned_buffer(
- const struct gprs_rlc_ul_header_egprs *rlc,
+ const struct gprs_rlc_data_info *rlc,
unsigned int data_block_idx,
const uint8_t *src, uint8_t *buffer)
{
@@ -474,7 +474,7 @@ unsigned int Decoding::rlc_copy_to_aligned_buffer(
uint8_t c, last_c;
uint8_t *dst;
- const struct gprs_rlc_ul_data_block_info *rdbi;
+ const struct gprs_rlc_data_block_info *rdbi;
OSMO_ASSERT(data_block_idx < rlc->num_data_blocks);
rdbi = &rlc->block_info[data_block_idx];
@@ -514,7 +514,7 @@ unsigned int Decoding::rlc_copy_to_aligned_buffer(
* buffer otherwise.
*/
const uint8_t *Decoding::rlc_get_data_aligned(
- const struct gprs_rlc_ul_header_egprs *rlc,
+ const struct gprs_rlc_data_info *rlc,
unsigned int data_block_idx,
const uint8_t *src, uint8_t *buffer)
{
diff --git a/src/decoding.h b/src/decoding.h
index 1cda7b4..9492694 100644
--- a/src/decoding.h
+++ b/src/decoding.h
@@ -35,7 +35,7 @@ public:
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_ul_data_block_info *rdbi,
+ const struct gprs_rlc_data_block_info *rdbi,
GprsCodingScheme cs, const uint8_t *data, RlcData *chunks,
unsigned int chunks_size, uint32_t *tlli);
static uint8_t get_ms_class_by_capability(MS_Radio_Access_capability_t *cap);
@@ -43,14 +43,14 @@ public:
static void extract_rbb(const uint8_t *rbb, char *extracted_rbb);
- static int rlc_parse_ul_data_header(struct gprs_rlc_ul_header_egprs *rlc,
+ static int rlc_parse_ul_data_header(struct gprs_rlc_data_info *rlc,
const uint8_t *data, GprsCodingScheme cs);
static unsigned int rlc_copy_to_aligned_buffer(
- const struct gprs_rlc_ul_header_egprs *rlc,
+ const struct gprs_rlc_data_info *rlc,
unsigned int data_block_idx,
const uint8_t *src, uint8_t *buffer);
static const uint8_t *rlc_get_data_aligned(
- const struct gprs_rlc_ul_header_egprs *rlc,
+ const struct gprs_rlc_data_info *rlc,
unsigned int data_block_idx,
const uint8_t *src, uint8_t *buffer);
};
diff --git a/src/rlc.h b/src/rlc.h
index 46d821d..42c1307 100644
--- a/src/rlc.h
+++ b/src/rlc.h
@@ -60,7 +60,7 @@ static inline uint16_t mod_sns_half()
return (RLC_MAX_SNS / 2) - 1;
}
-struct gprs_rlc_ul_data_block_info {
+struct gprs_rlc_data_block_info {
unsigned int data_len; /* EGPRS: N2, GPRS: N2-2, N-2 */
unsigned int bsn;
unsigned int ti;
@@ -70,7 +70,7 @@ struct gprs_rlc_ul_data_block_info {
unsigned int spb;
};
-struct gprs_rlc_ul_header_egprs {
+struct gprs_rlc_data_info {
GprsCodingScheme cs;
unsigned int r;
unsigned int si;
@@ -79,7 +79,7 @@ struct gprs_rlc_ul_header_egprs {
unsigned int rsb;
unsigned int num_data_blocks;
unsigned int data_offs_bits[2];
- struct gprs_rlc_ul_data_block_info block_info[2];
+ struct gprs_rlc_data_block_info block_info[2];
};
struct gprs_rlc_data {
@@ -91,7 +91,7 @@ struct gprs_rlc_data {
/* block len of history */
uint8_t len;
- struct gprs_rlc_ul_data_block_info block_info;
+ struct gprs_rlc_data_block_info block_info;
GprsCodingScheme cs;
};
diff --git a/src/tbf.h b/src/tbf.h
index fbf7c82..c0fee0e 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -413,7 +413,7 @@ struct gprs_rlcmac_ul_tbf : public gprs_rlcmac_tbf {
/* blocks were acked */
int rcv_data_block_acknowledged(
- const struct gprs_rlc_ul_header_egprs *rlc,
+ const struct gprs_rlc_data_info *rlc,
uint8_t *data, uint8_t len, struct pcu_l1_meas *meas);
@@ -434,7 +434,7 @@ struct gprs_rlcmac_ul_tbf : public gprs_rlcmac_tbf {
uint8_t m_final_ack_sent; /* set if we sent final ack */
protected:
- void maybe_schedule_uplink_acknack(const gprs_rlc_ul_header_egprs *rlc);
+ void maybe_schedule_uplink_acknack(const gprs_rlc_data_info *rlc);
};
inline enum gprs_rlcmac_tbf_direction reverse(enum gprs_rlcmac_tbf_direction dir)
diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp
index 4abfaaa..e81cd4b 100644
--- a/src/tbf_ul.cpp
+++ b/src/tbf_ul.cpp
@@ -50,7 +50,7 @@ int gprs_rlcmac_ul_tbf::assemble_forward_llc(const gprs_rlc_data *_data)
{
const uint8_t *data = _data->block;
uint8_t len = _data->len;
- const struct gprs_rlc_ul_data_block_info *rdbi = &_data->block_info;
+ const struct gprs_rlc_data_block_info *rdbi = &_data->block_info;
GprsCodingScheme cs = _data->cs;
Decoding::RlcData frames[16], *frame;
@@ -137,7 +137,7 @@ struct msgb *gprs_rlcmac_ul_tbf::create_ul_ack(uint32_t fn)
}
int gprs_rlcmac_ul_tbf::rcv_data_block_acknowledged(
- const struct gprs_rlc_ul_header_egprs *rlc,
+ const struct gprs_rlc_data_info *rlc,
uint8_t *data, uint8_t len, struct pcu_l1_meas *meas)
{
int8_t rssi = meas->have_rssi ? meas->rssi : 0;
@@ -170,7 +170,7 @@ int gprs_rlcmac_ul_tbf::rcv_data_block_acknowledged(
for (block_idx = 0; block_idx < rlc->num_data_blocks; block_idx++) {
int num_chunks;
uint8_t *rlc_data;
- const struct gprs_rlc_ul_data_block_info *rdbi =
+ const struct gprs_rlc_data_block_info *rdbi =
&rlc->block_info[block_idx];
bool need_rlc_data = false;
struct gprs_rlc_data *block;
@@ -301,7 +301,7 @@ int gprs_rlcmac_ul_tbf::rcv_data_block_acknowledged(
&& this->m_window.v_q() == this->m_window.v_r()) { /* if complete */
struct gprs_rlc_data *block =
m_rlc.block(m_window.mod_sns(m_window.v_r() - 1));
- const struct gprs_rlc_ul_data_block_info *rdbi =
+ const struct gprs_rlc_data_block_info *rdbi =
&block->block_info;
LOGP(DRLCMACUL, LOGL_DEBUG, "- No gaps in received block, "
@@ -324,7 +324,7 @@ int gprs_rlcmac_ul_tbf::rcv_data_block_acknowledged(
}
void gprs_rlcmac_ul_tbf::maybe_schedule_uplink_acknack(
- const gprs_rlc_ul_header_egprs *rlc)
+ const gprs_rlc_data_info *rlc)
{
bool have_ti = rlc->block_info[0].ti ||
(rlc->num_data_blocks > 1 && rlc->block_info[1].ti);