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 v3 17/21] wifi: mac80211: pass rx_data directly from ieee80211_rx_list()
Date: Fri, 06 Nov 2026 01:08:52 +0530 [thread overview]
Message-ID: <20261106-smd-v3-17-1723950e3cf8@oss.qualcomm.com> (raw)
In-Reply-To: <20261106-smd-v3-0-1723950e3cf8@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 12ba9fbcc983..78967ac95343 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -5374,7 +5374,8 @@ static bool ieee80211_rx_valid_freq(struct ieee80211_rx_status *status,
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)
{
struct ieee80211_local *local = hw_to_local(hw);
struct ieee80211_sub_if_data *sdata;
@@ -5383,16 +5384,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);
@@ -5424,8 +5423,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) ||
@@ -5446,9 +5445,9 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
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;
@@ -5468,13 +5467,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;
@@ -5492,20 +5491,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;
@@ -5560,14 +5559,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;
@@ -5596,22 +5595,22 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
}
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:
@@ -5631,6 +5630,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);
@@ -5782,7 +5782,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-11-05 19:41 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 19:38 [PATCH wireless-next v3 00/21] wifi: Add Seamless Mobility Domain (SMD) AP support Pooventhiran G
2026-11-05 19:38 ` [PATCH wireless-next v3 01/21] wifi: nl80211: define Seamless Mobility Domain (SMD) device capability Pooventhiran G
2026-11-05 19:38 ` [PATCH wireless-next v3 02/21] wifi: nl80211/cfg80211: define interfaces for SMD setup and STA update Pooventhiran G
2026-11-05 19:38 ` [PATCH wireless-next v3 03/21] wifi: nl80211: add SMD BSS Transition sub-state STA flags Pooventhiran G
2026-11-05 19:38 ` [PATCH wireless-next v3 04/21] wifi: cfg80211: define layouts for SMD BSS Transition context Pooventhiran G
2026-11-05 19:38 ` [PATCH wireless-next v3 05/21] wifi: nl80211: define interfaces for SMD BSS Transition context transfer Pooventhiran G
2026-11-05 19:38 ` [PATCH wireless-next v3 06/21] wifi: ieee80211: define APIs for UHR Link Reconfiguration frame checks Pooventhiran G
2026-11-05 19:38 ` [PATCH wireless-next v3 07/21] wifi: ieee80211: define API to check if frame is class 3 Pooventhiran G
2026-11-05 19:38 ` [PATCH wireless-next v3 08/21] wifi: nl80211/cfg80211: pack SMD dynamic context along with frame Pooventhiran G
2026-11-05 19:38 ` [PATCH wireless-next v3 09/21] wifi: nl80211/cfg80211: add support for SMD context programming Pooventhiran G
2026-11-05 19:38 ` [PATCH wireless-next v3 10/21] wifi: nl80211/cfg80211: add support for querying SMD context for target AP MLD Pooventhiran G
2026-11-05 19:38 ` [PATCH wireless-next v3 11/21] wifi: nl80211/cfg80211: define API to notify SMD Drain completion Pooventhiran G
2026-11-05 19:38 ` [PATCH wireless-next v3 12/21] wifi: mac80211: set SMD parameters for AP setup and STA update Pooventhiran G
2026-11-05 19:38 ` [PATCH wireless-next v3 13/21] wifi: mac80211: apply SMD BSS Transition STA sub-states Pooventhiran G
2026-11-05 19:38 ` [PATCH wireless-next v3 14/21] wifi: mac80211: add driver_op for SMD substate changes Pooventhiran G
2026-11-05 19:38 ` [PATCH wireless-next v3 15/21] wifi: mac80211: filter uplink and downlink frames based on SMD states Pooventhiran G
2026-11-05 19:38 ` [PATCH wireless-next v3 16/21] wifi: mac80211: send BlockAck policy in AMPDU action Pooventhiran G
2026-11-05 19:38 ` Pooventhiran G [this message]
2026-11-05 19:38 ` [PATCH wireless-next v3 18/21] wifi: mac80211: handle UHR Link Reconfiguration frame Pooventhiran G
2026-11-05 19:38 ` [PATCH wireless-next v3 19/21] wifi: mac80211: add mac80211 support to handle NL80211_CMD_SET_SMD_CTX Pooventhiran G
2026-11-05 19:38 ` [PATCH wireless-next v3 20/21] wifi: mac80211: add mac80211 support to handle NL80211_CMD_GET_SMD_CTX Pooventhiran G
2026-11-05 19:38 ` [PATCH wireless-next v3 21/21] wifi: mac80211: define API to invoke SMD 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=20261106-smd-v3-17-1723950e3cf8@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®