From patchwork Tue Jul 17 22:27:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Luis R. Rodriguez" X-Patchwork-Id: 1207351 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 34CD83FC8E for ; Tue, 17 Jul 2012 22:28:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756353Ab2GQW2B (ORCPT ); Tue, 17 Jul 2012 18:28:01 -0400 Received: from wolverine01.qualcomm.com ([199.106.114.254]:57706 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751516Ab2GQW2A (ORCPT ); Tue, 17 Jul 2012 18:28:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1342564081; x=1374100081; h=from:cc:to:subject:date:message-id:mime-version; bh=BgwUYa2YMnoiP5rqHBfawzN0TBMe9uav3QHznQ6R0LE=; b=M+/sx23y1wO14dNbXkMVW8ewRs8JSQzgrAcEzhT5+TrKQtrg0ObjCoYs iYNxldWddTVMxsfCeKPrRFSdRa48zHTuf1lojA2cW0cs9u8HX8cgPiYkD D9CWERJeIsO9q3KqynuDXhcVZDCQHDDVwkjoCSLdInbbap+6ywJ+92Dee E=; X-IronPort-AV: E=McAfee;i="5400,1158,6775"; a="211651612" Received: from ironmsg02-l.qualcomm.com ([172.30.48.16]) by wolverine01.qualcomm.com with ESMTP; 17 Jul 2012 15:28:00 -0700 From: "Luis R. Rodriguez" Cc: , "Luis R. Rodriguez" X-IronPort-AV: E=Sophos;i="4.77,605,1336374000"; d="scan'208";a="121766750" Received: from nasanexhc04.na.qualcomm.com ([172.30.48.17]) by ironmsg02-L.qualcomm.com with ESMTP/TLS/RC4-SHA; 17 Jul 2012 15:28:00 -0700 Received: from tux (172.30.48.1) by qcmail1.qualcomm.com (172.30.48.17) with Microsoft SMTP Server (TLS) id 14.2.309.2; Tue, 17 Jul 2012 15:27:58 -0700 Received: by tux (sSMTP sendmail emulation); Tue, 17 Jul 2012 15:27:57 -0700 To: , , Subject: [RFC] ath: add feature to enable cell base station regulatory hints Date: Tue, 17 Jul 2012 15:27:56 -0700 Message-ID: <1342564076-4010-1-git-send-email-mcgrof@qca.qualcomm.com> X-Mailer: git-send-email 1.7.10.rc1.22.gf5241 MIME-Version: 1.0 X-Originating-IP: [172.30.48.1] Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: "Luis R. Rodriguez" This enables the capability to enable cellular base station regulatory hint support to ath5k, ath9k, ath9k_htc and carl9170. Signed-off-by: Luis R. Rodriguez --- Sending as RFC given that I'd like review from Sujith and Christian on the firmware side of things on ath9k_htc and carl9170. I am pretty certain both allow us to do all regulatory control on the driver and becuase of this we should be able to support this feature, however I'd like to be sure. Other drivers that have this regulatory control in firmware require quite a bit of testing / synching, as with ath6kl -- but we should be fine here. We don't enable this by default as we don't want all Linux distributions to be enabling CFG80211_CERTIFICATION_ONUS sporadically, instead this must be done by system integrators on case by case basis only when they are targeting supporting and testing these features. drivers/net/wireless/ath/Kconfig | 14 ++++++++++++++ drivers/net/wireless/ath/regd.c | 12 ++++++++++++ 2 files changed, 26 insertions(+) diff --git a/drivers/net/wireless/ath/Kconfig b/drivers/net/wireless/ath/Kconfig index 0960224..6d4f581 100644 --- a/drivers/net/wireless/ath/Kconfig +++ b/drivers/net/wireless/ath/Kconfig @@ -22,6 +22,20 @@ config ATH_DEBUG Say Y, if you want to debug atheros wireless drivers. Right now only ath9k makes use of this. +config ATH_CELL_STATION_HINT + bool "Atheros common cell base station hint support" + depends on (ATH9K || ATH9K_HTC || ATH5K || CARL9170) + depends on CFG80211_CERTIFICATION_ONUS + default n + ---help--- + You should disable this feature unless you are a system + integrator and want to enable cellular base station + regulatory hint support onto either or these drivers: + ath5k, ath9k, ath9k_htc, carl9170. You should disable + this feature unless you are building a specific system + you are providing complete oversight over and are willing + and able to test regulatory compliance for it. + source "drivers/net/wireless/ath/ath5k/Kconfig" source "drivers/net/wireless/ath/ath9k/Kconfig" source "drivers/net/wireless/ath/carl9170/Kconfig" diff --git a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c index d816980..6751533 100644 --- a/drivers/net/wireless/ath/regd.c +++ b/drivers/net/wireless/ath/regd.c @@ -504,6 +504,17 @@ ath_get_regpair(int regdmn) return NULL; } +#ifdef CONFIG_ATH_CELL_STATION_HINT +static void ath_regd_features(struct wiphy *wiphy) +{ + wiphy->features |= NL80211_FEATURE_CELL_BASE_REG_HINTS; +} +#else +static void ath_regd_features(struct wiphy *wiphy) +{ +} +#endif + static int ath_regd_init_wiphy(struct ath_regulatory *reg, struct wiphy *wiphy, @@ -514,6 +525,7 @@ ath_regd_init_wiphy(struct ath_regulatory *reg, wiphy->reg_notifier = reg_notifier; wiphy->flags |= WIPHY_FLAG_STRICT_REGULATORY; + ath_regd_features(wiphy); if (ath_is_world_regd(reg)) { /*