From patchwork Wed Dec 17 10:20:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 5506321 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DDF32BEEA8 for ; Wed, 17 Dec 2014 10:20:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1B67820A25 for ; Wed, 17 Dec 2014 10:20:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9155720A24 for ; Wed, 17 Dec 2014 10:20:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751520AbaLQKUx (ORCPT ); Wed, 17 Dec 2014 05:20:53 -0500 Received: from wolverine01.qualcomm.com ([199.106.114.254]:49317 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751033AbaLQKUw (ORCPT ); Wed, 17 Dec 2014 05:20:52 -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=1418811652; x=1450347652; h=subject:to:from:cc:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=hrvDT5tkxCUj/dwz6RXn+ge8iYFuqooGvxhZ2Hnfszc=; b=i8LMUB/YREbc4f7qDaBiVKcYBDh1dbiZnsI5YBMCIY9DBvUGcKw6XMOW aDK17dPzeyYBifWzdat+XKmXOWciBBMOS1CKwStfFvzhmzroLziDGiF7W B1+vRg2SD4rGQKDEnvlvVDVW5fryCWdkYBH8osej2qB/vczPMl6woPugQ k=; X-IronPort-AV: E=McAfee;i="5600,1067,7654"; a="93933727" Received: from ironmsg06-lv.qualcomm.com ([10.47.202.185]) by wolverine01.qualcomm.com with ESMTP; 17 Dec 2014 02:20:49 -0800 X-IronPort-AV: E=Sophos;i="5.07,593,1413270000"; d="scan'208";a="16750580" Received: from nalasexr01g.na.qualcomm.com ([10.49.56.53]) by Ironmsg06-lv.qualcomm.com with ESMTP/TLS/RC4-SHA; 17 Dec 2014 02:20:49 -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:48 -0800 Subject: [PATCH v2 1/8] ath10k: set max_num_vdevs based on wmi op version To: From: Kalle Valo CC: Date: Wed, 17 Dec 2014 12:20:45 +0200 Message-ID: <20141217102044.15964.60991.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: NASANEXM01F.na.qualcomm.com (10.85.0.32) 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 To make it easier to manage firmware differences, we should not use ATH10K_FW_FEATURE_WMI_10X outside ath10k_core_init_firmware_features(). To achieve that create new field ar->max_num_vdevs and set it based on wmi op version. Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath10k/core.c | 7 +++---- drivers/net/wireless/ath/ath10k/core.h | 1 + 2 files changed, 4 insertions(+), 4 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/core.c b/drivers/net/wireless/ath/ath10k/core.c index 577a3d76df22..f17366620fde 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -907,12 +907,14 @@ static int ath10k_core_init_firmware_features(struct ath10k *ar) case ATH10K_FW_WMI_OP_VERSION_MAIN: ar->max_num_peers = TARGET_NUM_PEERS; ar->max_num_stations = TARGET_NUM_STATIONS; + ar->max_num_vdevs = TARGET_NUM_VDEVS; ar->htt.max_num_pending_tx = TARGET_NUM_MSDU_DESC; break; case ATH10K_FW_WMI_OP_VERSION_10_1: case ATH10K_FW_WMI_OP_VERSION_10_2: ar->max_num_peers = TARGET_10X_NUM_PEERS; ar->max_num_stations = TARGET_10X_NUM_STATIONS; + ar->max_num_vdevs = TARGET_10X_NUM_VDEVS; ar->htt.max_num_pending_tx = TARGET_10X_NUM_MSDU_DESC; break; case ATH10K_FW_WMI_OP_VERSION_TLV: @@ -1064,10 +1066,7 @@ int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode) if (status) goto err_hif_stop; - if (test_bit(ATH10K_FW_FEATURE_WMI_10X, ar->fw_features)) - ar->free_vdev_map = (1LL << TARGET_10X_NUM_VDEVS) - 1; - else - ar->free_vdev_map = (1LL << TARGET_NUM_VDEVS) - 1; + ar->free_vdev_map = (1LL << ar->max_num_vdevs) - 1; INIT_LIST_HEAD(&ar->arvifs); diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h index 613355cc6895..3998f1e33874 100644 --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h @@ -581,6 +581,7 @@ struct ath10k { int max_num_peers; int max_num_stations; + int max_num_vdevs; struct work_struct offchan_tx_work; struct sk_buff_head offchan_tx_queue;