nr-{ue,}softmodem: Check for correct modes

THere are four possibilities, for the three options (phy_test, do_ra,
nsa):

- None is set -> SA
- Only one is set of each -> corresponding mode

Introduce a function softmodem_verify_mode() to check for these.
This commit is contained in:
Robert Schmidt
2024-11-12 13:55:49 +01:00
parent e0e1ca6583
commit 5d2a1ace17
4 changed files with 23 additions and 11 deletions
+1 -5
View File
@@ -605,11 +605,7 @@ int main( int argc, char **argv ) {
LOG_W(UTIL,
"no SYS_NICE capability: cannot set thread priority and affinity, consider running with sudo for optimum performance\n");
if (get_softmodem_params()->do_ra)
AssertFatal(get_softmodem_params()->phy_test == 0,"RA and phy_test are mutually exclusive\n");
if (get_softmodem_params()->sa)
AssertFatal(get_softmodem_params()->phy_test == 0,"Standalone mode and phy_test are mutually exclusive\n");
softmodem_verify_mode(get_softmodem_params());
#if T_TRACER
T_Config_Init();