cfg80211: make wmm_rule part of the reg_rule structure
authorStanislaw Gruszka <sgruszka@redhat.com>
Wed, 22 Aug 2018 11:52:21 +0000 (13:52 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 28 Aug 2018 09:11:47 +0000 (11:11 +0200)
commit38cb87ee47fb825f6c9d645c019f75b3905c0ab2
treeadeb37dce51986c11e2a6667aab5ee09bcaff6ff
parentd7c863a2f65e48f442379f4ee1846d52e0c5d24d
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>
drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
include/net/cfg80211.h
include/net/regulatory.h
net/mac80211/util.c
net/wireless/nl80211.c
net/wireless/reg.c