aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-11-14 11:14:45 -0500
committerDavid S. Miller <davem@davemloft.net>2013-11-14 17:10:41 -0500
commitf84f771d942182e39a56ec2989d6a67d3ca33a13 (patch)
tree6649cb4e7b88ebec4826252a1a3675fb75ba4621 /net/wireless
parentd91824c08fbcb265ec930d863fa905e8daa836a4 (diff)
genetlink: allow making ops const
Allow making the ops array const by not modifying the ops flags on registration but rather only when ops are sent out in the family information. No users are updated yet except for the pre_doit/post_doit calls in wireless (the only ones that exist now.) Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/nl80211.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index a7f4e7902104..3fef55958e98 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -30,9 +30,9 @@ static int nl80211_crypto_settings(struct cfg80211_registered_device *rdev,
30 struct cfg80211_crypto_settings *settings, 30 struct cfg80211_crypto_settings *settings,
31 int cipher_limit); 31 int cipher_limit);
32 32
33static int nl80211_pre_doit(struct genl_ops *ops, struct sk_buff *skb, 33static int nl80211_pre_doit(const struct genl_ops *ops, struct sk_buff *skb,
34 struct genl_info *info); 34 struct genl_info *info);
35static void nl80211_post_doit(struct genl_ops *ops, struct sk_buff *skb, 35static void nl80211_post_doit(const struct genl_ops *ops, struct sk_buff *skb,
36 struct genl_info *info); 36 struct genl_info *info);
37 37
38/* the netlink family */ 38/* the netlink family */
@@ -8851,7 +8851,7 @@ static int nl80211_crit_protocol_stop(struct sk_buff *skb,
8851#define NL80211_FLAG_NEED_WDEV_UP (NL80211_FLAG_NEED_WDEV |\ 8851#define NL80211_FLAG_NEED_WDEV_UP (NL80211_FLAG_NEED_WDEV |\
8852 NL80211_FLAG_CHECK_NETDEV_UP) 8852 NL80211_FLAG_CHECK_NETDEV_UP)
8853 8853
8854static int nl80211_pre_doit(struct genl_ops *ops, struct sk_buff *skb, 8854static int nl80211_pre_doit(const struct genl_ops *ops, struct sk_buff *skb,
8855 struct genl_info *info) 8855 struct genl_info *info)
8856{ 8856{
8857 struct cfg80211_registered_device *rdev; 8857 struct cfg80211_registered_device *rdev;
@@ -8920,7 +8920,7 @@ static int nl80211_pre_doit(struct genl_ops *ops, struct sk_buff *skb,
8920 return 0; 8920 return 0;
8921} 8921}
8922 8922
8923static void nl80211_post_doit(struct genl_ops *ops, struct sk_buff *skb, 8923static void nl80211_post_doit(const struct genl_ops *ops, struct sk_buff *skb,
8924 struct genl_info *info) 8924 struct genl_info *info)
8925{ 8925{
8926 if (info->user_ptr[1]) { 8926 if (info->user_ptr[1]) {