blob: 81de84f711a4d3c7f5b4a3cba419f9c90eb8e4d4 [file] [log] [blame]
Harald Welte52b1f982008-12-23 20:25:15 +00001#ifndef _GSM_DATA_H
2#define _GSM_DATA_H
3
4#include <sys/types.h>
5
Harald Weltefcd24452009-06-20 18:15:19 +02006enum gsm_band {
7 GSM_BAND_400,
8 GSM_BAND_850,
9 GSM_BAND_900,
10 GSM_BAND_1800,
11 GSM_BAND_1900,
12};
13
Harald Welte4bfdfe72009-06-10 23:11:52 +080014enum gsm_phys_chan_config {
15 GSM_PCHAN_NONE,
16 GSM_PCHAN_CCCH,
17 GSM_PCHAN_CCCH_SDCCH4,
18 GSM_PCHAN_TCH_F,
19 GSM_PCHAN_TCH_H,
20 GSM_PCHAN_SDCCH8_SACCH8C,
21 GSM_PCHAN_UNKNOWN,
22};
23
24enum gsm_chan_t {
25 GSM_LCHAN_NONE,
26 GSM_LCHAN_SDCCH,
27 GSM_LCHAN_TCH_F,
28 GSM_LCHAN_TCH_H,
29 GSM_LCHAN_UNKNOWN,
30};
31
32
33/* Channel Request reason */
34enum gsm_chreq_reason_t {
35 GSM_CHREQ_REASON_EMERG,
36 GSM_CHREQ_REASON_PAG,
37 GSM_CHREQ_REASON_CALL,
38 GSM_CHREQ_REASON_LOCATION_UPD,
39 GSM_CHREQ_REASON_OTHER,
40};
41
Harald Welte255539c2008-12-28 02:26:27 +000042#include <openbsc/timer.h>
Holger Freyther1adb4ff2009-02-04 00:04:52 +000043#include <openbsc/gsm_04_08.h>
Harald Welte9943c5b2009-07-29 15:41:29 +020044#include <openbsc/abis_rsl.h>
Harald Welte4bfdfe72009-06-10 23:11:52 +080045#include <openbsc/mncc.h>
Harald Welte93e9d172009-06-20 19:04:31 +020046#include <openbsc/tlv.h>
Harald Welte255539c2008-12-28 02:26:27 +000047
Harald Welte8470bf22008-12-25 23:28:35 +000048#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
49
Harald Welte85770c72009-01-18 17:47:32 +000050#define TRX_NR_TS 8
Harald Welte8470bf22008-12-25 23:28:35 +000051#define TS_MAX_LCHAN 8
Harald Welte52b1f982008-12-23 20:25:15 +000052
53#define HARDCODED_ARFCN 123
Harald Welte02b0e092009-02-28 13:11:07 +000054#define HARDCODED_TSC 7
Harald Welte78f2f502009-05-23 16:56:52 +000055#define HARDCODED_BSIC 0x3f /* NCC = 7 / BCC = 7 */
Harald Welte52b1f982008-12-23 20:25:15 +000056
Harald Welte63589be2009-08-06 17:38:10 +020057/* for multi-drop config */
58#define HARDCODED_BTS0_TS 1
59#define HARDCODED_BTS1_TS 6
60#define HARDCODED_BTS2_TS 11
61
Harald Welte8e1e3ee2009-02-01 13:32:45 +000062enum gsm_hooks {
63 GSM_HOOK_NM_SWLOAD,
Harald Welte0932d1e2009-02-16 22:53:52 +000064 GSM_HOOK_RR_PAGING,
65};
66
67enum gsm_paging_event {
68 GSM_PAGING_SUCCEEDED,
69 GSM_PAGING_EXPIRED,
Holger Freyther85a7b362009-04-18 13:48:55 +020070 GSM_PAGING_OOM,
Harald Welte8e1e3ee2009-02-01 13:32:45 +000071};
72
73struct msgb;
74typedef int gsm_cbfn(unsigned int hooknum,
75 unsigned int event,
76 struct msgb *msg,
77 void *data, void *param);
78
Holger Freytherc6ea9db2008-12-30 19:18:21 +000079/*
80 * Use the channel. As side effect the lchannel recycle timer
81 * will be started.
82 */
Harald Welteb9c758b2009-07-05 14:02:46 +020083#define LCHAN_RELEASE_TIMEOUT 20, 0
Holger Freytherc6ea9db2008-12-30 19:18:21 +000084#define use_lchan(lchan) \
85 do { lchan->use_count++; \
Holger Freyther4f584c32009-06-02 02:55:07 +000086 DEBUGP(DCC, "lchan (bts=%d,trx=%d,ts=%d,ch=%d) increases usage to: %d\n", \
87 lchan->ts->trx->bts->nr, lchan->ts->trx->nr, lchan->ts->nr, \
88 lchan->nr, lchan->use_count); \
Harald Welteff117a82009-05-23 05:22:08 +000089 bsc_schedule_timer(&lchan->release_timer, LCHAN_RELEASE_TIMEOUT); } while(0);
Holger Freytherc6ea9db2008-12-30 19:18:21 +000090
91#define put_lchan(lchan) \
Holger Freyther4f584c32009-06-02 02:55:07 +000092 do { lchan->use_count--; \
93 DEBUGP(DCC, "lchan (bts=%d,trx=%d,ts=%d,ch=%d) decreases usage to: %d\n", \
94 lchan->ts->trx->bts->nr, lchan->ts->trx->nr, lchan->ts->nr, \
95 lchan->nr, lchan->use_count); \
96 } while(0);
97
Holger Freytherc6ea9db2008-12-30 19:18:21 +000098
Harald Welte52b1f982008-12-23 20:25:15 +000099/* communications link with a BTS */
100struct gsm_bts_link {
101 struct gsm_bts *bts;
102};
103
Harald Welte49f48b82009-02-17 15:29:33 +0000104struct gsm_lchan;
105struct gsm_subscriber;
Harald Welte4bfdfe72009-06-10 23:11:52 +0800106struct gsm_mncc;
Harald Welte805f6442009-07-28 18:25:29 +0200107struct rtp_socket;
Harald Welte49f48b82009-02-17 15:29:33 +0000108
Harald Weltebbcc7a52009-02-14 19:45:44 +0000109/* Network Management State */
110struct gsm_nm_state {
111 u_int8_t operational;
112 u_int8_t administrative;
Harald Welte8c1d0e42009-02-15 03:38:12 +0000113 u_int8_t availability;
Harald Weltebbcc7a52009-02-14 19:45:44 +0000114};
Harald Weltebbcc7a52009-02-14 19:45:44 +0000115
Holger Freyther73487a22008-12-31 18:53:57 +0000116/*
117 * LOCATION UPDATING REQUEST state
118 *
119 * Our current operation is:
120 * - Get imei/tmsi
121 * - Accept/Reject according to global policy
122 */
123struct gsm_loc_updating_operation {
124 struct timer_list updating_timer;
125 int waiting_for_imsi : 1;
126 int waiting_for_imei : 1;
127};
128
Harald Welte8470bf22008-12-25 23:28:35 +0000129struct gsm_lchan {
130 /* The TS that we're part of */
131 struct gsm_bts_trx_ts *ts;
132 /* The logical subslot number in the TS */
133 u_int8_t nr;
Harald Welte45b407a2009-05-23 15:51:12 +0000134 /* The logical channel type */
Harald Welte8470bf22008-12-25 23:28:35 +0000135 enum gsm_chan_t type;
Harald Welte9943c5b2009-07-29 15:41:29 +0200136 /* RSL channel mode */
137 enum rsl_cmod_spd rsl_cmode;
Harald Welte45b407a2009-05-23 15:51:12 +0000138 /* If TCH, traffic channel mode */
Harald Welte9943c5b2009-07-29 15:41:29 +0200139 enum gsm48_chan_mode tch_mode;
Harald Welted4c9bf32009-02-15 16:56:18 +0000140 /* Power levels for MS and BTS */
141 u_int8_t bs_power;
142 u_int8_t ms_power;
143
Harald Welte8470bf22008-12-25 23:28:35 +0000144 /* To whom we are allocated at the moment */
145 struct gsm_subscriber *subscr;
Holger Freytherc6ea9db2008-12-30 19:18:21 +0000146
147 /* Timer started to release the channel */
148 struct timer_list release_timer;
Harald Weltea3d04382008-12-27 17:02:56 +0000149
Harald Welteb7e81162009-08-10 00:26:10 +0200150 struct timer_list T3101;
151
Holger Freyther73487a22008-12-31 18:53:57 +0000152 /*
153 * Operations that have a state and might be pending
154 */
155 struct gsm_loc_updating_operation *loc_operation;
156
Holger Freytherb7193e42008-12-29 17:44:08 +0000157 /* use count. how many users use this channel */
158 unsigned int use_count;
Harald Welte8470bf22008-12-25 23:28:35 +0000159};
160
Harald Welte85770c72009-01-18 17:47:32 +0000161struct gsm_e1_subslot {
162 /* Number of E1 link */
163 u_int8_t e1_nr;
164 /* Number of E1 TS inside E1 link */
165 u_int8_t e1_ts;
166 /* Sub-slot within the E1 TS, 0xff if full TS */
167 u_int8_t e1_ts_ss;
168};
169
Harald Welte52b1f982008-12-23 20:25:15 +0000170#define BTS_TRX_F_ACTIVATED 0x0001
171/* One Timeslot in a TRX */
172struct gsm_bts_trx_ts {
173 struct gsm_bts_trx *trx;
174 /* number of this timeslot at the TRX */
175 u_int8_t nr;
176
Harald Welte8470bf22008-12-25 23:28:35 +0000177 enum gsm_phys_chan_config pchan;
178
Harald Welte52b1f982008-12-23 20:25:15 +0000179 unsigned int flags;
Harald Weltebbcc7a52009-02-14 19:45:44 +0000180 struct gsm_nm_state nm_state;
Harald Welte93e9d172009-06-20 19:04:31 +0200181 struct tlv_parsed nm_attr;
Harald Welte39c7deb2009-08-09 21:49:48 +0200182 u_int8_t nm_chan_comb;
Harald Welte8470bf22008-12-25 23:28:35 +0000183
Harald Welte85770c72009-01-18 17:47:32 +0000184 /* To which E1 subslot are we connected */
185 struct gsm_e1_subslot e1_link;
Harald Welte75099262009-02-16 21:12:08 +0000186 struct {
187 u_int32_t bound_ip;
188 u_int16_t bound_port;
Harald Welte20855542009-07-12 09:50:35 +0200189 u_int8_t rtp_payload2;
190 u_int16_t conn_id;
Harald Welte805f6442009-07-28 18:25:29 +0200191 struct rtp_socket *rtp_socket;
Harald Welte75099262009-02-16 21:12:08 +0000192 } abis_ip;
Harald Welte85770c72009-01-18 17:47:32 +0000193
Harald Welte8470bf22008-12-25 23:28:35 +0000194 struct gsm_lchan lchan[TS_MAX_LCHAN];
Harald Welte52b1f982008-12-23 20:25:15 +0000195};
196
197/* One TRX in a BTS */
198struct gsm_bts_trx {
Harald Weltee441d9c2009-06-21 16:17:15 +0200199 /* list header in bts->trx_list */
200 struct llist_head list;
201
Harald Welte52b1f982008-12-23 20:25:15 +0000202 struct gsm_bts *bts;
203 /* number of this TRX in the BTS */
204 u_int8_t nr;
Harald Welte1fa60c82009-02-09 18:13:26 +0000205 /* how do we talk RSL with this TRX? */
Harald Welte42581822009-08-08 16:12:58 +0200206 struct gsm_e1_subslot rsl_e1_link;
207 u_int8_t rsl_tei;
Harald Welte1fa60c82009-02-09 18:13:26 +0000208 struct e1inp_sign_link *rsl_link;
Harald Welte42581822009-08-08 16:12:58 +0200209
Harald Weltebbcc7a52009-02-14 19:45:44 +0000210 struct gsm_nm_state nm_state;
Harald Welte93e9d172009-06-20 19:04:31 +0200211 struct tlv_parsed nm_attr;
Harald Welte8c1d0e42009-02-15 03:38:12 +0000212 struct {
213 struct gsm_nm_state nm_state;
214 } bb_transc;
Harald Welte52b1f982008-12-23 20:25:15 +0000215
216 u_int16_t arfcn;
Harald Weltefcd24452009-06-20 18:15:19 +0200217 int nominal_power; /* in dBm */
218 unsigned int max_power_red; /* in actual dB */
Harald Welte8b697c72009-06-05 19:18:45 +0000219
220 union {
221 struct {
222 struct {
223 struct gsm_nm_state nm_state;
224 } bbsig;
225 struct {
226 struct gsm_nm_state nm_state;
227 } pa;
228 } bs11;
229 };
Harald Welte85770c72009-01-18 17:47:32 +0000230 struct gsm_bts_trx_ts ts[TRX_NR_TS];
Harald Welte52b1f982008-12-23 20:25:15 +0000231};
232
Harald Welte978cb422009-01-18 17:57:27 +0000233enum gsm_bts_type {
234 GSM_BTS_TYPE_UNKNOWN,
235 GSM_BTS_TYPE_BS11,
Harald Weltebbcc7a52009-02-14 19:45:44 +0000236 GSM_BTS_TYPE_NANOBTS_900,
237 GSM_BTS_TYPE_NANOBTS_1800,
Harald Welte978cb422009-01-18 17:57:27 +0000238};
239
Holger Freytherceb59b72009-02-06 18:54:00 +0000240/**
241 * A pending paging request
242 */
243struct gsm_paging_request {
Harald Welte0932d1e2009-02-16 22:53:52 +0000244 /* list_head for list of all paging requests */
Holger Freytherceb59b72009-02-06 18:54:00 +0000245 struct llist_head entry;
Harald Welte0932d1e2009-02-16 22:53:52 +0000246 /* the subscriber which we're paging. Later gsm_paging_request
247 * should probably become a part of the gsm_subscriber struct? */
Holger Freytherceb59b72009-02-06 18:54:00 +0000248 struct gsm_subscriber *subscr;
Harald Welte0932d1e2009-02-16 22:53:52 +0000249 /* back-pointer to the BTS on which we are paging */
Holger Freytherceb59b72009-02-06 18:54:00 +0000250 struct gsm_bts *bts;
Harald Welte0932d1e2009-02-16 22:53:52 +0000251 /* what kind of channel type do we ask the MS to establish */
Holger Freytherceb59b72009-02-06 18:54:00 +0000252 int chan_type;
Harald Weltecd06bfb2009-02-10 17:33:56 +0000253
254 /* Timer 3113: how long do we try to page? */
255 struct timer_list T3113;
Harald Welte0932d1e2009-02-16 22:53:52 +0000256
257 /* callback to be called in case paging completes */
258 gsm_cbfn *cbfn;
259 void *cbfn_param;
Holger Freytherceb59b72009-02-06 18:54:00 +0000260};
Harald Weltecd06bfb2009-02-10 17:33:56 +0000261#define T3113_VALUE 60, 0
Holger Freytherceb59b72009-02-06 18:54:00 +0000262
263/*
264 * This keeps track of the paging status of one BTS. It
265 * includes a number of pending requests, a back pointer
266 * to the gsm_bts, a timer and some more state.
267 */
268struct gsm_bts_paging_state {
Holger Freytherceb59b72009-02-06 18:54:00 +0000269 /* pending requests */
270 struct llist_head pending_requests;
271 struct gsm_paging_request *last_request;
272 struct gsm_bts *bts;
273
Harald Welte75a1fa82009-02-17 01:39:41 +0000274 struct timer_list work_timer;
275
Holger Freyther392209c2009-02-10 00:06:19 +0000276 /* load */
277 u_int16_t available_slots;
Holger Freytherceb59b72009-02-06 18:54:00 +0000278};
279
Harald Welte8b697c72009-06-05 19:18:45 +0000280struct gsm_envabtse {
281 struct gsm_nm_state nm_state;
282};
283
Harald Welte52b1f982008-12-23 20:25:15 +0000284/* One BTS */
285struct gsm_bts {
Harald Weltee441d9c2009-06-21 16:17:15 +0200286 /* list header in net->bts_list */
287 struct llist_head list;
288
Harald Welte52b1f982008-12-23 20:25:15 +0000289 struct gsm_network *network;
290 /* number of ths BTS in network */
291 u_int8_t nr;
292 /* location area code of this BTS */
293 u_int8_t location_area_code;
Harald Welte02b0e092009-02-28 13:11:07 +0000294 /* Training Sequence Code */
295 u_int8_t tsc;
Harald Welte78f2f502009-05-23 16:56:52 +0000296 /* Base Station Identification Code (BSIC) */
297 u_int8_t bsic;
Harald Welte978cb422009-01-18 17:57:27 +0000298 /* type of BTS */
299 enum gsm_bts_type type;
Harald Weltefcd24452009-06-20 18:15:19 +0200300 enum gsm_band band;
Harald Welte1fa60c82009-02-09 18:13:26 +0000301 /* how do we talk OML with this TRX? */
Harald Welte42581822009-08-08 16:12:58 +0200302 struct gsm_e1_subslot oml_e1_link;
303 u_int8_t oml_tei;
Harald Welte1fa60c82009-02-09 18:13:26 +0000304 struct e1inp_sign_link *oml_link;
Harald Welte52b1f982008-12-23 20:25:15 +0000305
306 /* Abis network management O&M handle */
307 struct abis_nm_h *nmh;
Harald Weltebbcc7a52009-02-14 19:45:44 +0000308 struct gsm_nm_state nm_state;
Harald Welte93e9d172009-06-20 19:04:31 +0200309 struct tlv_parsed nm_attr;
Harald Welte978cb422009-01-18 17:57:27 +0000310
Harald Welte52b1f982008-12-23 20:25:15 +0000311 /* number of this BTS on given E1 link */
312 u_int8_t bts_nr;
313
Holger Freyther1adb4ff2009-02-04 00:04:52 +0000314 struct gsm48_control_channel_descr chan_desc;
315
Holger Freytherceb59b72009-02-06 18:54:00 +0000316 /* paging state and control */
317 struct gsm_bts_paging_state paging;
318
Harald Welte52b1f982008-12-23 20:25:15 +0000319 /* CCCH is on C0 */
320 struct gsm_bts_trx *c0;
Harald Weltebbcc7a52009-02-14 19:45:44 +0000321
322 struct {
323 struct gsm_nm_state nm_state;
324 } site_mgr;
Harald Welteedb37782009-05-01 14:59:07 +0000325
326 /* ip.accesss Unit ID's have Site/BTS/TRX layout */
Harald Welte7b26bcb2009-05-28 11:39:21 +0000327 union {
328 struct {
329 u_int16_t site_id;
330 u_int16_t bts_id;
331 } ip_access;
332 struct {
333 struct {
334 struct gsm_nm_state nm_state;
335 } cclk;
336 struct {
337 struct gsm_nm_state nm_state;
338 } rack;
Harald Welte8b697c72009-06-05 19:18:45 +0000339 struct gsm_envabtse envabtse[4];
Harald Welte7b26bcb2009-05-28 11:39:21 +0000340 } bs11;
341 };
Harald Weltebbcc7a52009-02-14 19:45:44 +0000342
Harald Welte52b1f982008-12-23 20:25:15 +0000343 /* transceivers */
344 int num_trx;
Harald Weltee441d9c2009-06-21 16:17:15 +0200345 struct llist_head trx_list;
Harald Welte52b1f982008-12-23 20:25:15 +0000346};
347
Harald Welte52b1f982008-12-23 20:25:15 +0000348struct gsm_network {
349 /* global parameters */
Harald Welteb84e2f42008-12-28 23:42:04 +0000350 u_int16_t country_code;
351 u_int16_t network_code;
Harald Weltec6ba9c22008-12-30 18:01:02 +0000352 char *name_long;
353 char *name_short;
Harald Welte52b1f982008-12-23 20:25:15 +0000354
Harald Welte4bfdfe72009-06-10 23:11:52 +0800355 /* layer 4 */
356 int (*mncc_recv) (struct gsm_network *net, int msg_type, void *arg);
357 struct llist_head upqueue;
358 struct llist_head trans_list;
359
Harald Welte52b1f982008-12-23 20:25:15 +0000360 unsigned int num_bts;
Harald Weltee441d9c2009-06-21 16:17:15 +0200361 struct llist_head bts_list;
Harald Welte52b1f982008-12-23 20:25:15 +0000362};
363
Harald Welte7e310b12009-03-30 20:56:32 +0000364#define SMS_HDR_SIZE 128
365#define SMS_TEXT_SIZE 256
366struct gsm_sms {
367 u_int64_t id;
368 struct gsm_subscriber *sender;
369 struct gsm_subscriber *receiver;
370
Harald Welteb9c758b2009-07-05 14:02:46 +0200371 unsigned long validity_minutes;
Harald Welte76042182009-08-08 16:03:15 +0200372 u_int8_t reply_path_req;
373 u_int8_t status_rep_req;
374 u_int8_t ud_hdr_ind;
375 u_int8_t protocol_id;
376 u_int8_t data_coding_scheme;
377 u_int8_t msg_ref;
378 char dest_addr[20+1]; /* DA LV is 12 bytes max, i.e. 10 bytes
379 * BCD == 20 bytes string */
380 u_int8_t user_data_len;
381 u_int8_t user_data[SMS_TEXT_SIZE];
Harald Weltef3efc592009-07-27 20:11:35 +0200382
Harald Welte7e310b12009-03-30 20:56:32 +0000383 char text[SMS_TEXT_SIZE];
384};
385
Harald Weltee441d9c2009-06-21 16:17:15 +0200386struct gsm_network *gsm_network_init(u_int16_t country_code, u_int16_t network_code,
Harald Welte4bfdfe72009-06-10 23:11:52 +0800387 int (*mncc_recv)(struct gsm_network *, int, void *));
Harald Weltee441d9c2009-06-21 16:17:15 +0200388struct gsm_bts *gsm_bts_alloc(struct gsm_network *net, enum gsm_bts_type type,
389 u_int8_t tsc, u_int8_t bsic);
390struct gsm_bts_trx *gsm_bts_trx_alloc(struct gsm_bts *bts);
391
392struct gsm_bts *gsm_bts_num(struct gsm_network *net, int num);
393struct gsm_bts_trx *gsm_bts_trx_num(struct gsm_bts *bts, int num);
Harald Welte8470bf22008-12-25 23:28:35 +0000394
Harald Weltea72c98e2009-01-04 16:10:38 +0000395const char *gsm_pchan_name(enum gsm_phys_chan_config c);
Harald Welte65da9122009-08-07 00:32:22 +0200396enum gsm_phys_chan_config gsm_pchan_parse(const char *name);
Harald Weltea72c98e2009-01-04 16:10:38 +0000397const char *gsm_lchan_name(enum gsm_chan_t c);
398const char *gsm_chreq_name(enum gsm_chreq_reason_t c);
Harald Welte23a68632009-02-19 17:06:42 +0000399char *gsm_ts_name(struct gsm_bts_trx_ts *ts);
Harald Weltea72c98e2009-01-04 16:10:38 +0000400
Harald Weltead384642008-12-26 10:20:07 +0000401enum gsm_e1_event {
402 EVT_E1_NONE,
Harald Welte1fa60c82009-02-09 18:13:26 +0000403 EVT_E1_TEI_UP,
404 EVT_E1_TEI_DN,
Harald Weltead384642008-12-26 10:20:07 +0000405};
406
Harald Weltecd06bfb2009-02-10 17:33:56 +0000407void set_ts_e1link(struct gsm_bts_trx_ts *ts, u_int8_t e1_nr,
408 u_int8_t e1_ts, u_int8_t e1_ts_ss);
Harald Welte1d014a52009-08-08 15:38:29 +0200409enum gsm_bts_type parse_btstype(const char *arg);
Holger Hans Peter Freyther2dceae62009-06-12 17:39:38 +0200410const char *btstype2str(enum gsm_bts_type type);
Harald Weltebe991492009-05-23 13:56:40 +0000411struct gsm_bts *gsm_bts_by_lac(struct gsm_network *net, unsigned int lac,
412 struct gsm_bts *start_bts);
Harald Welte32201c12009-03-10 12:15:10 +0000413
Harald Weltefcd24452009-06-20 18:15:19 +0200414char *gsm_band_name(enum gsm_band band);
Harald Welte42581822009-08-08 16:12:58 +0200415enum gsm_band gsm_band_parse(const char *mhz);
Harald Weltefcd24452009-06-20 18:15:19 +0200416
Andreas Eversberg8226fa72009-06-29 15:19:38 +0200417extern void *tall_bsc_ctx;
Harald Welte2cf161b2009-06-20 22:36:41 +0200418
Harald Welte32201c12009-03-10 12:15:10 +0000419static inline int is_ipaccess_bts(struct gsm_bts *bts)
420{
421 switch (bts->type) {
422 case GSM_BTS_TYPE_NANOBTS_900:
423 case GSM_BTS_TYPE_NANOBTS_1800:
424 return 1;
425 default:
426 break;
427 }
428 return 0;
429}
430
Harald Welte5b570672009-08-10 10:08:01 +0200431static inline int is_siemens_bts(struct gsm_bts *bts)
432{
433 switch (bts->type) {
434 case GSM_BTS_TYPE_BS11:
435 return 1;
436 default:
437 break;
438 }
439
440 return 0;
441}
442
Harald Welte52b1f982008-12-23 20:25:15 +0000443#endif