From patchwork Thu Jun 13 00:28:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sriram R X-Patchwork-Id: 10991019 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-2.web.codeaurora.org (Postfix) with ESMTP id 9E2DA14E5 for ; Thu, 13 Jun 2019 00:28:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E76B28AD9 for ; Thu, 13 Jun 2019 00:28:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F44728AFF; Thu, 13 Jun 2019 00:28:58 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1096C28AD9 for ; Thu, 13 Jun 2019 00:28:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=jdVNw2JjGlc7H2laYE8whSoVyd3qKaqLrAttGXxB+eM=; b=ciw GirkwdmLS32o7V4Gjw51vmKq953ivvuaM7by/08IEZ9rp1mer+uAlFlIBsgpHQFHksRmbYx5UFJre ObLAbdLJbqBb/U27fhafq5n3IzXiITR94ImK8wAIZzY8e4lFpgtHtVyBPC8sSoqmSWvEKaeh2QZWD /FmjUsOemB7FqG3qaY3OqRopYIF+o7gyD/2rqzhuXz6fk8x543w6qQPc8w51Nowuh+UCJJWrdvVzI gsTH6ujq2THdJdD4z6oS5Hq1imyP2K5HQyAMUpaeArJsN3VS1Uz73ss+u5RpguDPctK7aX1YBgx40 v7jmM0aUSzJo+J486EW8pnqKBrBBu+g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hbDbs-0006AG-36; Thu, 13 Jun 2019 00:28:56 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hbDbp-00069q-FY for ath11k@lists.infradead.org; Thu, 13 Jun 2019 00:28:54 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 303EB609D4; Thu, 13 Jun 2019 00:28:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1560385730; bh=ty/u1GD7JbR2Hgr/CyAiTuzli3XYrnNdn9PVCZiQcJs=; h=From:To:Cc:Subject:Date:From; b=YDdtG5fCDXEOavTcEstXP0q8SG/HuMSjhZDhOYQ3EDXSq6J8KJ55TIpmh47ggW06c TzA02d0YSsFisp7hWz9vwsdt0ssCiFg5Uk6VNUSTsSPgNRncuthng+wRhY35Sjqp9x /HirfgXc+K+p51aJKvPVfkmc+C3lvCEVQ7hoqQ88= Received: from checstp253621-lin.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: srirrama@codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id D04A96037C; Thu, 13 Jun 2019 00:28:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1560385729; bh=ty/u1GD7JbR2Hgr/CyAiTuzli3XYrnNdn9PVCZiQcJs=; h=From:To:Cc:Subject:Date:From; b=pE+OYjJKS18P1Xltg2+NRCfx9FSGt0s84yqFApPSWvpxwrhPd0B+AvfwzKoOZIgYn No9QheTXtlpKVD8lUZt5KGeZGyXTS+JjPgjBwHa5VavQhxoLzNdL/1CrLAQ10RPoAk mVJOaJGaHp70YRzsLtmmEWutUg2jB75lXYQL3y9c= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org D04A96037C Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=srirrama@codeaurora.org From: Sriram R To: ath11k@lists.infradead.org Subject: [PATCH] ath11k: create new header file for regulatory Date: Thu, 13 Jun 2019 05:58:37 +0530 Message-Id: <1560385717-18789-1-git-send-email-srirrama@codeaurora.org> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190612_172853_553266_35424665 X-CRM114-Status: GOOD ( 10.91 ) X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sriram R MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Move regulatory related definitions from 'core.h' to a new file 'reg.h' Signed-off-by: Sriram R --- drivers/net/wireless/ath/ath11k/core.h | 20 +------------------ drivers/net/wireless/ath/ath11k/reg.h | 35 ++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 19 deletions(-) create mode 100644 drivers/net/wireless/ath/ath11k/reg.h diff --git a/drivers/net/wireless/ath/ath11k/core.h b/drivers/net/wireless/ath/ath11k/core.h index 038f905..4d42ab40 100644 --- a/drivers/net/wireless/ath/ath11k/core.h +++ b/drivers/net/wireless/ath/ath11k/core.h @@ -19,6 +19,7 @@ #include "mac.h" #include "hw.h" #include "hal_rx.h" +#include "reg.h" #define SM(_v, _f) (((_v) << _f##_LSB) & _f##_MASK) @@ -302,16 +303,6 @@ enum ath11k_stats_type { ATH11K_STATS_TYPE_MAX, }; -enum ath11k_dfs_region { - ATH11K_DFS_REG_UNSET, - ATH11K_DFS_REG_FCC, - ATH11K_DFS_REG_ETSI, - ATH11K_DFS_REG_MKK, - ATH11K_DFS_REG_CN, - ATH11K_DFS_REG_KR, - ATH11K_DFS_REG_UNDEF, -}; - struct ath11k_htt_data_stats { u64 legacy[ATH11K_COUNTER_TYPE_MAX][ATH11K_LEGACY_NUM]; u64 ht[ATH11K_COUNTER_TYPE_MAX][ATH11K_HT_MCS_NUM]; @@ -817,15 +808,6 @@ int ath11k_core_fetch_bdf(struct ath11k_base *ath11k, struct ath11k_board_data *bd); void ath11k_core_free_bdf(struct ath11k_base *sc, struct ath11k_board_data *bd); -/* ATH11K Regulatory API's */ -void ath11k_reg_init(struct ath11k *ar); -void ath11k_reg_free(struct ath11k_base *ab); -void ath11k_regd_update_work(struct work_struct *work); -struct ieee80211_regdomain * -ath11k_reg_build_regd(struct ath11k_base *ab, - struct cur_regulatory_info *reg_info, bool intersect); -int ath11k_regd_update(struct ath11k *ar, bool init); -int ath11k_reg_update_chan_list(struct ath11k *ar); void ath11k_core_halt(struct ath11k *ar); u8 ath11k_core_get_hw_mac_id(struct ath11k_base *ab, int pdev_idx); diff --git a/drivers/net/wireless/ath/ath11k/reg.h b/drivers/net/wireless/ath/ath11k/reg.h new file mode 100644 index 0000000..d0fc246 --- /dev/null +++ b/drivers/net/wireless/ath/ath11k/reg.h @@ -0,0 +1,35 @@ +/* SPDX-License-Identifier: ISC */ +/* + * Copyright (c) 2019 The Linux Foundation. All rights reserved. + */ + +#ifndef ATH11K_REG_H +#define ATH11K_REG_H + +#include +#include + +struct ath11k_base; +struct ath11k; + +/* DFS regdomains supported by Firmware */ +enum ath11k_dfs_region { + ATH11K_DFS_REG_UNSET, + ATH11K_DFS_REG_FCC, + ATH11K_DFS_REG_ETSI, + ATH11K_DFS_REG_MKK, + ATH11K_DFS_REG_CN, + ATH11K_DFS_REG_KR, + ATH11K_DFS_REG_UNDEF, +}; + +/* ATH11K Regulatory API's */ +void ath11k_reg_init(struct ath11k *ar); +void ath11k_reg_free(struct ath11k_base *ab); +void ath11k_regd_update_work(struct work_struct *work); +struct ieee80211_regdomain * +ath11k_reg_build_regd(struct ath11k_base *ab, + struct cur_regulatory_info *reg_info, bool intersect); +int ath11k_regd_update(struct ath11k *ar, bool init); +int ath11k_reg_update_chan_list(struct ath11k *ar); +#endif