rsl: remove redundant boolean flag in rsl_rx_chan_activ()
Checking if a given RSL IE is present is a straightforward task, so there is no need for a special boolean flag. Change-Id: I6a12930314c79b9c3efabfa575b17f78105fea4c
This commit is contained in:
parent
538c56ef34
commit
f158bb614c
|
@ -1124,7 +1124,6 @@ static int rsl_rx_chan_activ(struct msgb *msg)
|
|||
struct tlv_parsed tp;
|
||||
uint8_t type;
|
||||
int rc;
|
||||
bool ms_power_present = false;
|
||||
|
||||
if (lchan->state != LCHAN_S_NONE) {
|
||||
LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "error: lchan is not available, but in state: %s.\n",
|
||||
|
@ -1229,7 +1228,6 @@ static int rsl_rx_chan_activ(struct msgb *msg)
|
|||
if (TLVP_PRES_LEN(&tp, RSL_IE_MS_POWER, 1)) {
|
||||
lchan->ms_power_ctrl.max = *TLVP_VAL(&tp, RSL_IE_MS_POWER) & 0x1F;
|
||||
lchan->ms_power_ctrl.current = lchan->ms_power_ctrl.max;
|
||||
ms_power_present = true;
|
||||
}
|
||||
/* 9.3.24 Timing Advance */
|
||||
if (TLVP_PRES_LEN(&tp, RSL_IE_TIMING_ADVANCE, 1))
|
||||
|
@ -1366,7 +1364,7 @@ static int rsl_rx_chan_activ(struct msgb *msg)
|
|||
switch (type) {
|
||||
case RSL_ACT_INTER_ASYNC:
|
||||
case RSL_ACT_INTER_SYNC:
|
||||
lchan->want_dl_sacch_active = ms_power_present;
|
||||
lchan->want_dl_sacch_active = TLVP_PRES_LEN(&tp, RSL_IE_MS_POWER, 1);
|
||||
break;
|
||||
default:
|
||||
lchan->want_dl_sacch_active = true;
|
||||
|
|
Loading…
Reference in New Issue