From: Pooventhiran G <pooventhiran.g@oss.qualcomm.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
pooventhiran.g@oss.qualcomm.com
Subject: [PATCH wireless-next v5 15/19] wifi: mac80211: pass rx_data directly from ieee80211_rx_list()
Date: Wed, 02 Dec 2026 15:58:10 +0530 [thread overview]
Message-ID: <20261202-smd-v5-15-1b020be65c7c@oss.qualcomm.com> (raw)
In-Reply-To: <20261202-smd-v5-0-1b020be65c7c@oss.qualcomm.com>
rx_data is currently defined inside __ieee80211_rx_handle_packet() and
is passed to the rx handlers called inside. Define it early in
ieee80211_rx_list() so that new transient data that live just between
the driver and mac80211 interface layer can be passed to the rx handlers
as well.
Signed-off-by: Pooventhiran G <pooventhiran.g@oss.qualcomm.com>
---
net/mac80211/rx.c | 60 +++++++++++++++++++++++++++----------------------------
1 file changed, 30 insertions(+), 30 deletions(-)
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index a152471151a9..d7d662c9ccd5 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -5432,7 +5432,8 @@ ieee80211_link_from_freq(struct ieee80211_sub_if_data *sdata, int freq)
static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
struct ieee80211_link_sta *link_pubsta,
struct sk_buff *skb,
- struct list_head *list)
+ struct list_head *list,
+ struct ieee80211_rx_data *rx)
__must_hold_shared(RCU)
{
struct ieee80211_local *local = hw_to_local(hw);
@@ -5442,16 +5443,14 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
struct link_sta_info *link_sta;
struct sta_info *sta;
__le16 fc;
- struct ieee80211_rx_data rx;
struct rhlist_head *tmp;
bool rx_data_pending;
int err = 0;
fc = ((struct ieee80211_hdr *)skb->data)->frame_control;
- memset(&rx, 0, sizeof(rx));
- rx.skb = skb;
- rx.local = local;
- rx.list = list;
+ rx->skb = skb;
+ rx->local = local;
+ rx->list = list;
if (ieee80211_is_data(fc) || ieee80211_is_mgmt(fc))
I802_DEBUG_INC(local->dot11ReceivedFragmentCount);
@@ -5483,8 +5482,8 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
}
hdr = (struct ieee80211_hdr *)skb->data;
- ieee80211_parse_qos(&rx);
- ieee80211_verify_alignment(&rx);
+ ieee80211_parse_qos(rx);
+ ieee80211_verify_alignment(rx);
if (unlikely(ieee80211_is_probe_resp(hdr->frame_control) ||
ieee80211_is_beacon(hdr->frame_control) ||
@@ -5504,9 +5503,9 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
sta = sta_from_pub(link_pubsta->sta);
link_sta = rcu_dereference(sta->link[link_pubsta->link_id]);
- rx.sdata = sta->sdata;
- if (ieee80211_rx_data_set_link_sta(&rx, link_sta) &&
- ieee80211_prepare_and_rx_handle(&rx, skb, true))
+ rx->sdata = sta->sdata;
+ if (ieee80211_rx_data_set_link_sta(rx, link_sta) &&
+ ieee80211_prepare_and_rx_handle(rx, skb, true))
return;
goto out;
@@ -5526,13 +5525,13 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
continue;
if (rx_data_pending) {
- ieee80211_prepare_and_rx_handle(&rx, skb,
+ ieee80211_prepare_and_rx_handle(rx, skb,
false);
rx_data_pending = false;
}
- rx.sdata = sta->sdata;
- if (!ieee80211_rx_data_set_link_sta(&rx, &sta->deflink))
+ rx->sdata = sta->sdata;
+ if (!ieee80211_rx_data_set_link_sta(rx, &sta->deflink))
continue;
rx_data_pending = true;
@@ -5550,20 +5549,20 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
continue;
if (rx_data_pending) {
- ieee80211_prepare_and_rx_handle(&rx, skb,
+ ieee80211_prepare_and_rx_handle(rx, skb,
false);
rx_data_pending = false;
}
- rx.sdata = sta->sdata;
- if (!ieee80211_rx_data_set_link_sta(&rx, link_sta))
+ rx->sdata = sta->sdata;
+ if (!ieee80211_rx_data_set_link_sta(rx, link_sta))
continue;
rx_data_pending = true;
}
if (rx_data_pending) {
- if (ieee80211_prepare_and_rx_handle(&rx, skb, true))
+ if (ieee80211_prepare_and_rx_handle(rx, skb, true))
return;
goto out;
@@ -5635,14 +5634,14 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
if (link_sta && link &&
ieee80211_rx_valid_freq(status, link)) {
if (rx_data_pending) {
- ieee80211_prepare_and_rx_handle(&rx, skb, false);
+ ieee80211_prepare_and_rx_handle(rx, skb, false);
rx_data_pending = false;
}
/* No valid_links check as we need to RX beacons */
- rx.sdata = sdata;
- if (ieee80211_rx_data_set_link_sta(&rx, link_sta))
+ rx->sdata = sdata;
+ if (ieee80211_rx_data_set_link_sta(rx, link_sta))
rx_data_pending = true;
continue;
@@ -5652,22 +5651,22 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
link = ieee80211_link_from_freq(sdata, status->freq);
if (rx_data_pending) {
- ieee80211_prepare_and_rx_handle(&rx, skb, false);
+ ieee80211_prepare_and_rx_handle(rx, skb, false);
rx_data_pending = false;
}
- rx.sdata = sdata;
- rx.local = sdata->local;
- rx.link = link;
- rx.link_id = link != &sdata->deflink ? link->link_id : -1;
- rx.sta = NULL;
- rx.link_sta = NULL;
+ rx->sdata = sdata;
+ rx->local = sdata->local;
+ rx->link = link;
+ rx->link_id = link != &sdata->deflink ? link->link_id : -1;
+ rx->sta = NULL;
+ rx->link_sta = NULL;
rx_data_pending = true;
}
if (rx_data_pending &&
- ieee80211_prepare_and_rx_handle(&rx, skb, true))
+ ieee80211_prepare_and_rx_handle(rx, skb, true))
return;
out:
@@ -5688,6 +5687,7 @@ void ieee80211_rx_list(struct ieee80211_hw *hw,
struct ieee80211_supported_band *sband;
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
+ struct ieee80211_rx_data rx = {};
WARN_ON_ONCE(softirq_count() == 0);
@@ -5839,7 +5839,7 @@ void ieee80211_rx_list(struct ieee80211_hw *hw,
__ieee80211_rx_handle_8023(hw, link_pubsta, skb, list);
else
__ieee80211_rx_handle_packet(hw, link_pubsta, skb,
- list);
+ list, &rx);
}
kcov_remote_stop();
--
2.34.1
next prev parent reply other threads:[~2026-12-02 10:29 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 10:27 [PATCH wireless-next v5 00/19] wifi: Add Seamless Mobility Domain (SMD) AP support Pooventhiran G
2026-12-02 10:27 ` [PATCH wireless-next v5 01/19] wifi: nl80211: define Seamless Mobility Domain (SMD) device capability Pooventhiran G
2026-12-02 10:27 ` [PATCH wireless-next v5 02/19] wifi: nl80211/cfg80211: define interfaces for SMD STA indications Pooventhiran G
2026-12-02 10:27 ` [PATCH wireless-next v5 03/19] wifi: nl80211: add ST sub-state STA flags for non-AP MLD Pooventhiran G
2026-12-02 10:27 ` [PATCH wireless-next v5 04/19] wifi: cfg80211: define layouts for ST context transfer Pooventhiran G
2026-12-02 10:28 ` [PATCH wireless-next v5 05/19] wifi: nl80211: define interfaces " Pooventhiran G
2026-12-02 10:28 ` [PATCH wireless-next v5 06/19] wifi: ieee80211: define APIs for UHR Link Reconfiguration frame checks Pooventhiran G
2026-12-02 10:28 ` [PATCH wireless-next v5 07/19] wifi: ieee80211: define API to check if frame is class 3 Pooventhiran G
2026-12-02 10:28 ` [PATCH wireless-next v5 08/19] wifi: nl80211/cfg80211: pack ST dynamic context along with frame Pooventhiran G
2026-12-02 10:28 ` [PATCH wireless-next v5 09/19] wifi: nl80211/cfg80211: add support for ST context programming Pooventhiran G
2026-12-02 10:28 ` [PATCH wireless-next v5 10/19] wifi: nl80211/cfg80211: add support for querying ST context for target AP MLD Pooventhiran G
2026-12-02 10:28 ` [PATCH wireless-next v5 11/19] wifi: nl80211/cfg80211: define API to notify ST Drain completion Pooventhiran G
2026-12-02 10:28 ` [PATCH wireless-next v5 12/19] wifi: mac80211: apply SMD indication and ST sub-states to STA Pooventhiran G
2026-12-02 10:28 ` [PATCH wireless-next v5 13/19] wifi: mac80211: add driver_op for ST substate changes Pooventhiran G
2026-12-02 10:28 ` [PATCH wireless-next v5 14/19] wifi: mac80211: filter uplink and downlink frames based on ST states Pooventhiran G
2026-12-02 10:28 ` Pooventhiran G [this message]
2026-12-02 10:28 ` [PATCH wireless-next v5 16/19] wifi: mac80211: handle UHR Link Reconfiguration frame Pooventhiran G
2026-12-02 10:28 ` [PATCH wireless-next v5 17/19] wifi: mac80211: add mac80211 support to handle NL80211_CMD_SET_ST_CTX Pooventhiran G
2026-12-02 10:28 ` [PATCH wireless-next v5 18/19] wifi: mac80211: add mac80211 support to handle NL80211_CMD_GET_ST_CTX Pooventhiran G
2026-12-02 10:28 ` [PATCH wireless-next v5 19/19] wifi: mac80211: define API to invoke ST Drain Completion event Pooventhiran G
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=20261202-smd-v5-15-1b020be65c7c@oss.qualcomm.com \
--to=pooventhiran.g@oss.qualcomm.com \
--cc=johannes@sipsolutions.net \
--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
all inboxes | Powered by JetHome®