laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/14570 )

Change subject: Encoding: drop struct gprs_rlcmac_bts* from all functions
......................................................................

Encoding: drop struct gprs_rlcmac_bts* from all functions

The bts is not used at all.

Change-Id: Ia07755e825913a16352ab13f6cf55f2918de8681
---
M src/encoding.cpp
M src/encoding.h
M src/tbf.cpp
M src/tbf_ul.cpp
4 files changed, 12 insertions(+), 17 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  fixeria: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



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 @@

 /* 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 @@
 }
 
 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_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_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_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 @@

        /* -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 @@
        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 @@
 #include <osmocom/gsm/l1sap.h>
 }

-struct gprs_rlcmac_bts;
 struct gprs_rlcmac_tbf;
 struct bitvec;
 struct gprs_llc;
@@ -57,7 +56,6 @@
                );

        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 @@
                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 @@
                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 @@
                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);


--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/14570
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ia07755e825913a16352ab13f6cf55f2918de8681
Gerrit-Change-Number: 14570
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-MessageType: merged

Reply via email to