From patchwork Tue Aug 2 12:20:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Markowski X-Patchwork-Id: 9256535 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0601160754 for ; Tue, 2 Aug 2016 12:21:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EBBC12851C for ; Tue, 2 Aug 2016 12:21:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E084E28523; Tue, 2 Aug 2016 12:21:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9F4482851C for ; Tue, 2 Aug 2016 12:21:40 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bUYhS-0007NK-OJ; Tue, 02 Aug 2016 12:21:34 +0000 Received: from mail-lf0-x22e.google.com ([2a00:1450:4010:c07::22e]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bUYhN-0007Ax-9j for ath10k@lists.infradead.org; Tue, 02 Aug 2016 12:21:32 +0000 Received: by mail-lf0-x22e.google.com with SMTP id g62so136906417lfe.3 for ; Tue, 02 Aug 2016 05:21:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=S6zInS02mF1GcVhxbx/z1OnyVwH0mqcKvJtVbRcaFcM=; b=okRlsQWWdySvXN2PYvzLkoIKWLiEO7BVd4m+hDIuelKR5IiQpOG5aM8xUvg0fCr7vI MbcI9DGK4wlCErO3EnVCQqS+emRIBKkn7Usq8k7yw3knRqb6txBvAqtwISypebi4eZFu 8n+c+RZHIb950On4XWc2jh5S5IPv4G2E1bc30= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=S6zInS02mF1GcVhxbx/z1OnyVwH0mqcKvJtVbRcaFcM=; b=XF8SfaDHVbcdg2aU3WWW1dh4lF2ZLTdrXlgPbJiE+xeoU2cv/A4JyGM9Cs9Jhs89PU SbbBBpJKtaODgyAPakW+KPT6UalenL3rEI6w09jaEtVgC2fmzeaxM3dRMaEkvPlpHmNi Yw6wc/I+XV/y2iMt2bsgYM/+Su6IaO7V1V/6A9yxMymJW7HUoIhNyKqRzE6USnd9X8eS XabhkomNuiNhn3kM2ecwEQ2+6eyk23+Miiiv0w6n81f7H3o8KJOjp/5MiPxz5tipS8L/ K6/6c21eKUvIvu0Ie7/lt1hxBhAyFt0t8yF5a4uQFFOjSHMaRjJkJ1qU290iaoo0za2D VsNQ== X-Gm-Message-State: AEkoousdwYWbhdxNu6fwYOyxW/8N4fKDM5JgkDdd6yPPj5KYHoZDjePmprYu4krLYrnpBfRrCXuqQK05V2A5n+MXOIYb691XFCHHvgvulZxa88KYg8++xz2ZpzV/DRrkU2BWoh3Ewu8hC6H5VN3hCBK2whjQJSFuqPthCWTH3hO5uxJgjrN9+KNGh4uRbK3/mvA3j30= X-Received: by 10.25.157.19 with SMTP id g19mr23267816lfe.216.1470140465255; Tue, 02 Aug 2016 05:21:05 -0700 (PDT) Received: from uw000975.eu.tieto.com ([91.198.246.10]) by smtp.gmail.com with ESMTPSA id 98sm445633lja.37.2016.08.02.05.21.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 02 Aug 2016 05:21:04 -0700 (PDT) From: Bartosz Markowski To: ath10k@lists.infradead.org Subject: [PATCH 1/2] ath: export alpha2 helper Date: Tue, 2 Aug 2016 14:20:53 +0200 Message-Id: <1470140454-3899-2-git-send-email-bartosz.markowski@tieto.com> X-Mailer: git-send-email 2.1.2 In-Reply-To: <1470140454-3899-1-git-send-email-bartosz.markowski@tieto.com> References: <1470140454-3899-1-git-send-email-bartosz.markowski@tieto.com> X-DomainID: tieto.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160802_052129_678423_447EB1EC X-CRM114-Status: UNSURE ( 9.27 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-wireless@vger.kernel.org, Michal Kazior , Bartosz Markowski MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Michal Kazior This will be helpful for drivers that can acquire alpha2 regulatory codes. Signed-off-by: Michal Kazior Signed-off-by: Bartosz Markowski --- drivers/net/wireless/ath/regd.c | 3 ++- drivers/net/wireless/ath/regd.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c index 7e15ed9ed31f..820bf880ada3 100644 --- a/drivers/net/wireless/ath/regd.c +++ b/drivers/net/wireless/ath/regd.c @@ -449,7 +449,7 @@ static void ath_reg_apply_world_flags(struct wiphy *wiphy, } } -static u16 ath_regd_find_country_by_name(char *alpha2) +u16 ath_regd_find_country_by_name(char *alpha2) { unsigned int i; @@ -460,6 +460,7 @@ static u16 ath_regd_find_country_by_name(char *alpha2) return -1; } +EXPORT_SYMBOL(ath_regd_find_country_by_name); static int __ath_reg_dyn_country(struct wiphy *wiphy, struct ath_regulatory *reg, diff --git a/drivers/net/wireless/ath/regd.h b/drivers/net/wireless/ath/regd.h index 565d3075f06e..5d80be213fac 100644 --- a/drivers/net/wireless/ath/regd.h +++ b/drivers/net/wireless/ath/regd.h @@ -251,6 +251,7 @@ enum CountryCode { bool ath_is_world_regd(struct ath_regulatory *reg); bool ath_is_49ghz_allowed(u16 redomain); +u16 ath_regd_find_country_by_name(char *alpha2); int ath_regd_init(struct ath_regulatory *reg, struct wiphy *wiphy, void (*reg_notifier)(struct wiphy *wiphy, struct regulatory_request *request));