From patchwork Thu Jun 13 00:31:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sriram R X-Patchwork-Id: 10991021 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 D386376 for ; Thu, 13 Jun 2019 00:31:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BC03B28AD9 for ; Thu, 13 Jun 2019 00:31:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B080128AFF; Thu, 13 Jun 2019 00:31:18 +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 5248A28AD9 for ; Thu, 13 Jun 2019 00:31:18 +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=vKJNs9oQI+MdKRj7awwHJ67nkDR5UUSpqvssCn0vgyM=; b=Y3K LQ8K8Sq5g8xEUlOZZkSDLL+fVL0F3BbI3/0nrDgKmjbT5UN/wGGek9u1AUFMvmCTRw2B9xsPE8Msu AqIO3zRlbF2cZ4ttXakV3+p609yI0aFMmh8VIpFJ3pIrDqyckmYv+luFVOksLjWKa3IXRTpgdHfIq +ersEvSU49hN5XEE49acXByUeCNXfOJEAkeV9iwz0r5Nn4n9Nql1Q8y/A05wouEJpyJqbVDnrmnE7 ysNxkeuvH6r3fdPk9pfuLut+x4w2mNcOa6gV+qcyPOFMiXxt5W386w5WHODp1cVzkc5+qdWkzzRyt LILUQ++WrA43PDRHXJImGvFh3jZlmHg==; 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 1hbDe9-00087b-GU; Thu, 13 Jun 2019 00:31:17 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hbDe6-000878-L2 for ath11k@lists.infradead.org; Thu, 13 Jun 2019 00:31:16 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 60EF060A33; Thu, 13 Jun 2019 00:31:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1560385874; bh=D9ehy6qnkAWcF2x+3d1MGBQmnAGvfdQJDxcofj5GFQw=; h=From:To:Cc:Subject:Date:From; b=EYV44ZGOGPMZs3DNgy81R+OAQtj6J0vyQXF7rfkiHeQissq4cX7KcmOcdnT3pUZL0 og7HAdcQRc2O0sFMT31luiOHIxDDtTWvHbARmZPFMa3swLJw+wqi/2cK4tlUuMri8r K9mhb3vI1+fS5P55pJte/fxEkCW2j4JTTEfRXBS0= 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 0FCAB6037C; Thu, 13 Jun 2019 00:31:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1560385874; bh=D9ehy6qnkAWcF2x+3d1MGBQmnAGvfdQJDxcofj5GFQw=; h=From:To:Cc:Subject:Date:From; b=EYV44ZGOGPMZs3DNgy81R+OAQtj6J0vyQXF7rfkiHeQissq4cX7KcmOcdnT3pUZL0 og7HAdcQRc2O0sFMT31luiOHIxDDtTWvHbARmZPFMa3swLJw+wqi/2cK4tlUuMri8r K9mhb3vI1+fS5P55pJte/fxEkCW2j4JTTEfRXBS0= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 0FCAB6037C 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: cleanup warnings due to conflicting enum types Date: Thu, 13 Jun 2019 06:01:01 +0530 Message-Id: <1560385861-18893-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_173114_725704_61020D2E X-CRM114-Status: UNSURE ( 9.37 ) X-CRM114-Notice: Please train this message. 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 Cleanup warnings due to conflicting enum types dfs_reg and ath11k_dfs_region This will resolve the below warning. "drivers/net/wireless/ath/ath11k/wmi.c:4597:34: warning: mixing different enum types" Signed-off-by: Sriram R --- drivers/net/wireless/ath/ath11k/reg.c | 16 ++++++++-------- drivers/net/wireless/ath/ath11k/wmi.h | 12 +----------- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/reg.c b/drivers/net/wireless/ath/ath11k/reg.c index ef16931..cc847a7 100644 --- a/drivers/net/wireless/ath/ath11k/reg.c +++ b/drivers/net/wireless/ath/ath11k/reg.c @@ -263,16 +263,16 @@ int ath11k_regd_update(struct ath11k *ar, bool init) } static enum nl80211_dfs_regions -ath11k_map_fw_dfs_region(enum dfs_reg dfs_region) +ath11k_map_fw_dfs_region(enum ath11k_dfs_region dfs_region) { switch (dfs_region) { - case DFS_FCC_REG: - case DFS_CN_REG: + case ATH11K_DFS_REG_FCC: + case ATH11K_DFS_REG_CN: return NL80211_DFS_FCC; - case DFS_ETSI_REG: - case DFS_KR_REG: + case ATH11K_DFS_REG_ETSI: + case ATH11K_DFS_REG_KR: return NL80211_DFS_ETSI; - case DFS_MKK_REG: + case ATH11K_DFS_REG_MKK: return NL80211_DFS_JP; default: return NL80211_DFS_UNSET; @@ -568,7 +568,7 @@ ath11k_reg_build_regd(struct ath11k_base *ab, goto ret; /* Add max additional rules to accommodate weather radar band */ - if (reg_info->dfs_region == DFS_ETSI_REG) + if (reg_info->dfs_region == ATH11K_DFS_REG_ETSI) num_rules += 2; tmp_regd = kzalloc(sizeof(*tmp_regd) + @@ -631,7 +631,7 @@ ath11k_reg_build_regd(struct ath11k_base *ab, * need to update that for other rules. */ if (flags & NL80211_RRF_DFS && - reg_info->dfs_region == DFS_ETSI_REG && + reg_info->dfs_region == ATH11K_DFS_REG_ETSI && (reg_rule->end_freq > ETSI_WEATHER_RADAR_BAND_LOW && reg_rule->start_freq < ETSI_WEATHER_RADAR_BAND_HIGH)){ ath11k_reg_update_weather_radar_band(ab, tmp_regd, diff --git a/drivers/net/wireless/ath/ath11k/wmi.h b/drivers/net/wireless/ath/ath11k/wmi.h index 441fe43..58a2fcd 100644 --- a/drivers/net/wireless/ath/ath11k/wmi.h +++ b/drivers/net/wireless/ath/ath11k/wmi.h @@ -4283,16 +4283,6 @@ enum cc_setting_code { REG_SET_CC_STATUS_FAIL = 5, }; -enum dfs_reg { - DFS_UNINIT_REG = 0, - DFS_FCC_REG = 1, - DFS_ETSI_REG = 2, - DFS_MKK_REG = 3, - DFS_CN_REG = 4, - DFS_KR_REG = 5, - DFS_UNDEF_REG -}; - /* Regaulatory Rule Flags Passed by FW */ #define REGULATORY_CHAN_DISABLED BIT(0) #define REGULATORY_CHAN_NO_IR BIT(1) @@ -4331,7 +4321,7 @@ struct cur_regulatory_info { u16 reg_dmn_pair; u16 ctry_code; u8 alpha2[REG_ALPHA2_LEN + 1]; - enum dfs_reg dfs_region; + u32 dfs_region; u32 phybitmap; u32 min_bw_2g; u32 max_bw_2g;