Extend novap_reset() to allow both disable and enable
This makes novap_reset() more useful by allowing parameter value 0 to be
used depending on requirement.
Signed-off-by: Priyadharshini Gowthaman <pgowtham@codeaurora.org>
diff --git a/ap.c b/ap.c
index f8c9a72..3d44b8b 100644
--- a/ap.c
+++ b/ap.c
@@ -10264,9 +10264,9 @@
}
-void novap_reset(struct sigma_dut *dut, const char *ifname)
+void novap_reset(struct sigma_dut *dut, const char *ifname, int reset)
{
- run_iwpriv(dut, ifname, "novap_reset 1");
+ run_iwpriv(dut, ifname, "novap_reset %d", reset);
}
@@ -10562,7 +10562,7 @@
basedev = sigma_radio_ifname[0];
/* Disable vap reset between the commands */
- novap_reset(dut, ifname);
+ novap_reset(dut, ifname, 1);
val = get_param(cmd, "Opt_md_notif_ie");
if (val && ath_vht_op_mode_notif(dut, ifname, val) < 0)
diff --git a/sigma_dut.h b/sigma_dut.h
index c88d9c5..6992ec6 100644
--- a/sigma_dut.h
+++ b/sigma_dut.h
@@ -983,7 +983,7 @@
void ath_disable_txbf(struct sigma_dut *dut, const char *intf);
void ath_config_dyn_bw_sig(struct sigma_dut *dut, const char *ifname,
const char *val);
-void novap_reset(struct sigma_dut *dut, const char *ifname);
+void novap_reset(struct sigma_dut *dut, const char *ifname, int reset);
int get_hwaddr(const char *ifname, unsigned char *hwaddr);
enum sigma_cmd_result cmd_ap_config_commit(struct sigma_dut *dut,
struct sigma_conn *conn,
diff --git a/sta.c b/sta.c
index 3e57e08..1a8c071 100644
--- a/sta.c
+++ b/sta.c
@@ -5551,7 +5551,7 @@
}
break;
case DRIVER_ATHEROS:
- novap_reset(dut, intf);
+ novap_reset(dut, intf, 1);
ath_config_dyn_bw_sig(dut, intf, val);
break;
default:
@@ -5563,7 +5563,7 @@
val = get_param(cmd, "RTS_FORCE");
if (val) {
- novap_reset(dut, intf);
+ novap_reset(dut, intf, 1);
if (strcasecmp(val, "Enable") == 0) {
if (sta_set_rts(dut, intf, 64) != 0) {
sigma_dut_print(dut, DUT_MSG_ERROR,
@@ -7853,7 +7853,7 @@
} else if (!mcs32 && rate) {
switch (get_driver_type()) {
case DRIVER_ATHEROS:
- novap_reset(dut, intf);
+ novap_reset(dut, intf, 1);
ath_sta_set_11nrates(dut, intf, rate);
break;
default:
@@ -11151,7 +11151,7 @@
const char *val;
char *token = NULL, *result;
- novap_reset(dut, intf);
+ novap_reset(dut, intf, 1);
val = get_param(cmd, "nss_mcs_opt");
if (val) {