linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org,
	hostap@lists.infradead.org
Subject: Re: [PATCH v3 0/3] mac80211/ath11k: HE mesh support
Date: Fri, 12 Jul 2019 11:36:37 +0200	[thread overview]
Message-ID: <2019422.XptUlqRJNA@bentobox> (raw)
In-Reply-To: <06c7c1a2c8d0f955cb107475d17587c156fb19de.camel@sipsolutions.net>


[-- Attachment #1.1: Type: text/plain, Size: 2822 bytes --]

On Friday, 12 July 2019 09:58:50 CEST Johannes Berg wrote:
> On Wed, 2019-07-03 at 11:23 +0200, Sven Eckelmann wrote:
> > 
> >     ~/tmp/wireshark/build/run/tshark -r /tmp/hwsim-test-logs/latest/wpas_mesh_max_peering.hwsim0.pcapng  -T fields -e wlan.sa -e wlan.mesh.config.cap 'wlan.fc.type_subtype == 8' 
> >     02:00:00:00:01:00       0x00000009
[...]
> > With wireshark 3.0.0:
> > 
> >     tshark -r /tmp/hwsim-test-logs/latest/wpas_mesh_max_peering.hwsim0.pcapng  -T fields -e wlan.sa -e wlan.mesh.config.cap 'wlan.fc.type_subtype == 8' 
> >     02:00:00:00:01:00       0x00000001
[...]
> > So I had to change the wireshark version (see below) which is used by hostapd.
> > (just to document for me what I have forced it to a different version)
> 
> What. +hostap list.
> 
> This makes no sense, is that a tshark bug in one of the versions?

Yes (but more a bug in the ieee80211 dissector), see 
commit f3ef8575d462 ("ieee80211: fix wrong offset for mesh configuration 
capability bitmask") [1].

I've also attached the pcap in case there are still doubts about my statement.

As you can see, it will just fail to parse the mesh peering management element 
correctly. It should parse the last byte of the element payload but it falls 
back to parsing the first byte (path selection protocol) as capabilities. See 
9.4.2.98 "Mesh Configuration element" from 802.11-2016 for details.

There is already a workaround for that in the hostap testcases:

    if all_cap_one:
        # It looks like tshark parser was broken at some point for
        # wlan.mesh.config.cap which is now (tshark 2.6.3) pointing to incorrect
        # field (same as wlan.mesh.config.ps_protocol). This used to work with
        # tshark 2.2.6.
        #
        # For now, assume the capability field ends up being the last octet of
        # the frame.
        one = [0, 0, 0]
        zero = [0, 0, 0]
        addrs = [addr0, addr1, addr2]
        for idx in range(3):
            addr = addrs[idx]
            out = run_tshark_json(capfile, filt + " && wlan.sa == " + addr)
            pkts = json.loads(out)
            for pkt in pkts:
                frame = pkt["_source"]["layers"]["frame_raw"][0]
                cap = int(frame[-2:], 16)
                if cap & 0x01:
                    one[idx] += 1
                else:
                    zero[idx] += 1
        logger.info("one: " + str(one))
        logger.info("zero: " + str(zero))

But maybe you already spotted the problem - it requires that mesh 
configuration element is the last element. Which is not the case here - 
similar to 5GHz tests (where you have most likely a VHT cap/oper element 
after the meshconf_ie).

I hope that this makes more sense now.

Kind regards,
	Sven

[1] https://github.com/wireshark/wireshark/commit/f3ef8575d4620a62f1c4609bf14961c3e78993f3

[-- Attachment #1.2: wpas_mesh_max_peering.hwsim0.pcapng.gz --]
[-- Type: application/x-pcapng, Size: 1793 bytes --]

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2019-07-12  9:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-12 19:35 [PATCH v3 0/3] mac80211/ath11k: HE mesh support Sven Eckelmann
2019-06-12 19:35 ` [PATCH v3 1/3] mac80211_hwsim: Register support for HE meshpoint Sven Eckelmann
2019-06-12 19:35 ` [PATCH v3 2/3] mac80211: implement HE support for mesh Sven Eckelmann
2019-06-14 14:11   ` Johannes Berg
2019-06-14 14:13     ` Sven Eckelmann
2019-06-14 14:14       ` Johannes Berg
2019-06-12 19:35 ` [PATCH v3 3/3] ath11k: register HE mesh capabilities Sven Eckelmann
2019-06-14 14:10 ` [PATCH v3 0/3] mac80211/ath11k: HE mesh support Johannes Berg
2019-07-03  9:23   ` Sven Eckelmann
2019-07-12  7:58     ` Johannes Berg
2019-07-12  9:36       ` Sven Eckelmann [this message]
2019-07-12  9:42         ` Johannes Berg
2019-07-12 10:38           ` Sven Eckelmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2019422.XptUlqRJNA@bentobox \
    --to=sven@narfation.org \
    --cc=ath11k@lists.infradead.org \
    --cc=hostap@lists.infradead.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).