Review at  https://gerrit.osmocom.org/6761

host/trxcon/scheduler: get rid of useless nbits argument

Change-Id: I8508676e2cb347396c6ca6b394f13113f3e63084
---
M src/host/trxcon/sched_lchan_desc.c
M src/host/trxcon/sched_lchan_rach.c
M src/host/trxcon/sched_lchan_sch.c
M src/host/trxcon/sched_lchan_xcch.c
M src/host/trxcon/sched_trx.c
M src/host/trxcon/sched_trx.h
6 files changed, 12 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/61/6761/1

diff --git a/src/host/trxcon/sched_lchan_desc.c 
b/src/host/trxcon/sched_lchan_desc.c
index dee8f6a..c483db8 100644
--- a/src/host/trxcon/sched_lchan_desc.c
+++ b/src/host/trxcon/sched_lchan_desc.c
@@ -40,19 +40,17 @@
 /* Forward declaration of handlers */
 int rx_data_fn(struct trx_instance *trx, struct trx_ts *ts,
        struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid,
-       sbit_t *bits, uint16_t nbits, int8_t rssi, float toa);
+       sbit_t *bits, int8_t rssi, float toa);
 
 int tx_data_fn(struct trx_instance *trx, struct trx_ts *ts,
-       struct trx_lchan_state *lchan, uint32_t fn,
-       uint8_t bid, uint16_t *nbits);
+       struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid);
 
 int rx_sch_fn(struct trx_instance *trx, struct trx_ts *ts,
        struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid,
-       sbit_t *bits, uint16_t nbits, int8_t rssi, float toa);
+       sbit_t *bits, int8_t rssi, float toa);
 
 int tx_rach_fn(struct trx_instance *trx, struct trx_ts *ts,
-       struct trx_lchan_state *lchan, uint32_t fn,
-       uint8_t bid, uint16_t *nbits);
+       struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid);
 
 const struct trx_lchan_desc trx_lchan_desc[_TRX_CHAN_MAX] = {
        {
diff --git a/src/host/trxcon/sched_lchan_rach.c 
b/src/host/trxcon/sched_lchan_rach.c
index 6a10ab8..2709df0 100644
--- a/src/host/trxcon/sched_lchan_rach.c
+++ b/src/host/trxcon/sched_lchan_rach.c
@@ -58,8 +58,7 @@
 
 /* Obtain a to-be-transmitted RACH burst */
 int tx_rach_fn(struct trx_instance *trx, struct trx_ts *ts,
-       struct trx_lchan_state *lchan, uint32_t fn,
-       uint8_t bid, uint16_t *nbits)
+       struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid)
 {
        struct trx_ts_prim *prim;
        struct l1ctl_rach_req *req;
diff --git a/src/host/trxcon/sched_lchan_sch.c 
b/src/host/trxcon/sched_lchan_sch.c
index aff8fb6..e3c4c97 100644
--- a/src/host/trxcon/sched_lchan_sch.c
+++ b/src/host/trxcon/sched_lchan_sch.c
@@ -74,7 +74,7 @@
 
 int rx_sch_fn(struct trx_instance *trx, struct trx_ts *ts,
        struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid,
-       sbit_t *bits, uint16_t nbits, int8_t rssi, float toa)
+       sbit_t *bits, int8_t rssi, float toa)
 {
        sbit_t payload[2 * 39];
        struct gsm_time time;
diff --git a/src/host/trxcon/sched_lchan_xcch.c 
b/src/host/trxcon/sched_lchan_xcch.c
index aa95656..1ea7468 100644
--- a/src/host/trxcon/sched_lchan_xcch.c
+++ b/src/host/trxcon/sched_lchan_xcch.c
@@ -84,7 +84,7 @@
 
 int rx_data_fn(struct trx_instance *trx, struct trx_ts *ts,
        struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid,
-       sbit_t *bits, uint16_t nbits, int8_t rssi, float toa)
+       sbit_t *bits, int8_t rssi, float toa)
 {
        const struct trx_lchan_desc *lchan_desc;
        int n_errors, n_bits_total, rc;
@@ -189,8 +189,7 @@
 }
 
 int tx_data_fn(struct trx_instance *trx, struct trx_ts *ts,
-       struct trx_lchan_state *lchan, uint32_t fn,
-       uint8_t bid, uint16_t *nbits)
+       struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid)
 {
        const struct trx_lchan_desc *lchan_desc;
        struct trx_ts_prim *prim;
@@ -249,9 +248,6 @@
        memcpy(burst + 61, tsc, 26); /* TSC */
        memcpy(burst + 87, offset + 58, 58); /* Payload 2/2 */
        memset(burst + 145, 0, 3); /* TB */
-
-       if (nbits)
-               *nbits = GSM_BURST_LEN;
 
        LOGP(DSCH, LOGL_DEBUG, "Transmitting %s fn=%u ts=%u burst=%u\n",
                lchan_desc->name, fn, ts->index, bid);
diff --git a/src/host/trxcon/sched_trx.c b/src/host/trxcon/sched_trx.c
index b9f1889..956c261 100644
--- a/src/host/trxcon/sched_trx.c
+++ b/src/host/trxcon/sched_trx.c
@@ -97,7 +97,7 @@
 
                /* Poke lchan handler */
                if (prim->chan == chan)
-                       handler(trx, ts, lchan, fn, bid, NULL);
+                       handler(trx, ts, lchan, fn, bid);
        }
 }
 
@@ -506,7 +506,7 @@
                /* Put burst to handler */
                if (fn == burst_fn) {
                        /* TODO: decrypt if required */
-                       handler(trx, ts, lchan, fn, bid, bits, nbits, rssi, 
toa);
+                       handler(trx, ts, lchan, fn, bid, bits, rssi, toa);
                }
 
 next_frame:
diff --git a/src/host/trxcon/sched_trx.h b/src/host/trxcon/sched_trx.h
index f8a8b53..1b74041 100644
--- a/src/host/trxcon/sched_trx.h
+++ b/src/host/trxcon/sched_trx.h
@@ -81,11 +81,11 @@
 typedef int trx_lchan_rx_func(struct trx_instance *trx,
        struct trx_ts *ts, struct trx_lchan_state *lchan,
        uint32_t fn, uint8_t bid, sbit_t *bits,
-       uint16_t nbits, int8_t rssi, float toa);
+       int8_t rssi, float toa);
 
 typedef int trx_lchan_tx_func(struct trx_instance *trx,
        struct trx_ts *ts, struct trx_lchan_state *lchan,
-       uint32_t fn, uint8_t bid, uint16_t *nbits);
+       uint32_t fn, uint8_t bid);
 
 struct trx_lchan_desc {
        /*! \brief TRX Channel Type */

-- 
To view, visit https://gerrit.osmocom.org/6761
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8508676e2cb347396c6ca6b394f13113f3e63084
Gerrit-PatchSet: 1
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <lafo...@gnumonks.org>

Reply via email to