]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: nl80211: Add support for EPP peer indication
authorSai Pratyusha Magam <sai.magam@oss.qualcomm.com>
Wed, 14 Jan 2026 11:18:55 +0000 (16:48 +0530)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 14 Jan 2026 13:34:16 +0000 (14:34 +0100)
Introduce a new netlink attribute NL80211_ATTR_EPP_PEER
to be used with NL80211_CMD_NEW_STA and
NL80211_CMD_ADD_LINK_STA for the userspace to indicate
that a non-AP STA is an Enhanced Privacy Protection (EPP)
peer.

Co-developed-by: Rohan Dutta <quic_drohan@quicinc.com>
Signed-off-by: Rohan Dutta <quic_drohan@quicinc.com>
Signed-off-by: Sai Pratyusha Magam <sai.magam@oss.qualcomm.com>
Signed-off-by: Kavita Kavita <kavita.kavita@oss.qualcomm.com>
Link: https://patch.msgid.link/20260114111900.2196941-5-kavita.kavita@oss.qualcomm.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/net/cfg80211.h
include/uapi/linux/nl80211.h
net/wireless/nl80211.c

index cbccedf32228668a1174ed233dbbc89e6a68c924..6d8e35a0dde4cdbe76a82b4c5915d65a998a536c 100644 (file)
@@ -1785,6 +1785,7 @@ struct cfg80211_ttlm_params {
  *     present/updated
  * @eml_cap: EML capabilities of this station
  * @link_sta_params: link related params.
+ * @epp_peer: EPP peer indication
  */
 struct station_parameters {
        struct net_device *vlan;
@@ -1811,6 +1812,7 @@ struct station_parameters {
        bool eml_cap_present;
        u16 eml_cap;
        struct link_station_parameters link_sta_params;
+       bool epp_peer;
 };
 
 /**
index 60573334e086954457b02adf79fe1b745680e9bd..eb92296457c937b88522a5907cf2196fe5133df0 100644 (file)
@@ -2973,6 +2973,9 @@ 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_EPP_PEER: A flag attribute to indicate if the peer is an EPP
+ *     STA. Used with %NL80211_CMD_NEW_STA and %NL80211_CMD_ADD_LINK_STA
+ *
  * @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 +3544,8 @@ enum nl80211_attrs {
 
        NL80211_ATTR_S1G_PRIMARY_2MHZ,
 
+       NL80211_ATTR_EPP_PEER,
+
        /* add attributes here, update the policy in nl80211.c */
 
        __NL80211_ATTR_AFTER_LAST,
index df159a5f1816a4692fec6c17e820b77ad55b30ed..3d74bea09ba3d344cc60d5c91892333f497d5e45 100644 (file)
@@ -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_EPP_PEER] = { .type = NLA_FLAG },
 };
 
 /* policy for the key attributes */
@@ -8792,6 +8793,10 @@ static int nl80211_new_station(struct sk_buff *skb, struct genl_info *info)
                        goto out;
                }
        }
+
+       params.epp_peer =
+               nla_get_flag(info->attrs[NL80211_ATTR_EPP_PEER]);
+
        err = rdev_add_station(rdev, dev, mac_addr, &params);
 out:
        dev_put(params.vlan);