From patchwork Mon Dec 20 17:02:29 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Rodriguez X-Patchwork-Id: 421741 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBKH2oJ8010961 for ; Mon, 20 Dec 2010 17:02:57 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932912Ab0LTRCv (ORCPT ); Mon, 20 Dec 2010 12:02:51 -0500 Received: from mail.atheros.com ([12.19.149.2]:63459 "EHLO mail.atheros.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932891Ab0LTRCv (ORCPT ); Mon, 20 Dec 2010 12:02:51 -0500 Received: from mail.atheros.com ([10.10.20.105]) by sidewinder.atheros.com for ; Mon, 20 Dec 2010 09:02:35 -0800 Received: from tux (10.10.10.239) by SC1EXHC-01.global.atheros.com (10.10.20.106) with Microsoft SMTP Server (TLS) id 8.2.213.0; Mon, 20 Dec 2010 09:02:47 -0800 Received: by tux (sSMTP sendmail emulation); Mon, 20 Dec 2010 12:02:46 -0500 From: "Luis R. Rodriguez" To: CC: , , , , , "Luis R. Rodriguez" Subject: [PATCH 2/2] cfg80211: pass DFS region to drivers through reg_notifier() Date: Mon, 20 Dec 2010 12:02:29 -0500 Message-ID: <1292864555-28661-4-git-send-email-lrodriguez@atheros.com> X-Mailer: git-send-email 1.7.3.2.90.gd4c43 In-Reply-To: <1292864555-28661-1-git-send-email-lrodriguez@atheros.com> References: <1292864555-28661-1-git-send-email-lrodriguez@atheros.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 20 Dec 2010 17:02:59 +0000 (UTC) diff --git a/include/net/regulatory.h b/include/net/regulatory.h index 9fcb603..3ed16c5 100644 --- a/include/net/regulatory.h +++ b/include/net/regulatory.h @@ -40,6 +40,10 @@ enum environment_cap { * 99 - built by driver but a specific alpha2 cannot be determined * 98 - result of an intersection between two regulatory domains * 97 - regulatory domain has not yet been configured + * @dfs_region: If CRDA responded with a regulatory domain that requires + * DFS master operation on a known DFS region (NL80211_CFLAG_DFS_*), + * dfs_region represents that region. Drivers can use this and the + * @alpha2 to adjust their device's DFS parameters as they wish. * @intersect: indicates whether the wireless core should intersect * the requested regulatory domain with the presently set regulatory * domain. @@ -59,6 +63,7 @@ struct regulatory_request { int wiphy_idx; enum nl80211_reg_initiator initiator; char alpha2[2]; + u8 dfs_region; bool intersect; bool processed; enum environment_cap country_ie_env; diff --git a/net/wireless/reg.c b/net/wireless/reg.c index a3731d2..fc842a2 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -1127,8 +1127,12 @@ void wiphy_update_regulatory(struct wiphy *wiphy, { enum ieee80211_band band; + last_request->dfs_region = (cfg80211_regdomain->flags & + NL80211_CFLAG_ALL_DFS_FLAGS); + if (ignore_reg_update(wiphy, initiator)) goto out; + for (band = 0; band < IEEE80211_NUM_BANDS; band++) { if (wiphy->bands[band]) handle_band(wiphy, band, initiator);