aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2009-06-20 18:15:19 +0200
committerHarald Welte <laforge@gnumonks.org>2009-06-20 19:22:18 +0200
commitfcd2445d05e24c20310790ef0041c8cbe6e6546d (patch)
tree7cde37b69818798fa0cb712401854f3c358f9ac6 /openbsc/include/openbsc
parenta865f1b0c99b3c3ed2d0bb5973738024b62630cc (diff)
Introduce BS and MS power control related functions
* add bts->band field plus corresponding VTY and commandline argument * add trx->nominal_power and trx->max_power_red fields * add rsl_chan_bs_power_ctrl() to control TRX RF power for a given TS * add rsl_chan_ms_power_ctrl() to control MS RF power for a given lchan.
Diffstat (limited to 'openbsc/include/openbsc')
-rw-r--r--openbsc/include/openbsc/abis_rsl.h3
-rw-r--r--openbsc/include/openbsc/gsm_data.h14
2 files changed, 17 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/abis_rsl.h b/openbsc/include/openbsc/abis_rsl.h
index 532595b90..c928ffa2d 100644
--- a/openbsc/include/openbsc/abis_rsl.h
+++ b/openbsc/include/openbsc/abis_rsl.h
@@ -411,5 +411,8 @@ int rsl_ccch_conf_to_bs_cc_chans(int ccch_conf);
int rsl_ccch_conf_to_bs_ccch_sdcch_comb(int ccch_conf);
int rsl_number_of_paging_subchannels(struct gsm_bts *bts);
+int rsl_chan_bs_power_ctrl(struct gsm_lchan *lchan, unsigned int fpc, int db);
+int rsl_chan_ms_power_ctrl(struct gsm_lchan *lchan, unsigned int fpc, int dbm);
+
#endif /* RSL_MT_H */
diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h
index a401a4780..8c44ba54d 100644
--- a/openbsc/include/openbsc/gsm_data.h
+++ b/openbsc/include/openbsc/gsm_data.h
@@ -3,6 +3,14 @@
#include <sys/types.h>
+enum gsm_band {
+ GSM_BAND_400,
+ GSM_BAND_850,
+ GSM_BAND_900,
+ GSM_BAND_1800,
+ GSM_BAND_1900,
+};
+
enum gsm_phys_chan_config {
GSM_PCHAN_NONE,
GSM_PCHAN_CCCH,
@@ -223,6 +231,8 @@ struct gsm_bts_trx {
} bb_transc;
u_int16_t arfcn;
+ int nominal_power; /* in dBm */
+ unsigned int max_power_red; /* in actual dB */
union {
struct {
@@ -301,6 +311,7 @@ struct gsm_bts {
u_int8_t bsic;
/* type of BTS */
enum gsm_bts_type type;
+ enum gsm_band band;
/* how do we talk OML with this TRX? */
struct e1inp_sign_link *oml_link;
@@ -396,6 +407,9 @@ const char *btstype2str(enum gsm_bts_type type);
struct gsm_bts *gsm_bts_by_lac(struct gsm_network *net, unsigned int lac,
struct gsm_bts *start_bts);
+char *gsm_band_name(enum gsm_band band);
+enum gsm_band gsm_band_parse(int mhz);
+
static inline int is_ipaccess_bts(struct gsm_bts *bts)
{
switch (bts->type) {