aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2009-08-10 09:51:40 +0200
committerHarald Welte <laforge@gnumonks.org>2009-08-10 09:51:40 +0200
commit67fa91bf427a3ef7a835561abc7f40b291ce843f (patch)
tree363687d1cc94e49ffe38ae3ae18257f806d3354a /openbsc
parentd5d1cef7c26a830c056b5f6b1611497252ec521f (diff)
Add function to generate siemens-specific MRPCI RSL message
MRPCI (MS RF Power Indicator) informs the BTS about the power capabilities of the MS.
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/include/openbsc/abis_rsl.h34
-rw-r--r--openbsc/src/abis_rsl.c16
2 files changed, 49 insertions, 1 deletions
diff --git a/openbsc/include/openbsc/abis_rsl.h b/openbsc/include/openbsc/abis_rsl.h
index 49dd7731c..e9c60b52a 100644
--- a/openbsc/include/openbsc/abis_rsl.h
+++ b/openbsc/include/openbsc/abis_rsl.h
@@ -154,6 +154,11 @@ enum abis_rsl_msgtype {
RSL_MT_IPAC_DISCONNECT_NACK,
};
+/* Siemens vendor-specific */
+enum abis_rsl_msgtype_siemens {
+ RSL_MT_SIEMENS_MRPCI = 0x41,
+};
+
/* Chapter 9.3 */
enum abis_rsl_ie {
RSL_IE_CHAN_NR = 0x01,
@@ -203,7 +208,7 @@ enum abis_rsl_ie {
RSL_IE_CBCH_LOAD_INFO,
RSL_IE_SMSCB_CHAN_INDICATOR,
RSL_IE_GROUP_CALL_REF,
- RSL_IE_CHAN_DESC,
+ RSL_IE_CHAN_DESC = 0x30,
RSL_IE_NCH_DRX_INFO,
RSL_IE_CMD_INDICATOR,
RSL_IE_EMLPP_PRIO,
@@ -216,7 +221,10 @@ enum abis_rsl_ie {
RSL_IE_RTD,
RSL_IE_TFO_STATUS,
RSL_IE_LLP_APDU,
+ /* Siemens vendor-specific */
+ RSL_IE_SIEMENS_MRPCI = 0x40,
+ /* ip.access */
RSL_IE_IPAC_SRTP_CONFIG = 0xe0,
RSL_IE_IPAC_PROXY_UDP = 0xe1,
RSL_IE_IPAC_BSCMPL_TOUT = 0xe2,
@@ -479,6 +487,30 @@ int rsl_data_request(struct msgb *msg, u_int8_t link_id);
int rsl_establish_request(struct gsm_lchan *lchan, u_int8_t link_id);
int rsl_relase_request(struct gsm_lchan *lchan, u_int8_t link_id);
+/* Siemens vendor-specific RSL extensions */
+struct rsl_mrpci {
+ u_int8_t power_class:3,
+ vgcs_capable:1,
+ vbs_capable:1,
+ gsm_phase:2;
+} __attribute__ ((packed));
+
+enum rsl_mrpci_pwrclass {
+ RSL_MRPCI_PWRC_1 = 0,
+ RSL_MRPCI_PWRC_2 = 1,
+ RSL_MRPCI_PWRC_3 = 2,
+ RSL_MRPCI_PWRC_4 = 3,
+ RSL_MRPCI_PWRC_5 = 4,
+};
+enum rsl_mrpci_phase {
+ RSL_MRPCI_PHASE_1 = 0,
+ /* reserved */
+ RSL_MRPCI_PHASE_2 = 2,
+ RSL_MRPCI_PHASE_2PLUS = 3,
+};
+
+int rsl_siemens_mrpci(struct gsm_lchan *lchan, u_int8_t mrpci);
+
/* ip.access specfic RSL extensions */
int rsl_ipacc_bind(struct gsm_lchan *lchan);
int rsl_ipacc_connect(struct gsm_lchan *lchan, u_int32_t ip,
diff --git a/openbsc/src/abis_rsl.c b/openbsc/src/abis_rsl.c
index 33da2ecdb..1ef0b84c8 100644
--- a/openbsc/src/abis_rsl.c
+++ b/openbsc/src/abis_rsl.c
@@ -105,6 +105,7 @@ static const struct tlv_definition rsl_att_tlvdef = {
[RSL_IE_RTD] = { TLV_TYPE_TV },
[RSL_IE_TFO_STATUS] = { TLV_TYPE_TV },
[RSL_IE_LLP_APDU] = { TLV_TYPE_TLV },
+ [RSL_IE_SIEMENS_MRPCI] = { TLV_TYPE_TV },
[RSL_IE_IPAC_PROXY_UDP] = { TLV_TYPE_FIXED, 2 },
[RSL_IE_IPAC_BSCMPL_TOUT] = { TLV_TYPE_TV },
[RSL_IE_IPAC_REMOTE_IP] = { TLV_TYPE_FIXED, 4 },
@@ -743,6 +744,21 @@ int rsl_imm_assign_cmd(struct gsm_bts *bts, u_int8_t len, u_int8_t *val)
return abis_rsl_sendmsg(msg);
}
+/* Send Siemens specific MS RF Power Capability Indication */
+int rsl_siemens_mrpci(struct gsm_lchan *lchan, u_int8_t mrpci)
+{
+ struct msgb *msg = rsl_msgb_alloc();
+ struct abis_rsl_dchan_hdr *dh;
+
+ dh = (struct abis_rsl_dchan_hdr *) msgb_put(msg, sizeof(*dh));
+ init_dchan_hdr(dh, RSL_MT_SIEMENS_MRPCI);
+ dh->chan_nr = lchan2chan_nr(lchan);
+ msgb_tv_put(msg, RSL_IE_SIEMENS_MRPCI, mrpci);
+
+ return abis_rsl_sendmsg(msg);
+}
+
+
/* Send "DATA REQUEST" message with given L3 Info payload */
/* Chapter 8.3.1 */
int rsl_data_request(struct msgb *msg, u_int8_t link_id)