cfg80211: expect different rd in cfg80211 when intersecting
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Wed, 12 Nov 2008 22:21:59 +0000 (14:21 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 25 Nov 2008 21:41:24 +0000 (16:41 -0500)
When intersecting it is possible that set_regdom() was called
with a regulatory domain which we'll only use as an aid to
build a final regulatory domain.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/wireless/reg.c

index 845e2d3..f062b8b 100644 (file)
@@ -880,12 +880,13 @@ int set_regdom(const struct ieee80211_regdomain *rd)
        }
 
        /* This would make this whole thing pointless */
-       BUG_ON(rd != cfg80211_regdomain);
+       if (!last_request->intersect)
+               BUG_ON(rd != cfg80211_regdomain);
 
        /* update all wiphys now with the new established regulatory domain */
        update_all_wiphy_regulatory(last_request->initiator);
 
-       print_regdomain(rd);
+       print_regdomain(cfg80211_regdomain);
 
        return r;
 }