diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2010-02-18 03:14:31 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-18 17:30:18 -0500 |
commit | b54452b07a7b1b8cc1385edba3ef2ef6d4679d5a (patch) | |
tree | c8a7271b14c4cd9e0dc22a5d0a3bed9e79c88e36 /net/wireless | |
parent | 3ffe533c87281b68d469b279ff3a5056f9c75862 (diff) |
const: struct nla_policy
Make remaining netlink policies as const.
Fixup coding style where needed.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/nl80211.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 5b79ecf17bea..a001ea32cb7d 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -58,7 +58,7 @@ static int get_rdev_dev_by_info_ifindex(struct genl_info *info, | |||
58 | } | 58 | } |
59 | 59 | ||
60 | /* policy for the attributes */ | 60 | /* policy for the attributes */ |
61 | static struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] __read_mostly = { | 61 | static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = { |
62 | [NL80211_ATTR_WIPHY] = { .type = NLA_U32 }, | 62 | [NL80211_ATTR_WIPHY] = { .type = NLA_U32 }, |
63 | [NL80211_ATTR_WIPHY_NAME] = { .type = NLA_NUL_STRING, | 63 | [NL80211_ATTR_WIPHY_NAME] = { .type = NLA_NUL_STRING, |
64 | .len = 20-1 }, | 64 | .len = 20-1 }, |
@@ -148,8 +148,7 @@ static struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] __read_mostly = { | |||
148 | }; | 148 | }; |
149 | 149 | ||
150 | /* policy for the attributes */ | 150 | /* policy for the attributes */ |
151 | static struct nla_policy | 151 | static const struct nla_policy nl80211_key_policy[NL80211_KEY_MAX + 1] = { |
152 | nl80211_key_policy[NL80211_KEY_MAX + 1] __read_mostly = { | ||
153 | [NL80211_KEY_DATA] = { .type = NLA_BINARY, .len = WLAN_MAX_KEY_LEN }, | 152 | [NL80211_KEY_DATA] = { .type = NLA_BINARY, .len = WLAN_MAX_KEY_LEN }, |
154 | [NL80211_KEY_IDX] = { .type = NLA_U8 }, | 153 | [NL80211_KEY_IDX] = { .type = NLA_U8 }, |
155 | [NL80211_KEY_CIPHER] = { .type = NLA_U32 }, | 154 | [NL80211_KEY_CIPHER] = { .type = NLA_U32 }, |
@@ -2501,8 +2500,7 @@ static int nl80211_set_bss(struct sk_buff *skb, struct genl_info *info) | |||
2501 | return err; | 2500 | return err; |
2502 | } | 2501 | } |
2503 | 2502 | ||
2504 | static const struct nla_policy | 2503 | static const struct nla_policy reg_rule_policy[NL80211_REG_RULE_ATTR_MAX + 1] = { |
2505 | reg_rule_policy[NL80211_REG_RULE_ATTR_MAX + 1] = { | ||
2506 | [NL80211_ATTR_REG_RULE_FLAGS] = { .type = NLA_U32 }, | 2504 | [NL80211_ATTR_REG_RULE_FLAGS] = { .type = NLA_U32 }, |
2507 | [NL80211_ATTR_FREQ_RANGE_START] = { .type = NLA_U32 }, | 2505 | [NL80211_ATTR_FREQ_RANGE_START] = { .type = NLA_U32 }, |
2508 | [NL80211_ATTR_FREQ_RANGE_END] = { .type = NLA_U32 }, | 2506 | [NL80211_ATTR_FREQ_RANGE_END] = { .type = NLA_U32 }, |
@@ -2671,8 +2669,7 @@ do {\ | |||
2671 | } \ | 2669 | } \ |
2672 | } while (0);\ | 2670 | } while (0);\ |
2673 | 2671 | ||
2674 | static struct nla_policy | 2672 | static const struct nla_policy nl80211_meshconf_params_policy[NL80211_MESHCONF_ATTR_MAX+1] = { |
2675 | nl80211_meshconf_params_policy[NL80211_MESHCONF_ATTR_MAX+1] __read_mostly = { | ||
2676 | [NL80211_MESHCONF_RETRY_TIMEOUT] = { .type = NLA_U16 }, | 2673 | [NL80211_MESHCONF_RETRY_TIMEOUT] = { .type = NLA_U16 }, |
2677 | [NL80211_MESHCONF_CONFIRM_TIMEOUT] = { .type = NLA_U16 }, | 2674 | [NL80211_MESHCONF_CONFIRM_TIMEOUT] = { .type = NLA_U16 }, |
2678 | [NL80211_MESHCONF_HOLDING_TIMEOUT] = { .type = NLA_U16 }, | 2675 | [NL80211_MESHCONF_HOLDING_TIMEOUT] = { .type = NLA_U16 }, |
@@ -4470,8 +4467,7 @@ static u32 rateset_to_mask(struct ieee80211_supported_band *sband, | |||
4470 | return mask; | 4467 | return mask; |
4471 | } | 4468 | } |
4472 | 4469 | ||
4473 | static struct nla_policy | 4470 | static const struct nla_policy nl80211_txattr_policy[NL80211_TXRATE_MAX + 1] = { |
4474 | nl80211_txattr_policy[NL80211_TXRATE_MAX + 1] __read_mostly = { | ||
4475 | [NL80211_TXRATE_LEGACY] = { .type = NLA_BINARY, | 4471 | [NL80211_TXRATE_LEGACY] = { .type = NLA_BINARY, |
4476 | .len = NL80211_MAX_SUPP_RATES }, | 4472 | .len = NL80211_MAX_SUPP_RATES }, |
4477 | }; | 4473 | }; |