From: Ria Thomas <ria.thomas@morsemicro.com>
To: johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org, lachlan.hodges@morsemicro.com,
arien.judge@morsemicro.com, pradeep.reddy@morsemicro.com,
simon@morsemicro.com, Ria Thomas <ria.thomas@morsemicro.com>
Subject: [PATCH wireless-next v2 1/3] wifi: cfg80211: Add support for S1G Response Indication Configuration
Date: Tue, 9 Dec 2025 11:54:22 +0530 [thread overview]
Message-ID: <20251209062424.3926297-2-ria.thomas@morsemicro.com> (raw)
In-Reply-To: <20251209062424.3926297-1-ria.thomas@morsemicro.com>
In S1G, a STA distributes a Response Indication (RI) to protect the
frame expected at SIFS after the eliciting frame. Introduce a
userspace configurable selector for the expected response frame
type (i.e., Block Ack, NDP, or no response) after transmitting
certain S1G frames.
Signed-off-by: Ria Thomas <ria.thomas@morsemicro.com>
---
v1 -> v2
- fixed kernel doc
---
include/net/cfg80211.h | 3 +++
include/uapi/linux/nl80211.h | 14 ++++++++++++++
net/wireless/nl80211.c | 24 ++++++++++++++++++++++++
net/wireless/rdev-ops.h | 14 ++++++++++++++
net/wireless/trace.h | 18 ++++++++++++++++++
5 files changed, 73 insertions(+)
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 899f267b7cf9..8c538a9e3471 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -4839,6 +4839,7 @@ struct mgmt_frame_regs {
* links by calling cfg80211_mlo_reconf_add_done(). When calling
* cfg80211_mlo_reconf_add_done() the bss pointer must be given for each
* link for which MLO reconfiguration 'add' operation was requested.
+ * @set_s1g_ri: Set response indication frame type.
*/
struct cfg80211_ops {
int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow);
@@ -5210,6 +5211,8 @@ struct cfg80211_ops {
struct cfg80211_ml_reconf_req *req);
int (*set_epcs)(struct wiphy *wiphy, struct net_device *dev,
bool val);
+ int (*set_s1g_ri)(struct wiphy *wiphy, struct net_device *dev,
+ u8 val);
};
/*
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index 8134f10e4e6c..4ca86c1fd361 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -1361,6 +1361,10 @@
* user space that the NAN new cluster has been joined. The cluster ID is
* indicated by %NL80211_ATTR_MAC.
*
+ * @NL80211_CMD_SET_S1G_RI: This command is used to enable and set the
+ * response indication type for an S1G station. The frame type is
+ * indicated by %NL80211_ATTR_S1G_RI_FRAME_TYPE.
+ *
* @NL80211_CMD_MAX: highest used command number
* @__NL80211_CMD_AFTER_LAST: internal use
*/
@@ -1624,6 +1628,8 @@ enum nl80211_commands {
NL80211_CMD_NAN_NEXT_DW_NOTIFICATION,
NL80211_CMD_NAN_CLUSTER_JOINED,
+ NL80211_CMD_SET_S1G_RI,
+
/* add new commands above here */
/* used to define NL80211_CMD_MAX below */
@@ -2973,6 +2979,12 @@ enum nl80211_commands {
* primary channel is 2 MHz wide, and the control channel designates
* the 1 MHz primary subchannel within that 2 MHz primary.
*
+ * @NL80211_ATTR_S1G_RI_FRAME_TYPE: (u8) Integer attibute used with
+ * %NL80211_CMD_SET_S1G_RI that represents the RID
+ * (Response Indication Deferral) information distributed by
+ * an S1G STA in order to protect the response frame, which is
+ * expected a SIFS time after the frame that elicits that response.
+ *
* @NUM_NL80211_ATTR: total number of nl80211_attrs available
* @NL80211_ATTR_MAX: highest attribute number currently defined
* @__NL80211_ATTR_AFTER_LAST: internal use
@@ -3541,6 +3553,8 @@ enum nl80211_attrs {
NL80211_ATTR_S1G_PRIMARY_2MHZ,
+ NL80211_ATTR_S1G_RI_FRAME_TYPE,
+
/* add attributes here, update the policy in nl80211.c */
__NL80211_ATTR_AFTER_LAST,
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index c961cd42a832..315e17997cb6 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -932,6 +932,7 @@ static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = {
NLA_POLICY_NESTED(nl80211_s1g_short_beacon),
[NL80211_ATTR_BSS_PARAM] = { .type = NLA_FLAG },
[NL80211_ATTR_S1G_PRIMARY_2MHZ] = { .type = NLA_FLAG },
+ [NL80211_ATTR_S1G_RI_FRAME_TYPE] = { .type = NLA_U8 },
};
/* policy for the key attributes */
@@ -17826,6 +17827,23 @@ nl80211_epcs_cfg(struct sk_buff *skb, struct genl_info *info)
return rdev_set_epcs(rdev, dev, val);
}
+static int nl80211_set_s1g_ri(struct sk_buff *skb, struct genl_info *info)
+{
+ struct cfg80211_registered_device *rdev = info->user_ptr[0];
+ struct net_device *dev = info->user_ptr[1];
+ u8 val;
+
+ if (!rdev->ops->set_s1g_ri)
+ return -EOPNOTSUPP;
+
+ if (!info->attrs[NL80211_ATTR_S1G_RI_FRAME_TYPE])
+ return -EINVAL;
+
+ val = nla_get_u8(info->attrs[NL80211_ATTR_S1G_RI_FRAME_TYPE]);
+
+ return rdev_set_s1g_ri(rdev, dev, val);
+}
+
#define NL80211_FLAG_NEED_WIPHY 0x01
#define NL80211_FLAG_NEED_NETDEV 0x02
#define NL80211_FLAG_NEED_RTNL 0x04
@@ -19031,6 +19049,12 @@ static const struct genl_small_ops nl80211_small_ops[] = {
.flags = GENL_UNS_ADMIN_PERM,
.internal_flags = IFLAGS(NL80211_FLAG_NEED_NETDEV_UP),
},
+ {
+ .cmd = NL80211_CMD_SET_S1G_RI,
+ .doit = nl80211_set_s1g_ri,
+ .flags = GENL_UNS_ADMIN_PERM,
+ .internal_flags = IFLAGS(NL80211_FLAG_NEED_NETDEV_UP),
+ },
};
static struct genl_family nl80211_fam __ro_after_init = {
diff --git a/net/wireless/rdev-ops.h b/net/wireless/rdev-ops.h
index ac6884bacf3f..d29a4d55f860 100644
--- a/net/wireless/rdev-ops.h
+++ b/net/wireless/rdev-ops.h
@@ -1584,4 +1584,18 @@ rdev_set_epcs(struct cfg80211_registered_device *rdev,
return ret;
}
+static inline int
+rdev_set_s1g_ri(struct cfg80211_registered_device *rdev,
+ struct net_device *dev, u8 val)
+{
+ struct wiphy *wiphy = &rdev->wiphy;
+ int ret = -EOPNOTSUPP;
+
+ trace_rdev_set_s1g_ri(wiphy, dev, val);
+ ret = rdev->ops->set_s1g_ri(wiphy, dev, val);
+ trace_rdev_return_int(wiphy, ret);
+
+ return ret;
+}
+
#endif /* __CFG80211_RDEV_OPS */
diff --git a/net/wireless/trace.h b/net/wireless/trace.h
index 2b71f1d867a0..ec200e94e9a6 100644
--- a/net/wireless/trace.h
+++ b/net/wireless/trace.h
@@ -3122,6 +3122,24 @@ TRACE_EVENT(rdev_set_epcs,
WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->val)
);
+TRACE_EVENT(rdev_set_s1g_ri,
+ TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
+ u8 val),
+ TP_ARGS(wiphy, netdev, val),
+ TP_STRUCT__entry(
+ WIPHY_ENTRY
+ NETDEV_ENTRY
+ __field(u8, val)
+ ),
+ TP_fast_assign(
+ WIPHY_ASSIGN;
+ NETDEV_ASSIGN;
+ __entry->val = val;
+ ),
+ TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", ri=%u",
+ WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->val)
+);
+
/*************************************************************
* cfg80211 exported functions traces *
*************************************************************/
--
2.25.1
next prev parent reply other threads:[~2025-12-09 6:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-09 6:24 [PATCH wireless-next v2 0/3] wifi: add S1G response indication configuration with NDP BA support Ria Thomas
2025-12-09 6:24 ` Ria Thomas [this message]
2026-01-08 12:27 ` [PATCH wireless-next v2 1/3] wifi: cfg80211: Add support for S1G Response Indication Configuration Johannes Berg
2026-01-09 4:00 ` Ria Thomas
2026-01-13 8:50 ` Johannes Berg
2026-01-16 5:31 ` Ria Thomas
2026-02-06 6:11 ` Ria Thomas
2026-02-06 7:57 ` Johannes Berg
2026-02-12 8:43 ` Ria Thomas
2026-02-17 11:41 ` Johannes Berg
2025-12-09 6:24 ` [PATCH wireless-next v2 2/3] wifi: mac80211: track S1G Response Indication (RI) and notify drivers Ria Thomas
2025-12-09 6:24 ` [PATCH wireless-next v2 3/3] wifi: mac80211: add support for NDP ADDBA/DELBA for S1G Ria Thomas
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=20251209062424.3926297-2-ria.thomas@morsemicro.com \
--to=ria.thomas@morsemicro.com \
--cc=arien.judge@morsemicro.com \
--cc=johannes@sipsolutions.net \
--cc=lachlan.hodges@morsemicro.com \
--cc=linux-wireless@vger.kernel.org \
--cc=pradeep.reddy@morsemicro.com \
--cc=simon@morsemicro.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