aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2019-06-16 15:25:30 +0200
committerlaforge <laforge@gnumonks.org>2019-06-24 13:48:43 +0000
commit3a499f3cb25035c263a6e630ff7b27a659b6bdea (patch)
tree45910ec1ea6fd3884c7c90ba1ed66878999ac8b1
parent0d482c5c97b7eeef8f69135c6288e283cbf61601 (diff)
Encoding: drop struct gprs_rlcmac_bts* from all functions
The bts is not used at all. Change-Id: Ia07755e825913a16352ab13f6cf55f2918de8681
-rw-r--r--src/encoding.cpp20
-rw-r--r--src/encoding.h5
-rw-r--r--src/tbf.cpp2
-rw-r--r--src/tbf_ul.cpp2
4 files changed, 12 insertions, 17 deletions
diff --git a/src/encoding.cpp b/src/encoding.cpp
index 530cba7..a290c65 100644
--- a/src/encoding.cpp
+++ b/src/encoding.cpp
@@ -543,7 +543,6 @@ int Encoding::write_immediate_assignment(
/* generate uplink assignment */
void Encoding::write_packet_uplink_assignment(
- struct gprs_rlcmac_bts *bts,
bitvec * dest, uint8_t old_tfi,
uint8_t old_downlink, uint32_t tlli, uint8_t use_tlli,
struct gprs_rlcmac_ul_tbf *tbf, uint8_t poll, uint8_t rrbp, uint8_t alpha,
@@ -787,7 +786,7 @@ void Encoding::encode_rbb(const char *show_rbb, uint8_t *rbb)
}
static void write_packet_ack_nack_desc_gprs(
- struct gprs_rlcmac_bts *bts, bitvec * dest, unsigned& wp,
+ bitvec * dest, unsigned& wp,
gprs_rlc_ul_window *window, bool is_final)
{
char rbb[65];
@@ -809,12 +808,12 @@ static void write_packet_ack_nack_desc_gprs(
}
static void write_packet_uplink_ack_gprs(
- struct gprs_rlcmac_bts *bts, bitvec * dest, unsigned& wp,
+ bitvec * dest, unsigned& wp,
struct gprs_rlcmac_ul_tbf *tbf, bool is_final)
{
bitvec_write_field(dest, &wp, mcs_chan_code(tbf->current_cs()), 2); // CHANNEL_CODING_COMMAND
- write_packet_ack_nack_desc_gprs(bts, dest, wp, tbf->window(), is_final);
+ write_packet_ack_nack_desc_gprs(dest, wp, tbf->window(), is_final);
bitvec_write_field(dest, &wp, 1, 1); // 1: have CONTENTION_RESOLUTION_TLLI
bitvec_write_field(dest, &wp, tbf->tlli(), 32); // CONTENTION_RESOLUTION_TLLI
@@ -830,7 +829,7 @@ static void write_packet_uplink_ack_gprs(
};
static void write_packet_ack_nack_desc_egprs(
- struct gprs_rlcmac_bts *bts, bitvec * dest, unsigned& wp,
+ bitvec * dest, unsigned& wp,
gprs_rlc_ul_window *window, bool is_final, unsigned& rest_bits)
{
unsigned int urbb_len = 0;
@@ -988,7 +987,7 @@ static void write_packet_ack_nack_desc_egprs(
}
static void write_packet_uplink_ack_egprs(
- struct gprs_rlcmac_bts *bts, bitvec * dest, unsigned& wp,
+ bitvec * dest, unsigned& wp,
struct gprs_rlcmac_ul_tbf *tbf, bool is_final)
{
bitvec_write_field(dest, &wp, 0, 2); // fixed 00
@@ -1010,15 +1009,14 @@ static void write_packet_uplink_ack_egprs(
/* -2 for last bit 0 mandatory and REL5 not supported */
unsigned bits_ack_nack = dest->data_len * 8 - wp - 2;
- write_packet_ack_nack_desc_egprs(bts, dest, wp, tbf->window(), is_final, bits_ack_nack);
+ write_packet_ack_nack_desc_egprs(dest, wp, tbf->window(), is_final, bits_ack_nack);
bitvec_write_field(dest, &wp, 0, 1); // fixed 0
bitvec_write_field(dest, &wp, 0, 1); // 0: don't have REL 5
};
void Encoding::write_packet_uplink_ack(
- struct gprs_rlcmac_bts *bts, bitvec * dest,
- struct gprs_rlcmac_ul_tbf *tbf, bool is_final,
+ bitvec * dest, struct gprs_rlcmac_ul_tbf *tbf, bool is_final,
uint8_t rrbp)
{
unsigned wp = 0;
@@ -1039,11 +1037,11 @@ void Encoding::write_packet_uplink_ack(
if (tbf->is_egprs_enabled()) {
/* PU_AckNack_EGPRS = on */
bitvec_write_field(dest, &wp, 1, 1); // 1: EGPRS
- write_packet_uplink_ack_egprs(bts, dest, wp, tbf, is_final);
+ write_packet_uplink_ack_egprs(dest, wp, tbf, is_final);
} else {
/* PU_AckNack_GPRS = on */
bitvec_write_field(dest, &wp, 0, 1); // 0: GPRS
- write_packet_uplink_ack_gprs(bts, dest, wp, tbf, is_final);
+ write_packet_uplink_ack_gprs(dest, wp, tbf, is_final);
}
LOGP(DRLCMACUL, LOGL_DEBUG,
diff --git a/src/encoding.h b/src/encoding.h
index 2309dc3..6dcced0 100644
--- a/src/encoding.h
+++ b/src/encoding.h
@@ -27,7 +27,6 @@ extern "C" {
#include <osmocom/gsm/l1sap.h>
}
-struct gprs_rlcmac_bts;
struct gprs_rlcmac_tbf;
struct bitvec;
struct gprs_llc;
@@ -57,7 +56,6 @@ public:
);
static void write_packet_uplink_assignment(
- struct gprs_rlcmac_bts *bts,
bitvec * dest, uint8_t old_tfi,
uint8_t old_downlink, uint32_t tlli, uint8_t use_tlli,
struct gprs_rlcmac_ul_tbf *tbf, uint8_t poll, uint8_t rrbp,
@@ -76,8 +74,7 @@ public:
bitvec * dest, uint32_t tlli);
static void write_packet_uplink_ack(
- struct gprs_rlcmac_bts *bts, bitvec * dest,
- struct gprs_rlcmac_ul_tbf *tbf, bool is_final,
+ bitvec * dest, struct gprs_rlcmac_ul_tbf *tbf, bool is_final,
uint8_t rrbp);
static int write_paging_request(bitvec * dest, uint8_t *ptmsi, uint16_t ptmsi_len);
diff --git a/src/tbf.cpp b/src/tbf.cpp
index dc90dbb..a099322 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -1365,7 +1365,7 @@ struct msgb *gprs_rlcmac_tbf::create_ul_ass(uint32_t fn, uint8_t ts)
return NULL;
}
bitvec_unhex(ass_vec, DUMMY_VEC);
- Encoding::write_packet_uplink_assignment(bts_data(), ass_vec, m_tfi,
+ Encoding::write_packet_uplink_assignment(ass_vec, m_tfi,
(direction == GPRS_RLCMAC_DL_TBF), tlli(),
is_tlli_valid(), new_tbf, 1, rrbp, bts_data()->alpha,
bts_data()->gamma, -1, is_egprs_enabled());
diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp
index e1a0fbd..55c83e7 100644
--- a/src/tbf_ul.cpp
+++ b/src/tbf_ul.cpp
@@ -153,7 +153,7 @@ struct msgb *gprs_rlcmac_ul_tbf::create_ul_ack(uint32_t fn, uint8_t ts)
return NULL;
}
bitvec_unhex(ack_vec, DUMMY_VEC);
- Encoding::write_packet_uplink_ack(bts_data(), ack_vec, this, final, rrbp);
+ Encoding::write_packet_uplink_ack(ack_vec, this, final, rrbp);
bitvec_pack(ack_vec, msgb_put(msg, 23));
bitvec_free(ack_vec);