aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/encoding.cpp117
-rw-r--r--src/encoding.h2
-rw-r--r--src/tbf_ul.cpp8
3 files changed, 0 insertions, 127 deletions
diff --git a/src/encoding.cpp b/src/encoding.cpp
index 4cbcd8c..158625e 100644
--- a/src/encoding.cpp
+++ b/src/encoding.cpp
@@ -399,123 +399,6 @@ void Encoding::encode_rbb(const char *show_rbb, uint8_t *rbb)
}
}
-static void write_packet_uplink_ack_gprs(struct gprs_rlcmac_bts *bts,
- PU_AckNack_GPRS_t *acknack, struct gprs_rlcmac_ul_tbf *tbf,
- int is_final)
-{
- Common_Uplink_Ack_Nack_Data_t *acknack_data =
- &acknack->Common_Uplink_Ack_Nack_Data;
- char rbb[65];
-
- tbf->m_window.update_rbb(rbb);
-
- acknack->CHANNEL_CODING_COMMAND = tbf->current_cs() - 1;
- acknack->Ack_Nack_Description.FINAL_ACK_INDICATION = is_final;
- acknack->Ack_Nack_Description.STARTING_SEQUENCE_NUMBER = tbf->m_window.ssn();
-
- Encoding::encode_rbb(rbb, acknack->Ack_Nack_Description.RECEIVED_BLOCK_BITMAP);
-
- /* rbb is not NULL terminated */
- rbb[64] = 0;
- LOGP(DRLCMACUL, LOGL_DEBUG, "- V(N): \"%s\" R=Received "
- "I=Invalid\n", rbb);
-
- acknack->UnionType = 0x0; /* Fixed Allocation Dummy = on */
- acknack->u.FixedAllocationDummy = 0x0; /* Fixed Allocation Dummy */
- acknack->Exist_AdditionsR99 = 0x0; /* AdditionsR99 = off */
-
- acknack_data->Exist_CONTENTION_RESOLUTION_TLLI = 0x1;
- acknack_data->CONTENTION_RESOLUTION_TLLI = tbf->tlli();
- acknack_data->Exist_Packet_Timing_Advance = 0x0;
- acknack_data->Exist_Extension_Bits = 0x0;
- acknack_data->Exist_Power_Control_Parameters = 0x0;
-}
-
-static void write_packet_uplink_ack_egprs(struct gprs_rlcmac_bts *bts,
- PU_AckNack_EGPRS_00_t *acknack, struct gprs_rlcmac_ul_tbf *tbf,
- int is_final)
-{
- Common_Uplink_Ack_Nack_Data_t *acknack_data =
- &acknack->Common_Uplink_Ack_Nack_Data;
- char rbb[65];
-
- int bow = 1;
- int eow = 1;
- int ssn = tbf->m_window.mod_sns(tbf->m_window.v_q() + 1);
-
- tbf->m_window.update_rbb(rbb);
-
- /* rbb is not NULL terminated */
- rbb[64] = 0;
- LOGP(DRLCMACUL, LOGL_DEBUG, "- V(N): \"%s\" R=Received "
- "I=Invalid\n", rbb);
-
- /* TODO: Use tbf->current_cs() when it supports EGPRS */
- acknack->EGPRS_ChannelCodingCommand = 2; /* MCS-3 */
- acknack->RESEGMENT = 0; /* NYI */
- acknack->PRE_EMPTIVE_TRANSMISSION = 1; /* TODO: This resembles GPRS, change it? */
- acknack->PRR_RETRANSMISSION_REQUEST = 0; /* TODO: Needs clarification */
- acknack->ARAC_RETRANSMISSION_REQUEST = 0; /* TODO: Needs clarification */
-
- acknack_data->Exist_CONTENTION_RESOLUTION_TLLI = 0x1;
- acknack_data->CONTENTION_RESOLUTION_TLLI = tbf->tlli();
-
- acknack->TBF_EST = 1; /* Enable RR on PACCH */
-
- acknack_data->Exist_Packet_Timing_Advance = 0x0;
- acknack->Exist_Packet_Extended_Timing_Advance = 0x0;
- acknack_data->Exist_Power_Control_Parameters = 0x0;
- acknack_data->Exist_Extension_Bits = 0x0;
-
- acknack->EGPRS_AckNack.UnionType = 0;
-
- acknack->EGPRS_AckNack.Desc.FINAL_ACK_INDICATION = is_final;
- acknack->EGPRS_AckNack.Desc.BEGINNING_OF_WINDOW = eow;
- acknack->EGPRS_AckNack.Desc.END_OF_WINDOW = bow;
- acknack->EGPRS_AckNack.Desc.STARTING_SEQUENCE_NUMBER = ssn;
- acknack->EGPRS_AckNack.Desc.Exist_CRBB = 0; /* TODO: Implement compressed bitmaps */
- acknack->EGPRS_AckNack.Desc.URBB_LENGTH = 64;
-
- Encoding::encode_rbb(rbb, acknack->EGPRS_AckNack.Desc.URBB);
-}
-
-/* generate uplink ack */
-void Encoding::write_packet_uplink_ack(struct gprs_rlcmac_bts *bts,
- RlcMacDownlink_t * block, struct gprs_rlcmac_ul_tbf *tbf,
- uint8_t final)
-{
- // Packet Uplink Ack/Nack TS 44.060 11.2.28
- Packet_Uplink_Ack_Nack_t *acknack;
-
- LOGP(DRLCMACUL, LOGL_DEBUG, "Encoding Ack/Nack for %s "
- "(final=%d)\n", tbf_name(tbf), final);
-
- block->PAYLOAD_TYPE = 0x1; // RLC/MAC control block that does not include the optional octets of the RLC/MAC control header
- block->RRBP = 0x0; // N+13
- block->SP = final; // RRBP field is valid, if it is final ack
- block->USF = 0x0; // Uplink state flag
-
- acknack = &block->u.Packet_Uplink_Ack_Nack;
-
- acknack->MESSAGE_TYPE = 0x9; // Packet Downlink Assignment
- acknack->PAGE_MODE = 0x0; // Normal Paging
- acknack->UPLINK_TFI = tbf->tfi(); // Uplink TFI
-
- if (tbf->is_egprs_enabled()) {
- /* PU_AckNack_EGPRS = on */
- acknack->UnionType = 0x1;
- acknack->u.PU_AckNack_EGPRS_Struct.UnionType = 0x0;
- write_packet_uplink_ack_egprs(bts,
- &acknack->u.PU_AckNack_EGPRS_Struct.u.PU_AckNack_EGPRS_00,
- tbf, final);
- } else {
- /* PU_AckNack_GPRS = on */
- acknack->UnionType = 0x0;
- write_packet_uplink_ack_gprs(bts,
- &acknack->u.PU_AckNack_GPRS_Struct, tbf, final);
- }
-}
-
static void write_packet_ack_nack_desc_gprs(
struct gprs_rlcmac_bts *bts, bitvec * dest, unsigned& wp,
gprs_rlc_ul_window *window, bool is_final)
diff --git a/src/encoding.h b/src/encoding.h
index e88ef22..ce17d6f 100644
--- a/src/encoding.h
+++ b/src/encoding.h
@@ -56,8 +56,6 @@ public:
static void encode_rbb(const char *show_rbb, uint8_t *rbb);
- static void write_packet_uplink_ack(struct gprs_rlcmac_bts *bts, RlcMacDownlink_t * block, struct gprs_rlcmac_ul_tbf *tbf,
- uint8_t final);
static void write_packet_uplink_ack(
struct gprs_rlcmac_bts *bts, bitvec * dest,
struct gprs_rlcmac_ul_tbf *tbf, bool is_final);
diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp
index 4237162..4abfaaa 100644
--- a/src/tbf_ul.cpp
+++ b/src/tbf_ul.cpp
@@ -116,17 +116,9 @@ struct msgb *gprs_rlcmac_ul_tbf::create_ul_ack(uint32_t fn)
}
bitvec_unhex(ack_vec,
"2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b");
- /*
- RlcMacDownlink_t * mac_control_block = (RlcMacDownlink_t *)talloc_zero(tall_pcu_ctx, RlcMacDownlink_t);
- Encoding::write_packet_uplink_ack(bts_data(), mac_control_block, this, final);
- encode_gsm_rlcmac_downlink(ack_vec, mac_control_block);
- */
Encoding::write_packet_uplink_ack(bts_data(), ack_vec, this, final);
bitvec_pack(ack_vec, msgb_put(msg, 23));
bitvec_free(ack_vec);
- /*
- talloc_free(mac_control_block);
- */
/* now we must set this flag, so we are allowed to assign downlink
* TBF on PACCH. it is only allowed when TLLI is acknowledged. */