From: Jouni Malinen Date: Thu, 30 Jun 2016 09:52:50 +0000 (+0300) Subject: tests: MBO WNM token wrap around X-Git-Tag: hostap_2_6~271 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=mech_eap.git;a=commitdiff_plain;h=3e3f1602b5ad7ad932525b12bce9568026564e6e tests: MBO WNM token wrap around Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_mbo.py b/tests/hwsim/test_mbo.py index ba34b68..1923bd3 100644 --- a/tests/hwsim/test_mbo.py +++ b/tests/hwsim/test_mbo.py @@ -122,6 +122,23 @@ def test_mbo_cell_capa_update_pmf(dev, apdev): if sta['mbo_cell_capa'] != '3': raise Exception("mbo_cell_capa not updated properly") +def test_mbo_wnm_token_wrap(dev, apdev): + """MBO WNM token wrap around""" + ssid = "test-wnm-mbo" + params = { 'ssid': ssid, 'mbo': '1' } + hapd = hostapd.add_ap(apdev[0], params) + bssid = apdev[0]['bssid'] + + dev[0].connect(ssid, key_mgmt="NONE", scan_freq="2412") + + # Trigger transmission of 256 WNM-Notification frames to wrap around the + # 8-bit mbo_wnm_token counter. + for i in range(128): + if "OK" not in dev[0].request("SET mbo_cell_capa 1"): + raise Exception("Failed to set STA as cellular data capable") + if "OK" not in dev[0].request("SET mbo_cell_capa 3"): + raise Exception("Failed to set STA as cellular data not-capable") + @remote_compatible def test_mbo_non_pref_chan(dev, apdev): """MBO non-preferred channel list"""