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: 9258433 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 A79816089F for ; Tue, 2 Aug 2016 15:54:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9A38828572 for ; Tue, 2 Aug 2016 15:54:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8F0BC28576; Tue, 2 Aug 2016 15:54:05 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B5C5328572 for ; Tue, 2 Aug 2016 15:54:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967683AbcHBPxs (ORCPT ); Tue, 2 Aug 2016 11:53:48 -0400 Received: from mail-lf0-f54.google.com ([209.85.215.54]:33463 "EHLO mail-lf0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934624AbcHBMVH (ORCPT ); Tue, 2 Aug 2016 08:21:07 -0400 Received: by mail-lf0-f54.google.com with SMTP id b199so137141028lfe.0 for ; Tue, 02 Aug 2016 05:21:06 -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=digiOhnmq5CVAx8D9uKCSBe18bOs5h6VeATMwTYTdpyGl5l3XEMzRn40j5Lo0XCkxf lVvLvArRN8gX9WOAKk81bqhnKfAJ6EBEoZgIrrP8ME9WJ7Psqr7JroCstxgV/HeMqeyJ KHVScbTY4BZCCClijFqO7M0wiq2iulgE7uO/2QSZUvDjfunOS031wvsARSi9MPsHk/s6 niVxafjljq7TC11hOFwE5YSi+Xdr3NsBWQtjzWMWKje0pnTr090kMUbDnGC30nBF1A/B xsMUhweAwP01SXdjsYtD4wB2nfSLkyAroRBZ+xA5oYaP3tIYe7WxFvJo+KPfvRoC/LHR ge6g== X-Gm-Message-State: AEkoousVAONn1ymy9pgTpsP7J9ugT1GLj3e/xaa1XheaG57slTAdVA4vN8EheLnzhr/toKeQRz9ilWa++mRG+emeYSCjlddz/iMns//AyLs1Ts5elKo0ZDrrRkcaJ+BGO/NaxNBPbkmkjQ== 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 Cc: linux-wireless@vger.kernel.org, Michal Kazior , Bartosz Markowski 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 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.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));