cfg80211: avoid duplicate entries on regdomain intersection
authorEliad Peller <eliad@wizery.com>
Wed, 3 Sep 2014 12:25:03 +0000 (15:25 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 5 Sep 2014 11:52:08 +0000 (13:52 +0200)
commita62a1aed3733d7ec6489adca4c2f69881d78cfd6
tree7a071987136868eaa5020b7217ae66ed9c6894b8
parentcd2f5dd709daa8a70f9eb408025dbb1c804929a8
cfg80211: avoid duplicate entries on regdomain intersection

The regdom intersection code simply tries intersecting
each rule of the source with each rule of the target.

Since the resulting intersections are not observed
as a whole, this can result in multiple overlapping/duplicate
entries.

Make the rule addition a bit more smarter, by looking
for rules that can be contained within other rules,
and adding only extended ones.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/reg.c