From patchwork Wed Dec 17 10:20:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 5506331 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1250D9F30B for ; Wed, 17 Dec 2014 10:21:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 50DF920A25 for ; Wed, 17 Dec 2014 10:21:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6EAE320A24 for ; Wed, 17 Dec 2014 10:21:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751602AbaLQKU7 (ORCPT ); Wed, 17 Dec 2014 05:20:59 -0500 Received: from wolverine01.qualcomm.com ([199.106.114.254]:57332 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751477AbaLQKU7 (ORCPT ); Wed, 17 Dec 2014 05:20:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1418811659; x=1450347659; h=subject:to:from:cc:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=x0qPt9uLPtQongIrM8hOJmpQL0tS2NXCy2HFVgC4ODU=; b=A3IMcFrYPHBRznGozCRMRvKpimM5W179XlQzCEX+mqN/HN67IWjBGTzb iDXYhThbFVzdexXQkxqa7VJ6r7V81Wd9k7GDkocQiuQj7huxvvMT4UWrq qf6cObLsMxcRh142SpNjctvIpdQsaAiwDOGG3qWljJddZqx8OVyG+yOd0 s=; X-IronPort-AV: E=McAfee;i="5600,1067,7654"; a="93933873" Received: from ironmsg02-lv.qualcomm.com ([10.47.202.183]) by wolverine01.qualcomm.com with ESMTP; 17 Dec 2014 02:20:59 -0800 X-IronPort-AV: E=Sophos;i="5.07,592,1413270000"; d="scan'208";a="31310071" Received: from nalasexr01g.na.qualcomm.com ([10.49.56.53]) by ironmsg02-lv.qualcomm.com with ESMTP/TLS/RC4-SHA; 17 Dec 2014 02:21:00 -0800 Received: from potku.adurom.net (10.80.80.8) by NALASEXR01G.na.qualcomm.com (10.49.56.53) with Microsoft SMTP Server (TLS) id 15.0.913.22; Wed, 17 Dec 2014 02:20:57 -0800 Subject: [PATCH v2 2/8] ath10k: use wmi op version to check which iface combination to use To: From: Kalle Valo CC: Date: Wed, 17 Dec 2014 12:20:54 +0200 Message-ID: <20141217102054.15964.32162.stgit@potku.adurom.net> In-Reply-To: <20141217101755.15964.2625.stgit@potku.adurom.net> References: <20141217101755.15964.2625.stgit@potku.adurom.net> User-Agent: StGit/0.15 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01B.na.qualcomm.com (10.85.0.82) To NALASEXR01G.na.qualcomm.com (10.49.56.53) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP ATH10K_FW_FEATURE_WMI_10X should not be used for anymore as that's now deprecated, instead use wmi op version. Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath10k/mac.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 5475f0fbbe41..4576d758d50b 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -5064,16 +5064,25 @@ int ath10k_mac_register(struct ath10k *ar) */ ar->hw->queues = 4; - if (test_bit(ATH10K_FW_FEATURE_WMI_10X, ar->fw_features)) { - ar->hw->wiphy->iface_combinations = ath10k_10x_if_comb; - ar->hw->wiphy->n_iface_combinations = - ARRAY_SIZE(ath10k_10x_if_comb); - } else { + switch (ar->wmi.op_version) { + case ATH10K_FW_WMI_OP_VERSION_MAIN: + case ATH10K_FW_WMI_OP_VERSION_TLV: ar->hw->wiphy->iface_combinations = ath10k_if_comb; ar->hw->wiphy->n_iface_combinations = ARRAY_SIZE(ath10k_if_comb); - ar->hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_ADHOC); + break; + case ATH10K_FW_WMI_OP_VERSION_10_1: + case ATH10K_FW_WMI_OP_VERSION_10_2: + ar->hw->wiphy->iface_combinations = ath10k_10x_if_comb; + ar->hw->wiphy->n_iface_combinations = + ARRAY_SIZE(ath10k_10x_if_comb); + break; + case ATH10K_FW_WMI_OP_VERSION_UNSET: + case ATH10K_FW_WMI_OP_VERSION_MAX: + WARN_ON(1); + ret = -EINVAL; + goto err_free; } ar->hw->netdev_features = NETIF_F_HW_CSUM;