From: Ramasamy Kaliappan <ramasamy.kaliappan@oss.qualcomm.com>
To: Benjamin Berg <benjamin@sipsolutions.net>,
linux-wireless@vger.kernel.org
Cc: Benjamin Berg <benjamin.berg@intel.com>
Subject: Re: [PATCH wireless-next v2 8/8] wifi: mac80211: pass error station if non-STA transmit was requested
Date: Thu, 6 Aug 2026 22:32:32 +0530 [thread overview]
Message-ID: <071404cb-3d65-4e12-8396-f86973673278@oss.qualcomm.com> (raw)
In-Reply-To: <20260803143005.e05860849ef7.I5ffe7bc0d4ccefca5c1e506d5d3d482e13989cda@changeid>
On 8/3/2026 6:00 PM, Benjamin Berg wrote:
> From: Benjamin Berg <benjamin.berg@intel.com>
>
> When cfg80211 requested a transmit without a station, pass an error
> station to ieee80211_tx_skb_tid instead of the correct one.
>
> Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
>
> ---
>
> v1:
> * Only pass error station if NO_STA flag is set
> ---
> net/mac80211/offchannel.c | 13 +++++++++----
> 1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c
> index 5cec8747b193..653710576831 100644
> --- a/net/mac80211/offchannel.c
> +++ b/net/mac80211/offchannel.c
> @@ -854,8 +854,10 @@ int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
> need_offchan = true;
>
> rcu_read_lock();
> - sta = sta_info_get_bss(sdata, mgmt->da);
> - mlo_sta = sta && sta->sta.mlo;
> + if (!params->no_sta) {
> + sta = sta_info_get_bss(sdata, mgmt->da);
> + mlo_sta = sta && sta->sta.mlo;
> + }
>
> if (!ieee80211_is_action(mgmt->frame_control) ||
> mgmt->u.action.category == WLAN_CATEGORY_PUBLIC ||
> @@ -884,7 +886,8 @@ int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
> local->ops->remain_on_channel &&
> memcmp(sdata->vif.cfg.ap_addr, mgmt->bssid, ETH_ALEN))) {
> need_offchan = true;
> - } else if (sdata->u.mgd.associated &&
> + } else if (!params->no_sta &&
> + sdata->u.mgd.associated &&
> ether_addr_equal(sdata->vif.cfg.ap_addr, mgmt->da)) {
> sta = sta_info_get_bss(sdata, mgmt->da);
> mlo_sta = sta && sta->sta.mlo;
> @@ -1022,7 +1025,9 @@ int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
> }
>
> if (!need_offchan) {
> - ieee80211_tx_skb_tid(sdata, skb, NULL, 7, link_id);
> + ieee80211_tx_skb_tid(sdata, skb,
> + params->no_sta ? sta : ERR_PTR(-ENOENT),
While testing this patch, I observed failures in some existing hwsim
802.1X/EAP/DSCP test cases.
The logic seems odd to me: params->no_sta ? sta : ERR_PTR(-ENOENT)
Since sta_info_get_bss() is skipped when params->no_sta is set,
shouldn't we pass ERR_PTR(-ENOENT) when params->no_sta is true and sta
otherwise?
This may be related to the hwsim failures I'm seeing?
> + 7, link_id);
> ret = 0;
> goto out_unlock;
> }
Thanks,
Ramasamy
next prev parent reply other threads:[~2026-08-06 17:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-03 12:30 [PATCH wireless-next v2 0/8] Adding NO_STA flag and reworking RX link resolution Benjamin Berg
2026-08-03 12:30 ` [PATCH wireless-next v2 1/8] wifi: iwlwifi: use link_sta internally to the driver Benjamin Berg
2026-08-03 12:30 ` [PATCH wireless-next v2 2/8] wifi: mac80211: change public RX API to use link stations Benjamin Berg
2026-08-04 13:39 ` Jeff Johnson
2026-08-03 12:30 ` [PATCH wireless-next v2 3/8] wifi: mac80211: refactor RX link_id and station handling Benjamin Berg
2026-08-03 12:30 ` [PATCH wireless-next v2 4/8] wifi: mac80211: rework RX packet handling Benjamin Berg
2026-08-03 12:30 ` [PATCH wireless-next v2 5/8] wifi: cfg80211: add attribute for TX/RX denoting there is no station Benjamin Berg
2026-08-03 12:30 ` [PATCH wireless-next v2 6/8] wifi: mac80211: report to cfg80211 when no STA is known for a frame Benjamin Berg
2026-08-03 12:30 ` [PATCH wireless-next v2 7/8] wifi: mac80211: pass station to ieee80211_tx_skb_tid Benjamin Berg
2026-08-03 12:30 ` [PATCH wireless-next v2 8/8] wifi: mac80211: pass error station if non-STA transmit was requested Benjamin Berg
2026-08-06 17:02 ` Ramasamy Kaliappan [this message]
2026-08-04 1:54 ` [PATCH wireless-next v2 0/8] Adding NO_STA flag and reworking RX link resolution Jeff Johnson
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=071404cb-3d65-4e12-8396-f86973673278@oss.qualcomm.com \
--to=ramasamy.kaliappan@oss.qualcomm.com \
--cc=benjamin.berg@intel.com \
--cc=benjamin@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