Search Linux Wireless

[PATCH 1/3] cfg80211: increase mesh config attribute bitmask size

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

 



Increase the mask size for indicating mesh config attributes from 32bit
to 64bit.

This is required for the subsequent patch to add new mesh config.

Signed-off-by: Sriram R <quic_srirrama@xxxxxxxxxxx>
---
 include/net/cfg80211.h  | 2 +-
 net/mac80211/cfg.c      | 4 ++--
 net/wireless/nl80211.c  | 6 +++---
 net/wireless/rdev-ops.h | 2 +-
 net/wireless/trace.h    | 6 +++---
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index cc8a988..34bdf1d 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -4237,7 +4237,7 @@ struct cfg80211_ops {
 				struct net_device *dev,
 				struct mesh_config *conf);
 	int	(*update_mesh_config)(struct wiphy *wiphy,
-				      struct net_device *dev, u32 mask,
+				      struct net_device *dev, u64 mask,
 				      const struct mesh_config *nconf);
 	int	(*join_mesh)(struct wiphy *wiphy, struct net_device *dev,
 			     const struct mesh_config *conf,
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index f7896f2..a3d7950 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2206,7 +2206,7 @@ static int ieee80211_get_mesh_config(struct wiphy *wiphy,
 	return 0;
 }
 
-static inline bool _chg_mesh_attr(enum nl80211_meshconf_params parm, u32 mask)
+static inline bool _chg_mesh_attr(enum nl80211_meshconf_params parm, u64 mask)
 {
 	return (mask >> (parm-1)) & 0x1;
 }
@@ -2269,7 +2269,7 @@ static int copy_mesh_setup(struct ieee80211_if_mesh *ifmsh,
 }
 
 static int ieee80211_update_mesh_config(struct wiphy *wiphy,
-					struct net_device *dev, u32 mask,
+					struct net_device *dev, u64 mask,
 					const struct mesh_config *nconf)
 {
 	struct mesh_config *conf;
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 740b294..dee0fa9 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -7750,10 +7750,10 @@ static const struct nla_policy
 
 static int nl80211_parse_mesh_config(struct genl_info *info,
 				     struct mesh_config *cfg,
-				     u32 *mask_out)
+				     u64 *mask_out)
 {
 	struct nlattr *tb[NL80211_MESHCONF_ATTR_MAX + 1];
-	u32 mask = 0;
+	u64 mask = 0;
 	u16 ht_opmode;
 
 #define FILL_IN_MESH_PARAM_IF_SET(tb, cfg, param, mask, attr, fn)	\
@@ -7957,7 +7957,7 @@ static int nl80211_update_mesh_config(struct sk_buff *skb,
 	struct net_device *dev = info->user_ptr[1];
 	struct wireless_dev *wdev = dev->ieee80211_ptr;
 	struct mesh_config cfg;
-	u32 mask;
+	u64 mask;
 	int err;
 
 	if (wdev->iftype != NL80211_IFTYPE_MESH_POINT)
diff --git a/net/wireless/rdev-ops.h b/net/wireless/rdev-ops.h
index 439bcf5..e0fcaf12 100644
--- a/net/wireless/rdev-ops.h
+++ b/net/wireless/rdev-ops.h
@@ -330,7 +330,7 @@ rdev_get_mesh_config(struct cfg80211_registered_device *rdev,
 
 static inline int
 rdev_update_mesh_config(struct cfg80211_registered_device *rdev,
-			struct net_device *dev, u32 mask,
+			struct net_device *dev, u64 mask,
 			const struct mesh_config *nconf)
 {
 	int ret;
diff --git a/net/wireless/trace.h b/net/wireless/trace.h
index 228079d..bb4ce97d 100644
--- a/net/wireless/trace.h
+++ b/net/wireless/trace.h
@@ -1053,14 +1053,14 @@ TRACE_EVENT(rdev_return_int_mesh_config,
 );
 
 TRACE_EVENT(rdev_update_mesh_config,
-	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 mask,
+	TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u64 mask,
 		 const struct mesh_config *conf),
 	TP_ARGS(wiphy, netdev, mask, conf),
 	TP_STRUCT__entry(
 		WIPHY_ENTRY
 		NETDEV_ENTRY
 		MESH_CFG_ENTRY
-		__field(u32, mask)
+		__field(u64, mask)
 	),
 	TP_fast_assign(
 		WIPHY_ASSIGN;
@@ -1068,7 +1068,7 @@ TRACE_EVENT(rdev_update_mesh_config,
 		MESH_CFG_ASSIGN;
 		__entry->mask = mask;
 	),
-	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mask: %u",
+	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mask: %llu",
 		  WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->mask)
 );
 
-- 
2.7.4




[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