[paging] Move the paging state into struct gsm_bts

There is a 1:1 relationship between gsm_bts and the paging
operation. Move the paging state into the gsm_bts which is
simplfying the code a lot. This was hinted by LaF0rge.

(I'm not happy with the names of the structs)

diff --git a/include/openbsc/gsm_data.h b/include/openbsc/gsm_data.h
index 621f116..75b3db5 100644
--- a/include/openbsc/gsm_data.h
+++ b/include/openbsc/gsm_data.h
@@ -176,6 +176,36 @@
 	GSM_BTS_TYPE_BS11,
 };
 
+/**
+ * A pending paging request 
+ */
+struct gsm_paging_request {
+	struct llist_head entry;
+	struct gsm_subscriber *subscr;
+	struct gsm_bts *bts;
+	int requests;
+
+	int chan_type;
+};
+
+/*
+ * This keeps track of the paging status of one BTS. It
+ * includes a number of pending requests, a back pointer
+ * to the gsm_bts, a timer and some more state.
+ */
+struct gsm_bts_paging_state {
+	/* public callbacks */
+	void (*channel_allocated)(struct gsm_lchan *lchan);
+
+	/* pending requests */
+	struct llist_head pending_requests;
+	struct gsm_paging_request *last_request;
+	struct gsm_bts *bts;
+
+	/* tick timer */
+	struct timer_list page_timer;
+};
+
 /* One BTS */
 struct gsm_bts {
 	struct gsm_network *network;
@@ -194,6 +224,9 @@
 
 	struct gsm48_control_channel_descr chan_desc;
 
+	/* paging state and control */
+	struct gsm_bts_paging_state paging;
+
 	/* CCCH is on C0 */
 	struct gsm_bts_trx *c0;
 	/* transceivers */
diff --git a/include/openbsc/paging.h b/include/openbsc/paging.h
index 884d163..44361f7 100644
--- a/include/openbsc/paging.h
+++ b/include/openbsc/paging.h
@@ -29,39 +29,8 @@
 #include "gsm_subscriber.h"
 #include "timer.h"
 
-/**
- * A pending paging request 
- */
-struct paging_request {
-	struct llist_head entry;
-	struct gsm_subscriber *subscr;
-	struct gsm_bts *bts;
-	int requests;
-
-	int chan_type;
-};
-
-/*
- * struct for each bts we serve...
- */
-struct paging_bts {
-	/* public callbacks */
-	void (*channel_allocated)(struct gsm_lchan *lchan);
-
-	/* list for each bts */
-	struct llist_head bts_list;
-
-	/* pending requests */
-	struct llist_head pending_requests;
-	struct paging_request *last_request;
-	struct gsm_bts *bts;
-
-	/* tick timer */
-	struct timer_list page_timer;
-};
-
 /* call once for every gsm_bts... */
-struct paging_bts* page_allocate(struct gsm_bts *bts);
+void page_init(struct gsm_bts *bts);
 
 /* schedule paging request */
 void page_request(struct gsm_bts *bts, struct gsm_subscriber *subscr, int type);