Commit 4c7d3982a6e37831382b9ef90aa0dbadc0bf3a22
Committed by
Johannes Berg
1 parent
f7d8ad81ca
Exists in
smarc-imx_3.14.28_1.0.0_ga
and in
1 other branch
cfg80211: use enum nl80211_dfs_regions for dfs_region everywhere
u8 was used in some other places, just stick to the enum, this forces us to express the values that are expected. Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Showing 4 changed files with 6 additions and 6 deletions Side-by-side Diff
include/net/regulatory.h
... | ... | @@ -79,7 +79,7 @@ |
79 | 79 | enum nl80211_reg_initiator initiator; |
80 | 80 | enum nl80211_user_reg_hint_type user_reg_hint_type; |
81 | 81 | char alpha2[2]; |
82 | - u8 dfs_region; | |
82 | + enum nl80211_dfs_regions dfs_region; | |
83 | 83 | bool intersect; |
84 | 84 | bool processed; |
85 | 85 | enum environment_cap country_ie_env; |
... | ... | @@ -157,7 +157,7 @@ |
157 | 157 | struct rcu_head rcu_head; |
158 | 158 | u32 n_reg_rules; |
159 | 159 | char alpha2[2]; |
160 | - u8 dfs_region; | |
160 | + enum nl80211_dfs_regions dfs_region; | |
161 | 161 | struct ieee80211_reg_rule reg_rules[]; |
162 | 162 | }; |
163 | 163 |
net/wireless/nl80211.c
... | ... | @@ -5079,7 +5079,7 @@ |
5079 | 5079 | char *alpha2 = NULL; |
5080 | 5080 | int rem_reg_rules = 0, r = 0; |
5081 | 5081 | u32 num_rules = 0, rule_idx = 0, size_of_regd; |
5082 | - u8 dfs_region = 0; | |
5082 | + enum nl80211_dfs_regions dfs_region = NL80211_DFS_UNSET; | |
5083 | 5083 | struct ieee80211_regdomain *rd = NULL; |
5084 | 5084 | |
5085 | 5085 | if (!info->attrs[NL80211_ATTR_REG_ALPHA2]) |
net/wireless/reg.c
... | ... | @@ -2115,7 +2115,7 @@ |
2115 | 2115 | } |
2116 | 2116 | } |
2117 | 2117 | |
2118 | -bool reg_supported_dfs_region(u8 dfs_region) | |
2118 | +bool reg_supported_dfs_region(enum nl80211_dfs_regions dfs_region) | |
2119 | 2119 | { |
2120 | 2120 | switch (dfs_region) { |
2121 | 2121 | case NL80211_DFS_UNSET: |
... | ... | @@ -2130,7 +2130,7 @@ |
2130 | 2130 | } |
2131 | 2131 | } |
2132 | 2132 | |
2133 | -static void print_dfs_region(u8 dfs_region) | |
2133 | +static void print_dfs_region(enum nl80211_dfs_regions dfs_region) | |
2134 | 2134 | { |
2135 | 2135 | if (!dfs_region) |
2136 | 2136 | return; |
net/wireless/reg.h
... | ... | @@ -20,7 +20,7 @@ |
20 | 20 | |
21 | 21 | bool reg_is_valid_request(const char *alpha2); |
22 | 22 | bool is_world_regdom(const char *alpha2); |
23 | -bool reg_supported_dfs_region(u8 dfs_region); | |
23 | +bool reg_supported_dfs_region(enum nl80211_dfs_regions dfs_region); | |
24 | 24 | |
25 | 25 | int regulatory_hint_user(const char *alpha2, |
26 | 26 | enum nl80211_user_reg_hint_type user_reg_hint_type); |