From: Johannes Berg <johannes@sipsolutions.net>
To: Peddolla Harshavardhan Reddy <peddolla.reddy@oss.qualcomm.com>
Cc: linux-wireless@vger.kernel.org, kavita.kavita@oss.qualcomm.com
Subject: Re: [PATCH wireless-next v4 11/14] wifi: cfg80211: add PD-specific preamble and bandwidth capabilities
Date: Tue, 14 Apr 2026 10:35:54 +0200 [thread overview]
Message-ID: <aaab6a224b82a8fd1b255f1546ea142d68653b50.camel@sipsolutions.net> (raw)
In-Reply-To: <20260320175938.2547288-12-peddolla.reddy@oss.qualcomm.com>
On Fri, 2026-03-20 at 23:29 +0530, Peddolla Harshavardhan Reddy wrote:
> +++ b/net/wireless/nl80211.c
> @@ -2482,6 +2482,20 @@ nl80211_send_pmsr_ftm_capa(const struct cfg80211_pmsr_capabilities *cap,
> cap->pd_max_peer_rsta_role))
> return -ENOBUFS;
> }
> +
> + if (nla_put_u32(msg, NL80211_PMSR_FTM_CAPA_ATTR_PD_EDCA_PREAMBLES,
> + cap->ftm.pd_edca_preambles))
> + return -ENOBUFS;
> + if (nla_put_u32(msg, NL80211_PMSR_FTM_CAPA_ATTR_PD_NTB_PREAMBLES,
> + cap->ftm.pd_ntb_preambles))
> + return -ENOBUFS;
> + if (nla_put_u32(msg, NL80211_PMSR_FTM_CAPA_ATTR_PD_EDCA_BANDWIDTHS,
> + cap->ftm.pd_edca_bandwidths))
> + return -ENOBUFS;
> + if (nla_put_u32(msg, NL80211_PMSR_FTM_CAPA_ATTR_PD_NTB_BANDWIDTHS,
> + cap->ftm.pd_ntb_bandwidths))
> + return -ENOBUFS;
That probably should be contingent on pd_support or so, otherwise you
end up with a bunch of zero values in userspace, which is odd?
> + if (out->ftm.pd_request &&
> + !(rdev->wiphy.pmsr_capa->ftm.pd_edca_bandwidths & BIT(out->chandef.width)) &&
> + !(rdev->wiphy.pmsr_capa->ftm.pd_ntb_bandwidths & BIT(out->chandef.width))) {
> + NL_SET_ERR_MSG(info->extack, "FTM: unsupported bandwidth for pd request");
> + return -EINVAL;
> + }
This seems odd to me, why are you adding *two* fields when they're never
treated differently? Shouldn't you check if it's an NTB or EDCA request?
> + if (out->ftm.pd_request &&
> + !(capa->ftm.pd_ntb_preambles & BIT(preamble)) &&
> + !(capa->ftm.pd_edca_preambles & BIT(preamble))) {
> + NL_SET_ERR_MSG_ATTR(info->extack,
> + tb[NL80211_PMSR_FTM_REQ_ATTR_PREAMBLE],
> + "FTM: invalid preamble for PD request");
> + return -EINVAL;
> + }
>
Same here.
johannes
next prev parent reply other threads:[~2026-04-14 8:36 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-20 17:59 [PATCH wireless-next v4 00/14] wifi: Ranging support enhancements Peddolla Harshavardhan Reddy
2026-03-20 17:59 ` [PATCH wireless-next v4 01/14] wifi: cfg80211: restrict LMR feedback check to TB and non-TB ranging Peddolla Harshavardhan Reddy
2026-03-20 17:59 ` [PATCH wireless-next v4 02/14] wifi: cfg80211: cancel pmsr_free_wk in cfg80211_pmsr_wdev_down Peddolla Harshavardhan Reddy
2026-03-20 17:59 ` [PATCH wireless-next v4 03/14] wifi: cfg80211: Add MAC address filter to remain_on_channel Peddolla Harshavardhan Reddy
2026-03-20 17:59 ` [PATCH wireless-next v4 04/14] wifi: cfg80211/mac80211: Add NL80211_IFTYPE_PD for PD PASN and PMSR operations Peddolla Harshavardhan Reddy
2026-03-20 17:59 ` [PATCH wireless-next v4 05/14] wifi: cfg80211: add start/stop proximity detection commands Peddolla Harshavardhan Reddy
2026-03-20 17:59 ` [PATCH wireless-next v4 06/14] wifi: cfg80211: add proximity detection capabilities to PMSR Peddolla Harshavardhan Reddy
2026-03-20 17:59 ` [PATCH wireless-next v4 07/14] wifi: cfg80211: add NTB continuous ranging and FTM PD request support Peddolla Harshavardhan Reddy
2026-03-20 17:59 ` [PATCH wireless-next v4 08/14] wifi: cfg80211: extend PMSR FTM response for proximity ranging Peddolla Harshavardhan Reddy
2026-03-20 17:59 ` [PATCH wireless-next v4 09/14] wifi: cfg80211: add role-based PD peer limits Peddolla Harshavardhan Reddy
2026-03-20 17:59 ` [PATCH wireless-next v4 10/14] wifi: cfg80211: add ingress/egress distance thresholds for FTM Peddolla Harshavardhan Reddy
2026-03-20 17:59 ` [PATCH wireless-next v4 11/14] wifi: cfg80211: add PD-specific preamble and bandwidth capabilities Peddolla Harshavardhan Reddy
2026-04-14 8:35 ` Johannes Berg [this message]
2026-03-20 17:59 ` [PATCH wireless-next v4 12/14] wifi: cfg80211: allow suppressing FTM result reporting for PD requests Peddolla Harshavardhan Reddy
2026-03-20 17:59 ` [PATCH wireless-next v4 13/14] wifi: cfg80211: add LTF keyseed support for secure ranging Peddolla Harshavardhan Reddy
2026-03-20 17:59 ` [PATCH wireless-next v4 14/14] wifi: mac80211_hwsim: Add support for extended FTM ranging Peddolla Harshavardhan Reddy
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=aaab6a224b82a8fd1b255f1546ea142d68653b50.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=kavita.kavita@oss.qualcomm.com \
--cc=linux-wireless@vger.kernel.org \
--cc=peddolla.reddy@oss.qualcomm.com \
/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