layer23: Unify the prefix of l1ctl TX functions
authorSylvain Munaut <tnt@246tNt.com>
Sun, 25 Jul 2010 22:26:11 +0000 (00:26 +0200)
committerSylvain Munaut <tnt@246tNt.com>
Tue, 27 Jul 2010 18:51:52 +0000 (20:51 +0200)
Some had tx_ph_XX, others l1ctl_tx_XXX and some l1ctl_tx_ph_XXX

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
src/host/layer23/include/osmocom/bb/common/l1ctl.h
src/host/layer23/src/common/l1ctl.c
src/host/layer23/src/common/lapdm.c
src/host/layer23/src/misc/layer3.c
src/host/layer23/src/misc/rslms.c
src/host/layer23/src/mobile/gsm48_rr.c

index 75551ab..ad11323 100644 (file)
@@ -10,32 +10,34 @@ struct osmocom_ms;
 int l1ctl_recv(struct osmocom_ms *ms, struct msgb *msg);
 
 /* Transmit L1CTL_DATA_REQ */
-int tx_ph_data_req(struct osmocom_ms *ms, struct msgb *msg, uint8_t chan_nr,
+int l1ctl_tx_data_req(struct osmocom_ms *ms, struct msgb *msg, uint8_t chan_nr,
        uint8_t link_id);
 
 /* Transmit L1CTL_PARAM_REQ */
-int l1ctl_tx_ph_param_req(struct osmocom_ms *ms, uint8_t ta, uint8_t tx_power);
+int l1ctl_tx_param_req(struct osmocom_ms *ms, uint8_t ta, uint8_t tx_power);
 
 /* Transmit L1CTL_RACH_REQ */
-int tx_ph_rach_req(struct osmocom_ms *ms, uint8_t ra, uint8_t fn51,
+int l1ctl_tx_rach_req(struct osmocom_ms *ms, uint8_t ra, uint8_t fn51,
        uint8_t mf_off);
 
 /* Transmit L1CTL_DM_EST_REQ */
-int tx_ph_dm_est_req_h0(struct osmocom_ms *ms, uint16_t band_arfcn,
+int l1ctl_tx_dm_est_req_h0(struct osmocom_ms *ms, uint16_t band_arfcn,
        uint8_t chan_nr, uint8_t tsc);
-int tx_ph_dm_est_req_h1(struct osmocom_ms *ms, uint8_t maio, uint8_t hsn,
+int l1ctl_tx_dm_est_req_h1(struct osmocom_ms *ms, uint8_t maio, uint8_t hsn,
        uint16_t *ma, uint8_t ma_len, uint8_t chan_nr, uint8_t tsc);
 
 /* Transmit L1CTL_DM_REL_REQ */
-int tx_ph_dm_rel_req(struct osmocom_ms *ms);
+int l1ctl_tx_dm_rel_req(struct osmocom_ms *ms);
 
 /* Transmit FBSB_REQ */
 int l1ctl_tx_fbsb_req(struct osmocom_ms *ms, uint16_t arfcn,
                      uint8_t flags, uint16_t timeout, uint8_t sync_info_idx,
                      uint8_t ccch_mode);
 
+/* Transmit CCCH_MODE_REQ */
 int l1ctl_tx_ccch_mode_req(struct osmocom_ms *ms, uint8_t ccch_mode);
 
+/* Transmit ECHO_REQ */
 int l1ctl_tx_echo_req(struct osmocom_ms *ms, unsigned int len);
 
 /* Transmit L1CTL_RESET_REQ */
index 132d5ce..2aa3ab5 100644 (file)
@@ -206,8 +206,8 @@ static int rx_ph_data_conf(struct osmocom_ms *ms, struct msgb *msg)
 }
 
 /* Transmit L1CTL_DATA_REQ */
-int tx_ph_data_req(struct osmocom_ms *ms, struct msgb *msg, uint8_t chan_nr,
-       uint8_t link_id)
+int l1ctl_tx_data_req(struct osmocom_ms *ms, struct msgb *msg,
+                      uint8_t chan_nr, uint8_t link_id)
 {
        struct l1ctl_hdr *l1h;
        struct l1ctl_info_ul *l1i_ul;
@@ -296,7 +296,7 @@ int l1ctl_tx_ccch_mode_req(struct osmocom_ms *ms, uint8_t ccch_mode)
 }
 
 /* Transmit L1CTL_PARAM_REQ */
-int l1ctl_tx_ph_param_req(struct osmocom_ms *ms, uint8_t ta, uint8_t tx_power)
+int l1ctl_tx_param_req(struct osmocom_ms *ms, uint8_t ta, uint8_t tx_power)
 {
        struct msgb *msg;
        struct l1ctl_info_ul *ul;
@@ -316,7 +316,7 @@ int l1ctl_tx_ph_param_req(struct osmocom_ms *ms, uint8_t ta, uint8_t tx_power)
 }
 
 /* Transmit L1CTL_RACH_REQ */
-int tx_ph_rach_req(struct osmocom_ms *ms, uint8_t ra, uint8_t fn51,
+int l1ctl_tx_rach_req(struct osmocom_ms *ms, uint8_t ra, uint8_t fn51,
        uint8_t mf_off)
 {
        struct msgb *msg;
@@ -338,8 +338,8 @@ int tx_ph_rach_req(struct osmocom_ms *ms, uint8_t ra, uint8_t fn51,
 }
 
 /* Transmit L1CTL_DM_EST_REQ */
-int tx_ph_dm_est_req_h0(struct osmocom_ms *ms, uint16_t band_arfcn,
-       uint8_t chan_nr, uint8_t tsc)
+int l1ctl_tx_dm_est_req_h0(struct osmocom_ms *ms, uint16_t band_arfcn,
+                           uint8_t chan_nr, uint8_t tsc)
 {
        struct msgb *msg;
        struct l1ctl_info_ul *ul;
@@ -366,8 +366,9 @@ int tx_ph_dm_est_req_h0(struct osmocom_ms *ms, uint16_t band_arfcn,
        return osmo_send_l1(ms, msg);
 }
 
-int tx_ph_dm_est_req_h1(struct osmocom_ms *ms, uint8_t maio, uint8_t hsn,
-       uint16_t *ma, uint8_t ma_len, uint8_t chan_nr, uint8_t tsc)
+int l1ctl_tx_dm_est_req_h1(struct osmocom_ms *ms, uint8_t maio, uint8_t hsn,
+                           uint16_t *ma, uint8_t ma_len,
+                           uint8_t chan_nr, uint8_t tsc)
 {
        struct msgb *msg;
        struct l1ctl_info_ul *ul;
@@ -400,7 +401,7 @@ int tx_ph_dm_est_req_h1(struct osmocom_ms *ms, uint8_t maio, uint8_t hsn,
 }
 
 /* Transmit L1CTL_DM_REL_REQ */
-int tx_ph_dm_rel_req(struct osmocom_ms *ms)
+int l1ctl_tx_dm_rel_req(struct osmocom_ms *ms)
 {
        struct msgb *msg;
        struct l1ctl_info_ul *ul;
index 4aa4662..f165f4e 100644 (file)
@@ -306,7 +306,7 @@ for (i = 0; i < msgb_l2len(msg); i++)
 printf("\n");
 #endif
        lapdm_pad_msgb(msg, n201);
-       return tx_ph_data_req(ms, msg, chan_nr, link_id);
+       return l1ctl_tx_data_req(ms, msg, chan_nr, link_id);
 }
 
 /* get next frame from the tx queue. because the ms has multiple datalinks,
@@ -362,7 +362,7 @@ for (i = 0; i < msgb_l2len(msg); i++)
 printf("\n");
 #endif
        lapdm_pad_msgb(msg, n201);
-       return tx_ph_data_req(ms, msg, chan_nr, link_id);
+       return l1ctl_tx_data_req(ms, msg, chan_nr, link_id);
 }
 
 /* Create RSLms various RSLms messages */
@@ -2013,9 +2013,9 @@ static int rslms_rx_chan_rqd(struct osmocom_ms *ms, struct msgb *msg)
        }
 
        /* TA = 0 - delay */
-       rc = l1ctl_tx_ph_param_req(ms, 0 - cch->data[5], cch->data[7]);
+       rc = l1ctl_tx_param_req(ms, 0 - cch->data[5], cch->data[7]);
 
-       rc = tx_ph_rach_req(ms, cch->data[1], cch->data[2], cch->data[3]);
+       rc = l1ctl_tx_rach_req(ms, cch->data[1], cch->data[2], cch->data[3]);
 
        msgb_free(msg);
 
index 5f2acf7..69f558d 100644 (file)
@@ -187,7 +187,7 @@ static int gsm48_rx_imm_ass(struct msgb *msg, struct osmocom_ms *ms)
        }
 
        /* request L1 to go to dedicated mode on assigned channel */
-       tx_ph_dm_est_req_h0(ms, arfcn, ia->chan_desc.chan_nr,
+       l1ctl_tx_dm_est_req_h0(ms, arfcn, ia->chan_desc.chan_nr,
                         ia->chan_desc.h0.tsc);
 
        /* request L2 to establish the SAPI0 connection */
index 5ab367b..7231fda 100644 (file)
@@ -81,7 +81,7 @@ static int rslms_rx_udata_ind(struct msgb *msg, struct osmocom_ms *ms)
        } else if (rllh->chan_nr == RSL_CHAN_BCCH) {
                rc = gsm48_rx_bcch(msg, ms);
                if (ccch_enabled && (rach_count < 2)) {
-                       tx_ph_rach_req(ms, rach_count, 27, 0);
+                       l1ctl_tx_rach_req(ms, rach_count, 27, 0);
                        rach_count++;
                }
        }
index 02fff39..f34cdcf 100644 (file)
@@ -226,7 +226,7 @@ static void new_rr_state(struct gsm48_rrlayer *rr, int state)
                struct gsm322_msg *em;
 
                /* release dedicated mode, if any */
-               tx_ph_dm_rel_req(rr->ms);
+               l1ctl_tx_dm_rel_req(rr->ms);
                l1ctl_tx_reset_req(rr->ms, L1CTL_RES_T_FULL);
                /* free establish message, if any */
                rr->rr_est_req = 0;
@@ -3161,7 +3161,7 @@ static int gsm48_rr_dl_est(struct osmocom_ms *ms)
        rr->ind_ta = rr->cd_now.ta;
        LOGP(DRR, LOGL_INFO, "setting indicated TA %d (actual TA %d)\n",
                rr->ind_ta, rr->ind_ta - set->alter_delay);
-       l1ctl_tx_ph_param_req(ms, rr->ind_ta - set->alter_delay,
+       l1ctl_tx_param_req(ms, rr->ind_ta - set->alter_delay,
                        (set->alter_tx_power) ? set->alter_tx_power_value
                                                : rr->ind_tx_power);
 
@@ -3178,10 +3178,10 @@ static int gsm48_rr_dl_est(struct osmocom_ms *ms)
                exit(-ENOTSUP);
        }
        if (rr->cd_now.h)
-               tx_ph_dm_est_req_h1(ms, rr->cd_now.maio, rr->cd_now.hsn,
+               l1ctl_tx_dm_est_req_h1(ms, rr->cd_now.maio, rr->cd_now.hsn,
                        ma, ma_len, rr->cd_now.chan_nr, rr->cd_now.tsc);
        else
-               tx_ph_dm_est_req_h0(ms, rr->cd_now.arfcn, rr->cd_now.chan_nr,
+               l1ctl_tx_dm_est_req_h0(ms, rr->cd_now.arfcn, rr->cd_now.chan_nr,
                        rr->cd_now.tsc);
 #endif
 
@@ -3811,7 +3811,7 @@ static int gsm48_rr_rx_acch(struct osmocom_ms *ms, struct msgb *msg)
                ind_tx_power);
        if (ind_ta != rr->ind_ta || ind_tx_power != rr->ind_tx_power) {
                LOGP(DRR, LOGL_INFO, "setting new ta and tx_power\n");
-               l1ctl_tx_ph_param_req(ms, ind_ta - set->alter_delay,
+               l1ctl_tx_param_req(ms, ind_ta - set->alter_delay,
                        (set->alter_tx_power) ? set->alter_tx_power_value
                                                : ind_tx_power);
                rr->ind_ta = ind_ta;
@@ -4456,7 +4456,7 @@ static int gsm48_rr_mdl_error_ind(struct osmocom_ms *ms, struct msgb *msg)
        }
 
        /* deactivate channel */
-       tx_ph_dm_rel_req(ms, arfcn, rr->chan_desc.chan_desc.chan_nr);
+       l1ctl_tx_dm_rel_req(ms, arfcn, rr->chan_desc.chan_desc.chan_nr);
 
        /* send abort ind to upper layer */
        nmsg = gsm48_mm_msgb_alloc();