aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/genregdb.awk4
-rw-r--r--net/wireless/nl80211.c14
-rw-r--r--net/wireless/wext-proc.c4
3 files changed, 9 insertions, 13 deletions
diff --git a/net/wireless/genregdb.awk b/net/wireless/genregdb.awk
index 8316cf075ce9..3cc9e69880a8 100644
--- a/net/wireless/genregdb.awk
+++ b/net/wireless/genregdb.awk
@@ -26,11 +26,11 @@ BEGIN {
26} 26}
27 27
28/^[ \t]*#/ { 28/^[ \t]*#/ {
29 /* Ignore */ 29 # Ignore
30} 30}
31 31
32!active && /^[ \t]*$/ { 32!active && /^[ \t]*$/ {
33 /* Ignore */ 33 # Ignore
34} 34}
35 35
36!active && /country/ { 36!active && /country/ {
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index b0495a1da22e..e447db04cf76 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 */
61static struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] __read_mostly = { 61static 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 },
@@ -152,8 +152,7 @@ static struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] __read_mostly = {
152}; 152};
153 153
154/* policy for the attributes */ 154/* policy for the attributes */
155static struct nla_policy 155static const struct nla_policy nl80211_key_policy[NL80211_KEY_MAX + 1] = {
156nl80211_key_policy[NL80211_KEY_MAX + 1] __read_mostly = {
157 [NL80211_KEY_DATA] = { .type = NLA_BINARY, .len = WLAN_MAX_KEY_LEN }, 156 [NL80211_KEY_DATA] = { .type = NLA_BINARY, .len = WLAN_MAX_KEY_LEN },
158 [NL80211_KEY_IDX] = { .type = NLA_U8 }, 157 [NL80211_KEY_IDX] = { .type = NLA_U8 },
159 [NL80211_KEY_CIPHER] = { .type = NLA_U32 }, 158 [NL80211_KEY_CIPHER] = { .type = NLA_U32 },
@@ -2483,8 +2482,7 @@ static int nl80211_set_bss(struct sk_buff *skb, struct genl_info *info)
2483 return err; 2482 return err;
2484} 2483}
2485 2484
2486static const struct nla_policy 2485static const struct nla_policy reg_rule_policy[NL80211_REG_RULE_ATTR_MAX + 1] = {
2487 reg_rule_policy[NL80211_REG_RULE_ATTR_MAX + 1] = {
2488 [NL80211_ATTR_REG_RULE_FLAGS] = { .type = NLA_U32 }, 2486 [NL80211_ATTR_REG_RULE_FLAGS] = { .type = NLA_U32 },
2489 [NL80211_ATTR_FREQ_RANGE_START] = { .type = NLA_U32 }, 2487 [NL80211_ATTR_FREQ_RANGE_START] = { .type = NLA_U32 },
2490 [NL80211_ATTR_FREQ_RANGE_END] = { .type = NLA_U32 }, 2488 [NL80211_ATTR_FREQ_RANGE_END] = { .type = NLA_U32 },
@@ -2653,8 +2651,7 @@ do {\
2653 } \ 2651 } \
2654} while (0);\ 2652} while (0);\
2655 2653
2656static struct nla_policy 2654static const struct nla_policy nl80211_meshconf_params_policy[NL80211_MESHCONF_ATTR_MAX+1] = {
2657nl80211_meshconf_params_policy[NL80211_MESHCONF_ATTR_MAX+1] __read_mostly = {
2658 [NL80211_MESHCONF_RETRY_TIMEOUT] = { .type = NLA_U16 }, 2655 [NL80211_MESHCONF_RETRY_TIMEOUT] = { .type = NLA_U16 },
2659 [NL80211_MESHCONF_CONFIRM_TIMEOUT] = { .type = NLA_U16 }, 2656 [NL80211_MESHCONF_CONFIRM_TIMEOUT] = { .type = NLA_U16 },
2660 [NL80211_MESHCONF_HOLDING_TIMEOUT] = { .type = NLA_U16 }, 2657 [NL80211_MESHCONF_HOLDING_TIMEOUT] = { .type = NLA_U16 },
@@ -4452,8 +4449,7 @@ static u32 rateset_to_mask(struct ieee80211_supported_band *sband,
4452 return mask; 4449 return mask;
4453} 4450}
4454 4451
4455static struct nla_policy 4452static const struct nla_policy nl80211_txattr_policy[NL80211_TXRATE_MAX + 1] = {
4456nl80211_txattr_policy[NL80211_TXRATE_MAX + 1] __read_mostly = {
4457 [NL80211_TXRATE_LEGACY] = { .type = NLA_BINARY, 4453 [NL80211_TXRATE_LEGACY] = { .type = NLA_BINARY,
4458 .len = NL80211_MAX_SUPP_RATES }, 4454 .len = NL80211_MAX_SUPP_RATES },
4459}; 4455};
diff --git a/net/wireless/wext-proc.c b/net/wireless/wext-proc.c
index 273a7f77c834..8bafa31fa9f8 100644
--- a/net/wireless/wext-proc.c
+++ b/net/wireless/wext-proc.c
@@ -140,7 +140,7 @@ static const struct file_operations wireless_seq_fops = {
140 .release = seq_release_net, 140 .release = seq_release_net,
141}; 141};
142 142
143int wext_proc_init(struct net *net) 143int __net_init wext_proc_init(struct net *net)
144{ 144{
145 /* Create /proc/net/wireless entry */ 145 /* Create /proc/net/wireless entry */
146 if (!proc_net_fops_create(net, "wireless", S_IRUGO, &wireless_seq_fops)) 146 if (!proc_net_fops_create(net, "wireless", S_IRUGO, &wireless_seq_fops))
@@ -149,7 +149,7 @@ int wext_proc_init(struct net *net)
149 return 0; 149 return 0;
150} 150}
151 151
152void wext_proc_exit(struct net *net) 152void __net_exit wext_proc_exit(struct net *net)
153{ 153{
154 proc_net_remove(net, "wireless"); 154 proc_net_remove(net, "wireless");
155} 155}