[PATCH] hostapd: mbo: ctrl iface allow more reasons

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Seems we could use more mbo assoc disallow
reasons.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@xxxxxxxxx>
---
 hostapd/ctrl_iface.c    | 2 +-
 tests/hwsim/test_mbo.py | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
index 128fa9538..1edfe1923 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -1504,7 +1504,7 @@ static int hostapd_ctrl_iface_set(struct hostapd_data *hapd, char *cmd)
 			return -1;
 
 		val = atoi(value);
-		if (val < 0 || val > 1)
+		if (val < 0 || val > MBO_ASSOC_DISALLOW_REASON_LOW_RSSI)
 			return -1;
 
 		hapd->mbo_assoc_disallow = val;
diff --git a/tests/hwsim/test_mbo.py b/tests/hwsim/test_mbo.py
index 36efd6a0e..d4426ac4b 100644
--- a/tests/hwsim/test_mbo.py
+++ b/tests/hwsim/test_mbo.py
@@ -203,8 +203,8 @@ def test_mbo_assoc_disallow(dev, apdev, params):
     hapd2 = hostapd.add_ap(apdev[1], {"ssid": "MBO", "mbo": "1"})
 
     logger.debug("Set mbo_assoc_disallow with invalid value")
-    if "FAIL" not in hapd1.request("SET mbo_assoc_disallow 2"):
-        raise Exception("Set mbo_assoc_disallow for AP1 succeeded unexpectedly with value 2")
+    if "FAIL" not in hapd1.request("SET mbo_assoc_disallow 6"):
+        raise Exception("Set mbo_assoc_disallow for AP1 succeeded unexpectedly with value 6")
 
     logger.debug("Disallow associations to AP1 and allow association to AP2")
     if "OK" not in hapd1.request("SET mbo_assoc_disallow 1"):
-- 
2.25.1


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux