aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Transceiver52M/osmo-trx.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Transceiver52M/osmo-trx.cpp b/Transceiver52M/osmo-trx.cpp
index 7c41780..6e6edfa 100644
--- a/Transceiver52M/osmo-trx.cpp
+++ b/Transceiver52M/osmo-trx.cpp
@@ -60,6 +60,9 @@
#define DEFAULT_DIVERSITY false
#define DEFAULT_CHANS 1
+/* Max number of channels in multi-carrier configuration */
+#define MAX_MCHANS 3
+
struct trx_config {
std::string log_level;
std::string addr;
@@ -167,7 +170,7 @@ bool trx_setup_config(struct trx_config *config)
if (!config->chans)
config->chans = DEFAULT_CHANS;
- if (config->mcbts && ((config->chans < 0) || (config->chans > 5))) {
+ if (config->mcbts && (config->chans > MAX_MCHANS)) {
std::cout << "Unsupported number of channels" << std::endl;
return false;
}