> > Commit cdeea70f59d0 added wpa_s configuration options allowing HT STBC > > modifications for RX/TX spatial streams. Add tests to verify > > overriding of default HT STBC configuration for Tx and Rx > > spatial streams for hwsim driver. > > > > The test flow is straightforward: use wpa_s 'tx_stbc' and 'rx_stbc' > > configuration options to override default HT Rx/Tx STBC settings > > and check HT capabilities IEs in ASSOC frames. > > The following tests have been added: > > > > - ap_ht_stbc_disabled > > make sure that HT Rx/Tx STBC is disabled by default for hwsim driver > > This fails for me: > > START ap_ht_stbc_disabled 2/4 > Exception: STA[0]: TX STBC should be disabled, actual value: 1 > Exception: STA[0]: TX STBC should be disabled, actual value: 1 > FAIL ap_ht_stbc_disabled 0.260623 2019-12-30 16:37:16.001906 > > > - ap_ht_stbc_tx > > make sure that Tx STBC can be properly enabled for hwsim driver > > using wpa_s 'tx_stbc' configuration option > > This passed. > > > - ap_ht_stbc_rx > > make sure that Tx STBC can be properly enabled for hwsim driver > > using wpa_s 'tx_stbc' configuration option > > This fails: > > START ap_ht_stbc_rx 4/4 > Exception: STA[0]: RX STBC expected 1, actual 3 > Exception: STA[0]: RX STBC expected 1, actual 3 > FAIL ap_ht_stbc_rx 0.26011 2019-12-30 16:37:16.421911 > > > What is the expected behavior for these with the current mac80211 > snapshot? > > > This patch depends on the following hwsim driver change: > > https://patchwork.kernel.org/patch/10752835/ > > This and a fix to that (commit e9f33a8fee53, "mac80211: fix RX STBC > override byte order") are included in the kernel version I tested with. Hi Jouni, I rebased the patch with tests on the top of the latest hostapd source tree (commit 8296ee18053c, "RSN IBSS: Fix EAPOL TX using control port") and checked new tests as well as all the other HT tests. For testing I used the latest mac80211-next kernel: commit 1ee7826ab68f, "mac80211: Remove redundant assertion". All the necessary STBC changes and fixes are included in that kernel. IIUC, the test procedure is a standard one to use for hwsim tests: $ git clone git://w1.fi/hostap.git $ cd hostap/tests/hwsim $ ./build.sh $ ./start.sh $ sudo ./run-tests.py ap_ht_stbc* $ sudo ./run-tests.py -f ap_ht In my case all 4 STBC tests passed. I attached rebased patch with STBC tests. In comparison with v1, this patch does not modify your original test_ap_ht_stbc test. It just adds three more STBC tests including test_ap_ht_stbc_rx, test_ap_ht_stbc_tx, test_ap_ht_stbc_disabled. That is why 4 STBC tests. If it still does not work for you, then could you please share a bit more details about your test setup: kernel tree/version, platform. So that I can try and reproduce the issue on my side. Regards, Sergey --- tests/hwsim/test_ap_ht.py | 67 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/tests/hwsim/test_ap_ht.py b/tests/hwsim/test_ap_ht.py index 14c53666f..08d184dd8 100644 --- a/tests/hwsim/test_ap_ht.py +++ b/tests/hwsim/test_ap_ht.py @@ -9,12 +9,14 @@ import time import logging logger = logging.getLogger() import struct +import os import hostapd from wpasupplicant import WpaSupplicant from utils import HwsimSkip, alloc_fail, parse_ie, clear_regdom import hwsim_utils from test_ap_csa import csa_supported +from tshark import run_tshark def clear_scan_cache(apdev): ifname = apdev['ifname'] @@ -903,6 +905,71 @@ def test_ap_ht_stbc(dev, apdev): dev[2].connect("ht", key_mgmt="NONE", scan_freq="2412", rx_stbc="1", tx_stbc="1") +def test_ap_ht_stbc_disabled(dev, apdev, p): + """HT STBC overrides: RX/TX STBC is disabled by default""" + params = {"ssid": "ht"} + hapd = hostapd.add_ap(apdev[0], params) + + dev[0].connect("ht", key_mgmt="NONE", scan_freq="2412") + dev[1].connect("ht", key_mgmt="NONE", scan_freq="2412", tx_stbc="-1", rx_stbc="-1") + dev[2].connect("ht", key_mgmt="NONE", scan_freq="2412", tx_stbc="0", rx_stbc="0") + + capfile = os.path.join(p['logdir'], "hwsim0.pcapng") + filt = "wlan.sa==%s && wlan.fc.type_subtype == 0x0" + + for sta in [0, 1, 2]: + res = run_tshark(capfile, filt % dev[sta].own_addr(), [ "wlan.ht.capabilities.txstbc" ]) + res = res.splitlines() + res = [int(x) for x in res] + for tx_stbc in res: + if tx_stbc != 0: + raise Exception("STA[%d]: TX STBC should be disabled, actual value: %d" % (sta, tx_stbc)) + + res = run_tshark(capfile, filt % dev[sta].own_addr(), [ "wlan.ht.capabilities.rxstbc" ]) + res = res.splitlines() + res = [int(x, 16) for x in res] + for rx_stbc in res: + if rx_stbc != 0: + raise Exception("STA[%d]: RX STBC should be disabled, actual value: %d" % (sta, rx_stbc)) + +def test_ap_ht_stbc_tx(dev, apdev, p): + """HT STBC overrides: verify TX STBC configuration""" + params = { "ssid": "ht" } + hapd = hostapd.add_ap(apdev[0], params) + + dev[0].connect("ht", key_mgmt="NONE", scan_freq="2412", tx_stbc="1") + + capfile = os.path.join(p['logdir'], "hwsim0.pcapng") + filt = "wlan.sa==%s && wlan.fc.type_subtype == 0x0" + + res = run_tshark(capfile, filt % dev[0].own_addr(), [ "wlan.ht.capabilities.txstbc" ]) + res = res.splitlines() + res = [int(x) for x in res] + for tx_stbc in res: + if tx_stbc != 1: + raise Exception("TX STBC should be enabled, actual value: %d" % tx_stbc) + +def test_ap_ht_stbc_rx(dev, apdev, p): + """HT STBC overrides: verify RX STBC configuration""" + params = { "ssid": "ht" } + hapd = hostapd.add_ap(apdev[0], params) + + dev[0].connect("ht", key_mgmt="NONE", scan_freq="2412", rx_stbc="1") + dev[1].connect("ht", key_mgmt="NONE", scan_freq="2412", rx_stbc="2") + dev[2].connect("ht", key_mgmt="NONE", scan_freq="2412", rx_stbc="3") + + capfile = os.path.join(p['logdir'], "hwsim0.pcapng") + filt = "wlan.sa==%s && wlan.fc.type_subtype == 0x0" + + for sta in [0, 1, 2]: + res = run_tshark(capfile, filt % dev[sta].own_addr(), [ "wlan.ht.capabilities.rxstbc" ]) + res = res.splitlines() + res = [int(x, 16) for x in res] + expected = sta + 1 + for actual in res: + if actual != expected: + raise Exception("STA[%d]: RX STBC expected %d, actual %d" % (sta, expected, actual)) + @remote_compatible def test_ap_require_ht_limited_rates(dev, apdev): """Require HT with limited supported rates""" -- 2.11.0 _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap