From: Johannes Berg <johannes@sipsolutions.net>
To: Alexander Wilhelm <alexander.wilhelm@westermo.com>
Cc: Jeff Johnson <jjohnson@kernel.org>,
ath12k@lists.infradead.org, linux-wireless@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: ath12k: handling of HE and EHT capabilities
Date: Thu, 12 Mar 2026 13:10:21 +0100 [thread overview]
Message-ID: <e8960517faf04ed4f1bf331e23a95c477113309f.camel@sipsolutions.net> (raw)
In-Reply-To: <40b4b959b2ea5afd55381e6ae2d0c1908456734c.camel@sipsolutions.net>
Wait ...
> > I don’t see this in the function. For example, the MAC capabilities are a
> > `u16 *` in CPU endianness, which is simply memcpy’d from the parsed
> > `NL80211_BAND_IFTYPE_ATTR_HE_CAP_MAC`. Later, they are treated as `u16 *`,
> > as shown in the following code:
> >
> > printf("%s\t\tHE MAC Capabilities (0x", pre);
> > for (i = 0; i < 3; i++)
> > printf("%04x", mac_cap[i]);
> > printf("):\n");
That's incorrect for sure. But iw code now actually reads
printf("%s\t\tHE MAC Capabilities (0x", pre);
for (i = 0; i < 3; i++)
printf("%04x", le16toh(mac_cap[i]));
printf("):\n");
which is correct. HE PHY capabilities are printed as
printf("%s\t\tHE PHY Capabilities: (0x", pre);
for (i = 0; i < 11; i++)
printf("%02x", ((__u8 *)phy_cap)[i + 1]);
in my version of the code, and it seems to me the +1 is incorrect either
way?
> printf("%s\t\tEHT MAC Capabilities (0x", pre);
> for (i = 0; i < 2; i++)
> printf("%02x", mac_cap[i]);
This was also correct, not incorrect as I stated, since mac_cap is u8 *,
and EHT PHY capabilities are cast to u8 * first.
Maybe your iw is just really old?
johannes
next prev parent reply other threads:[~2026-03-12 12:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-12 9:02 ath12k: handling of HE and EHT capabilities Alexander Wilhelm
2026-03-12 9:37 ` Johannes Berg
2026-03-12 10:53 ` Alexander Wilhelm
2026-03-12 11:05 ` Johannes Berg
2026-03-12 12:10 ` Johannes Berg [this message]
2026-03-12 13:00 ` Alexander Wilhelm
2026-03-13 7:45 ` Alexander Wilhelm
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=e8960517faf04ed4f1bf331e23a95c477113309f.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=alexander.wilhelm@westermo.com \
--cc=ath12k@lists.infradead.org \
--cc=jjohnson@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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