Search Linux Wireless

[PATCH wireless-next 07/14] wifi: cfg80211: Store the NAN cluster ID

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ilan Peer <ilan.peer@xxxxxxxxx>

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@xxxxxxxxx>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@xxxxxxxxx>
---
 include/net/cfg80211.h | 3 +++
 net/wireless/nl80211.c | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index e30c1886c530..26fd42e189ce 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -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 {
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 4d0f37962cf4..eb96d3709287 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -21864,6 +21864,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;
-- 
2.34.1





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux