remove obsolete gsm_subscriber_connection.bts member
This member was merely a cache for conn->lchan->ts->trx->bts,
so let's avoid having to keep copies of the same data (which needs
to be kept up to date).
Change-Id: Id3bff8b18425ef5d45eb460ac9eb620023013ba0
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index d9dd2d4..bdf7cfb 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -96,9 +96,6 @@
struct gsm_lchan *lchan;
/* the future/allocated but not yet used lchan during HANDOVER */
struct gsm_lchan *ho_lchan;
- /* a short-hand pointer to the BTS currently serving the subscriber,
- * points to gsm_subscriber_connection.lchan->ts->trx->bts */
- struct gsm_bts *bts;
/* timer for assignment handling */
struct osmo_timer_list T10;
@@ -116,13 +113,14 @@
struct llist_head ho_penalty_timers;
};
-static inline struct gsm_bts *conn_get_bts(struct gsm_subscriber_connection *conn) {
- return conn->bts;
-}
-
#include "gsm_data_shared.h"
+static inline struct gsm_bts *conn_get_bts(struct gsm_subscriber_connection *conn) {
+ OSMO_ASSERT(conn->lchan);
+ return conn->lchan->ts->trx->bts;
+}
+
enum {
BTS_CTR_CHREQ_TOTAL,
BTS_CTR_CHREQ_NO_CHANNEL,