sta_set_wireless: Add separate error prints on RTS_FORCE error cases
This makes the error message show which case failed.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
diff --git a/sta.c b/sta.c
index 3d382b7..8dbadd8 100644
--- a/sta.c
+++ b/sta.c
@@ -3243,19 +3243,22 @@
if (val) {
if (strcasecmp(val, "Enable") == 0) {
snprintf(buf, sizeof(buf), "iwconfig %s rts 64", intf);
+ if (system(buf) != 0) {
+ sigma_dut_print(dut, DUT_MSG_ERROR,
+ "Failed to set RTS_FORCE 64");
+ }
} else if (strcasecmp(val, "Disable") == 0) {
snprintf(buf, sizeof(buf), "iwconfig %s rts 2347",
intf);
+ if (system(buf) != 0) {
+ sigma_dut_print(dut, DUT_MSG_ERROR,
+ "Failed to set RTS_FORCE 2347");
+ }
} else {
send_resp(dut, conn, SIGMA_ERROR,
"ErrorCode,RTS_FORCE value not supported");
return 0;
}
-
- if (system(buf) != 0) {
- sigma_dut_print(dut, DUT_MSG_ERROR,
- "Failed to set RTS_FORCE");
- }
}
val = get_param(cmd, "CTS_WIDTH");