I'm trying to get rid of all BTS backpointers in libmsc.
In libmsc/gsm_04_08.c, in gsm48_rx_mm_serv_req(), I find:
if (is_siemens_bts(bts)) send_siemens_mrpci(msg->lchan, classmark2-1);
My conclusion so far is that this "hook" should move to the BSC code, but I could use some comforting approval by more apt contenders... Some detail:
send_siemens_mrpci() is found in libbsc/gsm_04_08_utils.c:
int send_siemens_mrpci(struct gsm_lchan *lchan, uint8_t *classmark2_lv) { struct rsl_mrpci mrpci;
if (classmark2_lv[0] < 2) return -EINVAL;
mrpci.power_class = classmark2_lv[1] & 0x7; mrpci.vgcs_capable = classmark2_lv[2] & (1 << 1); mrpci.vbs_capable = classmark2_lv[2] & (1 <<2); mrpci.gsm_phase = (classmark2_lv[1]) >> 5 & 0x3;
return rsl_siemens_mrpci(lchan, &mrpci); }
IIUC the Siemens BS11 BTS needs to be tickled with a vendor-specific RSL message as soon as a CM service request (GSM48_MT_MM_CM_SERV_REQ) or a paging response is received from a subscriber.
Only the BSC knows which BTS is involved, so I'd try to find some place in libbsc/ or osmo-bsc/ to move this away to.
The same function is called from gsm48_handle_paging_resp() in libbsc.
Any shortcuts / workarounds or could this also be dropped entirely? It does look like that particular case is indeed missing from osmo-bsc. Who is this Mister PCI anyway? ;)
The gsm48_handle_paging_resp() function leads me to another, more general question: often, there are two bts pointers around, namely the gsm_subscriber_connection->bts as well as the lchan->ts->trx->bts Are these typically/always/never expected to be the same bts struct? (In this function, both bts pointers are used, and I'd like to understand why.)
Thanks! ~Neels