From patchwork Tue Jan 25 04:15:33 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Randolf X-Patchwork-Id: 504001 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 p0P4FUca001394 for ; Tue, 25 Jan 2011 04:15:39 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752802Ab1AYEPh (ORCPT ); Mon, 24 Jan 2011 23:15:37 -0500 Received: from mail30f.wh2.ocn.ne.jp ([220.111.41.203]:33509 "HELO mail30f.wh2.ocn.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752559Ab1AYEPh (ORCPT ); Mon, 24 Jan 2011 23:15:37 -0500 Received: from vs3015.wh2.ocn.ne.jp (125.206.180.247) by mail30f.wh2.ocn.ne.jp (RS ver 1.0.95vs) with SMTP id 4-0848848934 for ; Tue, 25 Jan 2011 13:15:35 +0900 (JST) Received: (qmail 7315 invoked from network); 25 Jan 2011 04:15:34 -0000 Received: from unknown (HELO localhost6.localdomain6) (220.110.201.18) by with SMTP; 25 Jan 2011 04:15:34 -0000 Subject: [PATCH 3/6] ath: Add function to check if 4.9GHz channels are allowed To: linville@tuxdriver.com From: Bruno Randolf Cc: ath5k-devel@venema.h4ckr.net, linux-wireless@vger.kernel.org Date: Tue, 25 Jan 2011 13:15:33 +0900 Message-ID: <20110125041533.6944.79709.stgit@localhost6.localdomain6> In-Reply-To: <20110125041522.6944.22566.stgit@localhost6.localdomain6> References: <20110125041522.6944.22566.stgit@localhost6.localdomain6> User-Agent: StGit/0.15 MIME-Version: 1.0 X-SF-Loop: 1 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.6 (demeter1.kernel.org [140.211.167.41]); Tue, 25 Jan 2011 04:15:39 +0000 (UTC) diff --git a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c index 2b14775..f828f29 100644 --- a/drivers/net/wireless/ath/regd.c +++ b/drivers/net/wireless/ath/regd.c @@ -158,6 +158,13 @@ ieee80211_regdomain *ath_world_regdomain(struct ath_regulatory *reg) } } +bool ath_is_49ghz_allowed(u16 regdomain) +{ + /* possibly more */ + return regdomain == MKK9_MKKC; +} +EXPORT_SYMBOL(ath_is_49ghz_allowed); + /* Frequency is one where radar detection is required */ static bool ath_is_radar_freq(u16 center_freq) { diff --git a/drivers/net/wireless/ath/regd.h b/drivers/net/wireless/ath/regd.h index 345dd97..172f63f 100644 --- a/drivers/net/wireless/ath/regd.h +++ b/drivers/net/wireless/ath/regd.h @@ -250,6 +250,7 @@ enum CountryCode { }; bool ath_is_world_regd(struct ath_regulatory *reg); +bool ath_is_49ghz_allowed(u16 redomain); int ath_regd_init(struct ath_regulatory *reg, struct wiphy *wiphy, int (*reg_notifier)(struct wiphy *wiphy, struct regulatory_request *request));