From patchwork Thu May 27 16:10:41 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?THVrw4PCocOFwqEgVHVyZWs=?= <8an@praha12.net> X-Patchwork-Id: 102727 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4RGJOQN017715 for ; Thu, 27 May 2010 16:19:24 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754600Ab0E0QTX (ORCPT ); Thu, 27 May 2010 12:19:23 -0400 Received: from parez.praha12.net ([78.108.102.1]:43156 "EHLO parez.praha12.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754228Ab0E0QTW (ORCPT ); Thu, 27 May 2010 12:19:22 -0400 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 27 May 2010 16:19:24 +0000 (UTC) X-Greylist: delayed 505 seconds by postgrey-1.27 at vger.kernel.org; Thu, 27 May 2010 12:19:22 EDT Received: from 8an.javor.praha12.czf (8an.javor.praha12.czf [10.27.67.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by parez.praha12.net (Postfix) with ESMTPS id 55801C2248 for ; Thu, 27 May 2010 18:10:55 +0200 (CEST) From: =?utf-8?q?Luk=C3=A1=C5=A1_Turek?= <8an@praha12.net> Reply-To: 8an@praha12.net To: linux-wireless@vger.kernel.org Subject: Regulatory problem with multiple wireless interfaces Date: Thu, 27 May 2010 18:10:41 +0200 User-Agent: KMail/1.9.10 MIME-Version: 1.0 Message-Id: <201005271810.55211.8an@praha12.net> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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;