aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2009-04-29 13:01:50 +0000
committerHarald Welte <laforge@gnumonks.org>2009-04-29 13:01:50 +0000
commita432cd3930a3620e881a6d8a81dde028c6c86ecc (patch)
treebebbc3b0c512f5d8588fa50ece490b87613f5e28 /src
parente69f5fb411646798f23d5b77343ec06c748cff1b (diff)
make "PLL mode" setting actually work rather than segfault
Diffstat (limited to 'src')
-rw-r--r--src/abis_nm.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/abis_nm.c b/src/abis_nm.c
index 3cbfd8466..6e0f5bad0 100644
--- a/src/abis_nm.c
+++ b/src/abis_nm.c
@@ -1738,13 +1738,19 @@ int abis_nm_bs11_set_pll_locked(struct gsm_bts *bts, int locked)
{
struct abis_om_hdr *oh;
struct msgb *msg;
+ u_int8_t tlv_value;
msg = nm_msgb_alloc();
oh = (struct abis_om_hdr *) msgb_put(msg, ABIS_OM_FOM_HDR_SIZE);
fill_om_fom_hdr(oh, 3, NM_MT_BS11_SET_ATTR, NM_OC_BS11,
BS11_OBJ_LI, 0x00, 0x00);
- msgb_tlv_put(msg, NM_ATT_BS11_PLL_MODE, 1,
- locked ? BS11_LI_PLL_LOCKED : BS11_LI_PLL_STANDALONE);
+
+ if (locked)
+ tlv_value = BS11_LI_PLL_LOCKED;
+ else
+ tlv_value = BS11_LI_PLL_STANDALONE;
+
+ msgb_tlv_put(msg, NM_ATT_BS11_PLL_MODE, 1, &tlv_value);
return abis_nm_sendmsg(bts, msg);
}