aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2023-06-12 17:28:18 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2023-06-12 17:28:27 +0200
commite656c210a116311cabb53bf2f6068feea2c07fbb (patch)
tree5aa1983a96b1e525d8cb6a492ae4ff4fbad86bf8
parent7a4428c3adb41538872858df2881d9a00eb0ec41 (diff)
Remove unused GPRS_RLCMAC_FLAG_TO_MASKpespin/t3193
We are no longer making use of the 4 high bits in state_flags, so we can safely drop masking them. Change-Id: I1402310919578a09669530786296f34bf3b23ef2
-rw-r--r--src/tbf.h1
-rw-r--r--src/tbf_dl_fsm.c10
-rw-r--r--src/tbf_ul_fsm.c6
3 files changed, 6 insertions, 11 deletions
diff --git a/src/tbf.h b/src/tbf.h
index 878c77b3..37756b01 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -111,7 +111,6 @@ enum tbf_counters { /* TBF counters from 3GPP TS 44.060 ยง13.4 */
#define GPRS_RLCMAC_FLAG_PACCH 1 /* assignment on PACCH */
#define GPRS_RLCMAC_FLAG_DL_ACK 2 /* DL TBF: At least one DL ACK/NACK was recieved since it was assigned */
#define GPRS_RLCMAC_FLAG_TO_DL_ACK 3 /* DL TBF: Failed to receive last polled DL ACK/NACK */
-#define GPRS_RLCMAC_FLAG_TO_MASK 0xf0 /* timeout bits */
#define TBF_TFI_UNSET 0xff
diff --git a/src/tbf_dl_fsm.c b/src/tbf_dl_fsm.c
index 7db2cca6..c7cc535c 100644
--- a/src/tbf_dl_fsm.c
+++ b/src/tbf_dl_fsm.c
@@ -77,12 +77,10 @@ static void mod_ass_type(struct tbf_dl_fsm_ctx *ctx, uint8_t t, bool set)
!!(ctx->state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH)),
!!(ctx->state_flags & (1 << GPRS_RLCMAC_FLAG_PACCH)));
- if (set) {
+ if (set)
ctx->state_flags |= (1 << t);
- } else {
- ctx->state_flags &= GPRS_RLCMAC_FLAG_TO_MASK; /* keep to flags */
+ else
ctx->state_flags &= ~(1 << t);
- }
}
@@ -322,8 +320,8 @@ static void handle_timeout_X2002(struct osmo_fsm_inst *fi)
* one slot assigned send another DL assignment via PDCH.
*/
- /* keep TO flags */
- ctx->state_flags &= GPRS_RLCMAC_FLAG_TO_MASK;
+ /* Reset state flags */
+ ctx->state_flags = 0x00;
rc = dl_tbf_upgrade_to_multislot(ctx->dl_tbf);
if (rc < 0)
diff --git a/src/tbf_ul_fsm.c b/src/tbf_ul_fsm.c
index e5c84ed4..f6615a83 100644
--- a/src/tbf_ul_fsm.c
+++ b/src/tbf_ul_fsm.c
@@ -76,12 +76,10 @@ static void mod_ass_type(struct tbf_ul_fsm_ctx *ctx, uint8_t t, bool set)
!!(ctx->state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH)),
!!(ctx->state_flags & (1 << GPRS_RLCMAC_FLAG_PACCH)));
- if (set) {
+ if (set)
ctx->state_flags |= (1 << t);
- } else {
- ctx->state_flags &= GPRS_RLCMAC_FLAG_TO_MASK; /* keep to flags */
+ else
ctx->state_flags &= ~(1 << t);
- }
}