bug fixes for tests

This commit is contained in:
2019-10-22 15:46:28 +02:00
parent 45012df95b
commit 8006043a97
6 changed files with 111 additions and 70 deletions

View File

@ -1620,6 +1620,7 @@ int setNetworkParameter(enum NETWORKINDEX mode, int value) {
return ((bus_r(CONFIG_REG) & CONFIG_TDMA_TIMESLOT_MSK) >> CONFIG_TDMA_TIMESLOT_OFST);
case FLOWCTRL_10G:
if (value >= 0) {
if (value == 0) {
FILE_LOG(logINFO, ("Switching off 10G flow control\n"));
bus_w(CONFIG_REG, bus_r(CONFIG_REG) &~ CONFIG_ETHRNT_FLW_CNTRL_MSK);
@ -1627,6 +1628,7 @@ int setNetworkParameter(enum NETWORKINDEX mode, int value) {
FILE_LOG(logINFO, ("Switching on 10G flow control\n"));
bus_w(CONFIG_REG, bus_r(CONFIG_REG) | CONFIG_ETHRNT_FLW_CNTRL_MSK);
}
}
return ((bus_r(CONFIG_REG) & CONFIG_ETHRNT_FLW_CNTRL_MSK) >> CONFIG_ETHRNT_FLW_CNTRL_OFST);
default:

View File

@ -4729,7 +4729,11 @@ int set_num_interfaces(int file_des) {
#else
// only set
if (Server_VerifyLock() == OK) {
if (check_detector_idle() == OK) {
if (arg < 1 || arg > 2) {
ret = FAIL;
sprintf(mess, "Could not number of interfaces to %d. Options[1, 2]\n", arg);
FILE_LOG(logERROR,(mess));
} else if (check_detector_idle() == OK) {
if (getNumberofUDPInterfaces() != arg) {
setNumberofUDPInterfaces(arg);
calculate_and_set_position(); // aleady configures mac
@ -4774,7 +4778,11 @@ int set_interface_sel(int file_des) {
#else
// only set
if (Server_VerifyLock() == OK) {
if (check_detector_idle() == OK) {
if (arg < 0 || arg > 1) {
ret = FAIL;
sprintf(mess, "Could not set primary interface %d. Options[0, 1]\n", arg);
FILE_LOG(logERROR,(mess));
} else if (check_detector_idle() == OK) {
if (getPrimaryInterface() != arg) {
selectPrimaryInterface(arg);
configure_mac();