Linux-Wireless Archive on lore.kernel.org
 help / color / Atom feed
From: Kalle Valo <kvalo@qca.qualcomm.com>
To: <ath10k@lists.infradead.org>
Cc: <linux-wireless@vger.kernel.org>
Subject: [PATCH v2 2/8] ath10k: use wmi op version to check which iface combination to use
Date: Wed, 17 Dec 2014 12:20:54 +0200
Message-ID: <20141217102054.15964.32162.stgit@potku.adurom.net> (raw)
In-Reply-To: <20141217101755.15964.2625.stgit@potku.adurom.net>

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 <kvalo@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath10k/mac.c |   21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

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;


  parent reply index

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-17 10:20 [PATCH v2 0/8] ath10k: Add thermal mitigation support Kalle Valo
2014-12-17 10:20 ` [PATCH v2 1/8] ath10k: set max_num_vdevs based on wmi op version Kalle Valo
2014-12-17 10:20 ` Kalle Valo [this message]
2014-12-17 10:21 ` [PATCH v2 3/8] ath10k: print ath10k " Kalle Valo
2014-12-17 10:21 ` [PATCH v2 4/8] ath10k: add 10.2.4 firmware support Kalle Valo
2014-12-17 10:21 ` [PATCH v2 5/8] ath10k: add wmi support for pdev_set_quiet_mode Kalle Valo
2014-12-17 10:22 ` [PATCH v2 6/8] ath10k: add thermal cooling device support Kalle Valo
2014-12-17 10:22 ` [PATCH v2 7/8] ath10k: add wmi interface for pdev_get_temperature Kalle Valo
2014-12-17 10:22 ` [PATCH v2 8/8] ath10k: add thermal sensor device support Kalle Valo
     [not found]   ` <5491D20F.2020202@dd-wrt.com>
2014-12-23 17:43     ` Kalle Valo
2014-12-23 19:52       ` Sebastian Gottschall
2014-12-23 15:21 ` [PATCH v2 0/8] ath10k: Add thermal mitigation support Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141217102054.15964.32162.stgit@potku.adurom.net \
    --to=kvalo@qca.qualcomm.com \
    --cc=ath10k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Wireless Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-wireless/0 linux-wireless/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-wireless linux-wireless/ https://lore.kernel.org/linux-wireless \
		linux-wireless@vger.kernel.org
	public-inbox-index linux-wireless

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-wireless


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git