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>
This commit is contained in:
parent
ffee30d190
commit
c37594f3b9
|
@ -841,9 +841,8 @@ void Transceiver::driveControl(size_t chan)
|
|||
sscanf(buffer, "%3s %s %d", cmdcheck, command, &TSC);
|
||||
if ((TSC < 0) || (TSC > 7))
|
||||
sprintf(response, "RSP SETTSC 1 %d", TSC);
|
||||
else if (chan && (TSC != mTSC))
|
||||
sprintf(response, "RSP SETTSC 1 %d", TSC);
|
||||
else {
|
||||
LOG(NOTICE) << "Changing TSC from " << mTSC << " to " << TSC;
|
||||
mTSC = TSC;
|
||||
sprintf(response,"RSP SETTSC 0 %d", TSC);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue