diff mbox

Regulatory problem with multiple wireless interfaces

Message ID 201005271810.55211.8an@praha12.net (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Lukáš Turek May 27, 2010, 4:10 p.m. UTC
None
diff mbox

Patch

diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 422da20..52536ae 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -1156,6 +1156,8 @@  static int freq_reg_info_regd(struct wiphy *wiphy,
 	    wiphy->regd)
 		regd = wiphy->regd;
 
+	regd = cfg80211_regdomain; //HACK
+
 	if (!regd)
 		return -EINVAL;
 
@@ -1286,7 +1288,7 @@  static void handle_channel(struct wiphy *wiphy, enum ieee80211_band band,
 		bw_flags = IEEE80211_CHAN_NO_HT40;
 
 	if (last_request->initiator == NL80211_REGDOM_SET_BY_DRIVER &&
-	    request_wiphy && request_wiphy == wiphy &&
+	    request_wiphy && /* request_wiphy == wiphy && */ //HACK
 	    request_wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY) {
 		/*
 		 * This gaurantees the driver's requested regulatory domain
@@ -1327,6 +1329,8 @@  static void handle_band(struct wiphy *wiphy, enum ieee80211_band band)
 static bool ignore_reg_update(struct wiphy *wiphy,
 			      enum nl80211_reg_initiator initiator)
 {
+	return false; //HACK
+	
 	if (!last_request)
 		return true;
 	if (initiator == NL80211_REGDOM_SET_BY_CORE &&
@@ -2499,7 +2503,7 @@  static int __set_regdom(const struct ieee80211_regdomain *rd)
 
 	if (last_request->initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE) {
 
-		intersected_rd = regdom_intersect(rd, cfg80211_regdomain);
+		intersected_rd = regdom_intersect(rd, rd); //HACK
 		if (!intersected_rd)
 			return -EINVAL;