]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: cfg80211: Store the NAN cluster ID
authorIlan Peer <ilan.peer@intel.com>
Mon, 8 Sep 2025 11:13:01 +0000 (14:13 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 19 Sep 2025 09:26:22 +0000 (11:26 +0200)
When the driver indicates that the device has joined
a cluster, store the cluster ID. This is needed for data
path operations, e.g., filtering received frames etc.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250908140015.63e9fef2a3aa.I6c858185c9e71f84bd2c5174d7ee45902b4391c3@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/net/cfg80211.h
net/wireless/nl80211.c

index e30c1886c5304f39202477426eb6a10f7b5a6926..26fd42e189ce292e48e4d1a6da16d5909c9a907d 100644 (file)
@@ -6681,6 +6681,9 @@ struct wireless_dev {
                struct {
                        struct cfg80211_chan_def chandef;
                } ocb;
+               struct {
+                       u8 cluster_id[ETH_ALEN] __aligned(2);
+               } nan;
        } u;
 
        struct {
index 72f68a17c92be09de09859d9c5ccc2cec97a2351..4e0d40865441c696fb6623a2eeae10ade1826e60 100644 (file)
@@ -21865,6 +21865,8 @@ void cfg80211_nan_cluster_joined(struct wireless_dev *wdev,
 
        trace_cfg80211_nan_cluster_joined(wdev, cluster_id, new_cluster);
 
+       memcpy(wdev->u.nan.cluster_id, cluster_id, ETH_ALEN);
+
        msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp);
        if (!msg)
                return;