2 * (C) 2010 by Andreas Eversberg <jolly@eversberg.eu>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 #include <osmocom/osmocom_data.h>
28 void gsm_support_init(struct osmocom_ms *ms)
30 struct gsm_support *s = &ms->support;
33 memset(s, 0, sizeof(*s));
35 /* rf power capability */
36 s->pwr_lev_900 = 3; /* CLASS 4: Handheld 2W */
37 s->pwr_lev_1800 = 0; /* CLASS 1: Handheld 1W */
38 /* controlled early classmark sending */
39 s->es_ind = 0; /* no */
41 s->rev_lev = 1; /* phase 2 mobile station */
47 s->sms_ptp = 1; /* yes */
48 /* screening indicator */
49 s->ss_ind = 1; /* phase 2 error handling */
50 /* pseudo synchronised capability */
51 s->ps_cap = 0; /* no */
52 /* CM service prompt */
55 s->solsa = 0; /* no */
56 /* location service support */
57 s->lcsva = 0; /* no */
58 s->loc_serv = 0; /* no */
60 s->a5_1 = 0; /* currently not */
68 s->p_gsm = 0; /* P-GSM only */
69 s->e_gsm = 1; /* E-GSM */
70 s->r_gsm = 0; /* R-GSM only */
72 s->low_capa = 4; /* p,e,r power class */
74 /* set supported frequencies */
75 if (s->e_gsm || s->r_gsm)
77 if (s->p_gsm || s->e_gsm || s->r_gsm)
78 for(i = 1; i <= 124; i++)
79 s->freq_map[i >> 3] |= (1 << (i & 7));
81 for(i = 512; i <= 885; i++)
82 s->freq_map[i >> 3] |= (1 << (i & 7));
84 for(i = 975; i <= 1023; i++)
85 s->freq_map[i >> 3] |= (1 << (i & 7));
87 for(i = 955; i <= 1023; i++)
88 s->freq_map[i >> 3] |= (1 << (i & 7));
89 s->dcs_capa = 1; /* dcs power class */
90 /* multi slot support */
91 s->ms_sup = 0; /* no */
93 s->ucs2_treat = 0; /* default */
94 /* support extended measurements */
95 s->ext_meas = 0; /* no */
96 /* support switched measurement capability */
97 s->meas_cap = 0; /* no */
102 sprintf(s->imei, "000000000000000");
103 sprintf(s->imeisv, "0000000000000000");
106 s->min_rxlev_db = -106;
109 /* (3.2.1) maximum channels to scan within each band */
110 struct gsm_support_scan_max gsm_sup_smax[] = {
119 { 955, 125, 1, 0 }, /* testing with maximum of one frequency */