Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Priyansha Tiwari <priyansha.tiwari@oss.qualcomm.com>
Cc: linux-wireless@vger.kernel.org, quic_drohan@quicinc.com
Subject: Re: [PATCH wireless-next v3 3/4] wifi: mac80211: implement STA-mode peer probing
Date: Thu, 04 Jun 2026 12:47:08 +0200	[thread overview]
Message-ID: <6307cf0a5cb768d1f34da4dd4ea8ef5751b0ba68.camel@sipsolutions.net> (raw)
In-Reply-To: <20260507171603.1007812-4-pritiwa@qti.qualcomm.com>

On Thu, 2026-05-07 at 22:46 +0530, Priyansha Tiwari wrote:


> +	guard(rcu)();

You're rewriting the whole thing anyway - we have wiphy lock here, so we
don't really need RCU at all. Can just use wiphy_dereference() or
similar below, no?


> +	case NL80211_IFTYPE_STATION:
> +	case NL80211_IFTYPE_P2P_CLIENT:
> +		if (ieee80211_vif_is_mld(&sdata->vif)) {
> +			link_id = IEEE80211_LINK_UNSPECIFIED;
> +			peer_addr = sdata->vif.cfg.ap_addr;
> +			src_addr = sdata->vif.addr;
> +			band = 0;
> +			sta = sta_info_get(sdata, sdata->vif.cfg.ap_addr);
> +		} else {
> +			link_id = 0;
> +			conf = rcu_dereference(sdata->vif.link_conf[0]);
> +			if (!conf)
> +				return -ENOLINK;
> +			band = conf->chanreq.oper.chan->band;
> +			peer_addr = conf->bssid;
> +			src_addr = conf->addr;
> +			sta = sta_info_get_bss(sdata, peer_addr);
>  		}

This whole logic seems too much - the non-MLO case really should be a
subset of the MLO case anyway, because e.g. conf->bssid will definitely
be the same as sdata->vif.cfg.ap_addr, so you shouldn't really need
(most of?) this distinction.

Equally I don't think we need link_id=0 in the non-MLO case, fully non-
MLO drivers won't be looking at it anyway, and MLO drivers should be
able to deal with the UNSPECIFIED.

That leaves only really the band to be potentially set differently.
Ideally some unification with the AP side is possible there.

> -		band = chanctx_conf->def.chan->band;
> -		link_id = 0;
> +		qos = sta ? sta->sta.wme : false;
> +		fromds = false;
> +		break;

I see the check in cfg80211, but it just feels completely wrong to have
to do "sta ? ..." here when it should be connected.

Better to just refuse the operation when there's no 'sta' for the AP
found.

johannes

  reply	other threads:[~2026-06-04 10:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-07 17:15 [PATCH wireless-next v3 0/4] wifi: nl80211: introduce PROBE_PEER for AP and STA Priyansha Tiwari
2026-05-07 17:16 ` [PATCH wireless-next v3 1/4] wifi: nl80211/cfg80211: rename probe_client to probe_peer Priyansha Tiwari
2026-05-07 17:16 ` [PATCH wireless-next v3 2/4] wifi: cfg80211/nl80211: add STA-mode peer probing Priyansha Tiwari
2026-06-04 10:40   ` Johannes Berg
2026-05-07 17:16 ` [PATCH wireless-next v3 3/4] wifi: mac80211: implement " Priyansha Tiwari
2026-06-04 10:47   ` Johannes Berg [this message]
2026-05-07 17:16 ` [PATCH wireless-next v3 4/4] wifi: mac80211_hwsim: report TX status link_id Priyansha Tiwari

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=6307cf0a5cb768d1f34da4dd4ea8ef5751b0ba68.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=priyansha.tiwari@oss.qualcomm.com \
    --cc=quic_drohan@quicinc.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