pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/33271 )
Change subject: Remove unused GPRS_RLCMAC_FLAG_TO_MASK ......................................................................
Remove unused GPRS_RLCMAC_FLAG_TO_MASK
We are no longer making use of the 4 high bits in state_flags, so we can safely drop masking them.
Change-Id: I1402310919578a09669530786296f34bf3b23ef2 --- M src/tbf.h M src/tbf_dl_fsm.c M src/tbf_ul_fsm.c 3 files changed, 18 insertions(+), 11 deletions(-)
Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve osmith: Looks good to me, approved
diff --git a/src/tbf.h b/src/tbf.h index 878c77b..37756b0 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -111,7 +111,6 @@ #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 7db2cca..c7cc535 100644 --- a/src/tbf_dl_fsm.c +++ b/src/tbf_dl_fsm.c @@ -77,12 +77,10 @@ !!(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 @@ * 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 e5c84ed..f6615a8 100644 --- a/src/tbf_ul_fsm.c +++ b/src/tbf_ul_fsm.c @@ -76,12 +76,10 @@ !!(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); - } }