diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2021-05-10 17:47:46 +0200 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2021-05-21 15:43:30 +0200 |
commit | 794e1281d8d9a8dd2e61357e48de1b570272815e (patch) | |
tree | 66050281336ad2efdbadbe716f1769d00bfa119c /src | |
parent | a31beaeafd8ff9ef740f13e3d76c08b7f58e6873 (diff) |
cosmetic: rename FOR_* to ACTIVATE_FOR_*
Soon, there will also be enums with ASSIGNMENT_FOR_* and MODIFY_FOR_*
naming. Add the ACTIVATE_ prefix to the existing enum to clarify.
Change-Id: I12190d4d154a1da6a9ebc9a755ccc2fe382ff188
Diffstat (limited to 'src')
-rw-r--r-- | src/osmo-bsc/abis_rsl.c | 2 | ||||
-rw-r--r-- | src/osmo-bsc/assignment_fsm.c | 4 | ||||
-rw-r--r-- | src/osmo-bsc/bsc_vty.c | 8 | ||||
-rw-r--r-- | src/osmo-bsc/gsm_data.c | 10 | ||||
-rw-r--r-- | src/osmo-bsc/handover_fsm.c | 4 | ||||
-rw-r--r-- | src/osmo-bsc/lchan_fsm.c | 36 |
6 files changed, 32 insertions, 32 deletions
diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index 20fb759e9..eb303456d 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -1767,7 +1767,7 @@ void abis_rsl_chan_rqd_queue_poll(struct gsm_bts *bts) LOG_LCHAN(lchan, LOGL_DEBUG, "MS: Channel Request: reason=%s ra=0x%02x ta=%d\n", gsm_chreq_name(rqd->reason), rqd->ref.ra, rqd->ta); info = (struct lchan_activate_info){ - .activ_for = FOR_MS_CHANNEL_REQUEST, + .activ_for = ACTIVATE_FOR_MS_CHANNEL_REQUEST, .chan_mode = GSM48_CMODE_SIGN, .ta = rqd->ta, .ta_known = true, diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c index 6d07a39bf..3a1739603 100644 --- a/src/osmo-bsc/assignment_fsm.c +++ b/src/osmo-bsc/assignment_fsm.c @@ -495,7 +495,7 @@ void assignment_fsm_start(struct gsm_subscriber_connection *conn, struct gsm_bts gsm_lchan_name(conn->lchan)); info = (struct lchan_activate_info){ - .activ_for = FOR_ASSIGNMENT, + .activ_for = ACTIVATE_FOR_ASSIGNMENT, .for_conn = conn, .chan_mode = conn->lchan->ch_mode_rate.chan_mode, .encr = conn->lchan->encr, @@ -572,7 +572,7 @@ void assignment_fsm_start(struct gsm_subscriber_connection *conn, struct gsm_bts assignment_fsm_state_chg(ASSIGNMENT_ST_WAIT_LCHAN_ACTIVE); info = (struct lchan_activate_info){ - .activ_for = FOR_ASSIGNMENT, + .activ_for = ACTIVATE_FOR_ASSIGNMENT, .for_conn = conn, .chan_mode = conn->lchan->ch_mode_rate.chan_mode, .encr = conn->lchan->encr, diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index ab883f490..c482fb948 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -6070,13 +6070,13 @@ static int lchan_act_single(struct vty *vty, struct gsm_lchan *lchan, const char lchan->type = lchan_t; if (!strcmp(codec_str, "hr") || !strcmp(codec_str, "fr")) { info = (struct lchan_activate_info) { - .activ_for = FOR_VTY, + .activ_for = ACTIVATE_FOR_VTY, .chan_mode = GSM48_CMODE_SPEECH_V1, .requires_voice_stream = false, }; } else if (!strcmp(codec_str, "efr")) { info = (struct lchan_activate_info) { - .activ_for = FOR_VTY, + .activ_for = ACTIVATE_FOR_VTY, .chan_mode = GSM48_CMODE_SPEECH_EFR, .s15_s0 = amr_modes[amr_mode], .requires_voice_stream = false, @@ -6087,14 +6087,14 @@ static int lchan_act_single(struct vty *vty, struct gsm_lchan *lchan, const char return CMD_WARNING; } info = (struct lchan_activate_info) { - .activ_for = FOR_VTY, + .activ_for = ACTIVATE_FOR_VTY, .chan_mode = GSM48_CMODE_SPEECH_AMR, .s15_s0 = amr_modes[amr_mode], .requires_voice_stream = false, }; } else if (!strcmp(codec_str, "sig")) { info = (struct lchan_activate_info) { - .activ_for = FOR_VTY, + .activ_for = ACTIVATE_FOR_VTY, .chan_mode = GSM48_CMODE_SIGN, .requires_voice_stream = false, }; diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c index 2595ea966..d5a9d6b17 100644 --- a/src/osmo-bsc/gsm_data.c +++ b/src/osmo-bsc/gsm_data.c @@ -908,11 +908,11 @@ ms_power_default: } const struct value_string lchan_activate_mode_names[] = { - OSMO_VALUE_STRING(FOR_NONE), - OSMO_VALUE_STRING(FOR_MS_CHANNEL_REQUEST), - OSMO_VALUE_STRING(FOR_ASSIGNMENT), - OSMO_VALUE_STRING(FOR_HANDOVER), - OSMO_VALUE_STRING(FOR_VTY), + OSMO_VALUE_STRING(ACTIVATE_FOR_NONE), + OSMO_VALUE_STRING(ACTIVATE_FOR_MS_CHANNEL_REQUEST), + OSMO_VALUE_STRING(ACTIVATE_FOR_ASSIGNMENT), + OSMO_VALUE_STRING(ACTIVATE_FOR_HANDOVER), + OSMO_VALUE_STRING(ACTIVATE_FOR_VTY), {} }; diff --git a/src/osmo-bsc/handover_fsm.c b/src/osmo-bsc/handover_fsm.c index 53cafed06..0b5a8be51 100644 --- a/src/osmo-bsc/handover_fsm.c +++ b/src/osmo-bsc/handover_fsm.c @@ -396,7 +396,7 @@ static void handover_start_intra_bsc(struct gsm_subscriber_connection *conn) ho_fsm_state_chg(HO_ST_WAIT_LCHAN_ACTIVE); info = (struct lchan_activate_info){ - .activ_for = FOR_HANDOVER, + .activ_for = ACTIVATE_FOR_HANDOVER, .for_conn = conn, .chan_mode = conn->lchan->tch_mode, .encr = conn->lchan->encr, @@ -694,7 +694,7 @@ void handover_start_inter_bsc_in(struct gsm_subscriber_connection *conn, ho_fsm_state_chg(HO_ST_WAIT_LCHAN_ACTIVE); info = (struct lchan_activate_info){ - .activ_for = FOR_HANDOVER, + .activ_for = ACTIVATE_FOR_HANDOVER, .for_conn = conn, .chan_mode = ch_mode_rate.chan_mode, .s15_s0 = ch_mode_rate.s15_s0, diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c index 94f7821fd..8527d383b 100644 --- a/src/osmo-bsc/lchan_fsm.c +++ b/src/osmo-bsc/lchan_fsm.c @@ -80,7 +80,7 @@ static void _lchan_on_activation_failure(struct gsm_lchan *lchan, enum lchan_act switch (activ_for) { - case FOR_MS_CHANNEL_REQUEST: + case ACTIVATE_FOR_MS_CHANNEL_REQUEST: if (!lchan->activate.immediate_assignment_sent) { /* Failure before Immediate Assignment message, send a reject. */ LOG_LCHAN(lchan, LOGL_NOTICE, "Tx Immediate Assignment Reject (%s)\n", @@ -92,14 +92,14 @@ static void _lchan_on_activation_failure(struct gsm_lchan *lchan, enum lchan_act * lchan_on_activation_failure(), no additional action or logging needed. */ break; - case FOR_ASSIGNMENT: + case ACTIVATE_FOR_ASSIGNMENT: LOG_LCHAN(lchan, LOGL_NOTICE, "Signalling Assignment FSM of error (%s)\n", lchan->last_error ? : "unknown error"); _osmo_fsm_inst_dispatch(for_conn->assignment.fi, ASSIGNMENT_EV_LCHAN_ERROR, lchan, file, line); return; - case FOR_HANDOVER: + case ACTIVATE_FOR_HANDOVER: LOG_LCHAN(lchan, LOGL_NOTICE, "Signalling Handover FSM of error (%s)\n", lchan->last_error ? : "unknown error"); if (!for_conn) { @@ -117,7 +117,7 @@ static void _lchan_on_activation_failure(struct gsm_lchan *lchan, enum lchan_act _osmo_fsm_inst_dispatch(for_conn->ho.fi, HO_EV_LCHAN_ERROR, lchan, file, line); break; - case FOR_VTY: + case ACTIVATE_FOR_VTY: LOG_LCHAN(lchan, LOGL_ERROR, "VTY user invoked lchan activation failed (%s)\n", lchan->last_error ? : "unknown error"); break; @@ -136,12 +136,12 @@ static void lchan_on_fully_established(struct gsm_lchan *lchan) lchan->activate.concluded = true; switch (lchan->activate.info.activ_for) { - case FOR_MS_CHANNEL_REQUEST: + case ACTIVATE_FOR_MS_CHANNEL_REQUEST: /* No signalling to do here, MS is free to use the channel, and should go on to connect * to the MSC and establish a subscriber connection. */ break; - case FOR_ASSIGNMENT: + case ACTIVATE_FOR_ASSIGNMENT: if (!lchan->conn) { LOG_LCHAN(lchan, LOGL_ERROR, "lchan activation for assignment succeeded, but lchan has no conn:" @@ -163,7 +163,7 @@ static void lchan_on_fully_established(struct gsm_lchan *lchan) * will try to roll back a modified RTP connection. */ break; - case FOR_HANDOVER: + case ACTIVATE_FOR_HANDOVER: if (!lchan->conn) { LOG_LCHAN(lchan, LOGL_ERROR, "lchan activation for handover succeeded, but lchan has no conn\n"); @@ -264,7 +264,7 @@ void lchan_activate(struct gsm_lchan *lchan, struct lchan_activate_info *info) switch (info->activ_for) { - case FOR_ASSIGNMENT: + case ACTIVATE_FOR_ASSIGNMENT: if (!info->for_conn || !info->for_conn->fi) { LOG_LCHAN(lchan, LOGL_ERROR, "Activation requested, but no conn\n"); @@ -281,7 +281,7 @@ void lchan_activate(struct gsm_lchan *lchan, struct lchan_activate_info *info) } break; - case FOR_HANDOVER: + case ACTIVATE_FOR_HANDOVER: if (!info->for_conn || !info->for_conn->fi) { LOG_LCHAN(lchan, LOGL_ERROR, "Activation requested, but no conn\n"); @@ -452,7 +452,7 @@ static int lchan_mr_config(struct gsm_lchan *lchan, uint16_t s15_s0) mr = &bts->mr_half; mr_conf_bts = (struct gsm48_multi_rate_conf *)mr->gsm48_ie; - if (lchan->activate.info.activ_for == FOR_VTY) + if (lchan->activate.info.activ_for == ACTIVATE_FOR_VTY) /* If the channel is activated manually from VTY, then there is no * conn attached to the lchan, also no MSC is involved. Since this * option is for debugging and the codec choice is an intentional @@ -486,7 +486,7 @@ static int lchan_mr_config(struct gsm_lchan *lchan, uint16_t s15_s0) * configuration that is set for the BTS and the specified rate. * if the channel activation was triggerd by the VTY, do not * filter anything (see also comment above) */ - if (lchan->activate.info.activ_for != FOR_VTY) { + if (lchan->activate.info.activ_for != ACTIVATE_FOR_VTY) { rc_rate = calc_amr_rate_intersection(&mr_conf_filtered, mr_conf_bts, &mr_conf_filtered); if (rc_rate < 0) { LOG_LCHAN(lchan, LOGL_ERROR, @@ -670,15 +670,15 @@ static void lchan_fsm_wait_activ_ack_onenter(struct osmo_fsm_inst *fi, uint32_t } switch (lchan->activate.info.activ_for) { - case FOR_MS_CHANNEL_REQUEST: + case ACTIVATE_FOR_MS_CHANNEL_REQUEST: act_type = RSL_ACT_INTRA_IMM_ASS; break; - case FOR_HANDOVER: + case ACTIVATE_FOR_HANDOVER: act_type = lchan->conn->ho.async ? RSL_ACT_INTER_ASYNC : RSL_ACT_INTER_SYNC; ho_ref = lchan->conn->ho.ho_ref; break; default: - case FOR_ASSIGNMENT: + case ACTIVATE_FOR_ASSIGNMENT: act_type = RSL_ACT_INTRA_NORM_ASS; break; } @@ -762,7 +762,7 @@ static void lchan_fsm_post_activ_ack(struct osmo_fsm_inst *fi) switch (lchan->activate.info.activ_for) { - case FOR_MS_CHANNEL_REQUEST: + case ACTIVATE_FOR_MS_CHANNEL_REQUEST: rc = rsl_tx_imm_assignment(lchan); if (rc) { lchan_fail("Failed to Tx RR Immediate Assignment message (rc=%d %s)\n", @@ -773,7 +773,7 @@ static void lchan_fsm_post_activ_ack(struct osmo_fsm_inst *fi) lchan->activate.immediate_assignment_sent = true; break; - case FOR_ASSIGNMENT: + case ACTIVATE_FOR_ASSIGNMENT: if (!lchan->conn) { LOG_LCHAN(lchan, LOGL_ERROR, "lchan activation for assignment succeeded, but lchan has no conn:" @@ -793,7 +793,7 @@ static void lchan_fsm_post_activ_ack(struct osmo_fsm_inst *fi) osmo_fsm_inst_dispatch(lchan->conn->assignment.fi, ASSIGNMENT_EV_LCHAN_ACTIVE, lchan); break; - case FOR_HANDOVER: + case ACTIVATE_FOR_HANDOVER: if (!lchan->conn) { LOG_LCHAN(lchan, LOGL_ERROR, "lchan activation for handover succeeded, but lchan has no conn:" @@ -833,7 +833,7 @@ static void lchan_fsm_wait_rll_rtp_establish_onenter(struct osmo_fsm_inst *fi, u /* When activating a channel for VTY, skip waiting for activity from * lchan_rtp_fsm, but only if no voice stream is required. */ - if (lchan->activate.info.activ_for == FOR_VTY && + if (lchan->activate.info.activ_for == ACTIVATE_FOR_VTY && !lchan->activate.info.requires_voice_stream) { lchan_fsm_state_chg(LCHAN_ST_ESTABLISHED); } |