diff options
author | Tom Tsou <tom.tsou@ettus.com> | 2016-07-08 14:39:42 -0700 |
---|---|---|
committer | Tom Tsou <tom.tsou@ettus.com> | 2016-07-08 14:46:25 -0700 |
commit | c37594f3b96a22d440d1ec8f52e0d968fca37185 (patch) | |
tree | 2b1d95726e665d07cd5e4040e847c6288fb59962 /Transceiver52M/radioInterfaceMulti.cpp | |
parent | ffee30d19047a6f6bff061d95c3bbbb21a81098f (diff) |
mcbts: Allow out of order channel setup
Previous checks on multi-channel TSC and ARFCN settings would fail
if channels were initialized out of order. Namely, if channel 0
was not configured first, osmo-trx would error on the control
interface leading osmo-bts to fail.
Allow global TSC setting on all channels with added logging notice.
Notify if channel frequency is unexpected - which may happen if
channels are setup out of order - but do no report as error.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Diffstat (limited to 'Transceiver52M/radioInterfaceMulti.cpp')
-rw-r--r-- | Transceiver52M/radioInterfaceMulti.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Transceiver52M/radioInterfaceMulti.cpp b/Transceiver52M/radioInterfaceMulti.cpp index ba81fe1..650fd85 100644 --- a/Transceiver52M/radioInterfaceMulti.cpp +++ b/Transceiver52M/radioInterfaceMulti.cpp @@ -355,8 +355,10 @@ bool RadioInterfaceMulti::tuneTx(double freq, size_t chan) return mRadio->setTxFreq(freq + shift * MCBTS_SPACING); double center = mRadio->getTxFreq(); - if (!fltcmp(freq, center + (double) (chan - shift) * MCBTS_SPACING)) - return false; + if (!fltcmp(freq, center + (double) (chan - shift) * MCBTS_SPACING)) { + LOG(NOTICE) << "Channel " << chan << " RF frequency offset is " + << freq / 1e6 << " MHz"; + } return true; } @@ -372,8 +374,10 @@ bool RadioInterfaceMulti::tuneRx(double freq, size_t chan) return mRadio->setRxFreq(freq + shift * MCBTS_SPACING); double center = mRadio->getRxFreq(); - if (!fltcmp(freq, center + (double) (chan - shift) * MCBTS_SPACING)) - return false; + if (!fltcmp(freq, center + (double) (chan - shift) * MCBTS_SPACING)) { + LOG(NOTICE) << "Channel " << chan << " RF frequency offset is " + << freq / 1e6 << " MHz"; + } return true; } |