summaryrefslogtreecommitdiff
path: root/include/net/regulatory.h
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2018-08-22 13:52:21 +0200
committerJohannes Berg <johannes.berg@intel.com>2018-08-28 11:11:47 +0200
commit38cb87ee47fb825f6c9d645c019f75b3905c0ab2 (patch)
treeadeb37dce51986c11e2a6667aab5ee09bcaff6ff /include/net/regulatory.h
parentd7c863a2f65e48f442379f4ee1846d52e0c5d24d (diff)
cfg80211: make wmm_rule part of the reg_rule structure
Make wmm_rule be part of the reg_rule structure. This simplifies the code a lot at the cost of having bigger memory usage. However in most cases we have only few reg_rule's and when we do have many like in iwlwifi we do not save memory as it allocates a separate wmm_rule for each channel anyway. This also fixes a bug reported in various places where somewhere the pointers were corrupted and we ended up doing a null-dereference. Fixes: 230ebaa189af ("cfg80211: read wmm rules from regulatory database") Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> [rephrase commit message slightly] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/regulatory.h')
-rw-r--r--include/net/regulatory.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/regulatory.h b/include/net/regulatory.h
index 60f8cc86a447..3469750df0f4 100644
--- a/include/net/regulatory.h
+++ b/include/net/regulatory.h
@@ -217,15 +217,15 @@ struct ieee80211_wmm_rule {
struct ieee80211_reg_rule {
struct ieee80211_freq_range freq_range;
struct ieee80211_power_rule power_rule;
- struct ieee80211_wmm_rule *wmm_rule;
+ struct ieee80211_wmm_rule wmm_rule;
u32 flags;
u32 dfs_cac_ms;
+ bool has_wmm;
};
struct ieee80211_regdomain {
struct rcu_head rcu_head;
u32 n_reg_rules;
- u32 n_wmm_rules;
char alpha2[3];
enum nl80211_dfs_regions dfs_region;
struct ieee80211_reg_rule reg_rules[];