From patchwork Thu May 29 13:36:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Markowski X-Patchwork-Id: 4264361 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 40CCE9F1E7 for ; Thu, 29 May 2014 13:36:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 483E12034A for ; Thu, 29 May 2014 13:36:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E928720340 for ; Thu, 29 May 2014 13:36:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932575AbaE2NgP (ORCPT ); Thu, 29 May 2014 09:36:15 -0400 Received: from mail-we0-f179.google.com ([74.125.82.179]:64028 "EHLO mail-we0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932423AbaE2NgO (ORCPT ); Thu, 29 May 2014 09:36:14 -0400 Received: by mail-we0-f179.google.com with SMTP id q59so425688wes.10 for ; Thu, 29 May 2014 06:36:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=from:to:cc:subject:date:message-id; bh=PyZb5kUmAJt+kdedSLjeRWyCUka2Rz5BrGGjx7JJDIY=; b=GjxtQiT6CMCTqEZiy/6ZHkg5feUbgMgHS4Z3vqdGJr4lO0NUtM6aSiZmoKglKSKytP IGVsvhdcD8nclK6bqT6gkv19F389+0f2n3qY4wV6ayO8XpfPNXHGUnquW7pOWEmTUKkk nbh12DxNklshCe2cX8wOiE5fSRIW3BiRhMzqA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=PyZb5kUmAJt+kdedSLjeRWyCUka2Rz5BrGGjx7JJDIY=; b=NF/XhkZT8/8g6hqTJbdIJWx0kR4uOVn/wGlPj4A/hDl32+ubaR5sYCugfYkILKwsk0 FI2qyFBRXAfChgGp/b2z3u/w3kbdcqLEsxC6bL5U7T2TrykEA1x5OCyW6p4XaP3mmgQi G7G8sb6gHNu4XDr6Z8taGkExaEoz+6NkFrL9aomFn6iV6T3yROwLrubP8hVr385K5cWF Jvf74LIpFLvtSxTZQ/3Ty+N0cxyEOTXpYveWr3/90wtrn+kZLxJbiYpQEqJFOUvTXQ0v 5eyLmnQCRSepogmHm2bZr/wqmCnr3dWdOx4hVAH6H85DyFAIkyheSVGFL+s5nDKLpSpo 3/ZA== X-Gm-Message-State: ALoCoQmKuulZWCiP5YUTXMacwqDRBCGRgeneXONx4gZPHg5hkEIKrvlQSNHLa+iMDJFE1eAy98qESjVEn9x8X3XjoBAtbglh7+rhkXAzY4OcztLhUnbCmJg= X-Received: by 10.180.185.244 with SMTP id ff20mr11843893wic.42.1401370573224; Thu, 29 May 2014 06:36:13 -0700 (PDT) Received: from uw000975.eu.tieto.com. ([91.198.246.10]) by mx.google.com with ESMTPSA id hr4sm1820883wjb.28.2014.05.29.06.36.12 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 29 May 2014 06:36:12 -0700 (PDT) From: Bartosz Markowski To: ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Bartosz Markowski Subject: [PATCH] ath10k: fix vdev map size for 10.x firmware Date: Thu, 29 May 2014 15:36:07 +0200 Message-Id: <1401370567-13543-1-git-send-email-bartosz.markowski@tieto.com> X-Mailer: git-send-email 1.8.2 X-DomainID: tieto.com Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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 Firmware 10.x supports up to 8 virtual AP interfaces (comparing to 7 for main firmware). Previous vdev map initialization was missing enough space for 8 + 1 vdevs (we may spent one for mac monitor), due to wrong define used. Use correct one - TARGET_10X_NUM_VDEVS - for 10.x firmware. Signed-off-by: Bartosz Markowski --- drivers/net/wireless/ath/ath10k/core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index 82017f5..e6c56c5 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -795,7 +795,11 @@ int ath10k_core_start(struct ath10k *ar) if (status) goto err_htc_stop; - ar->free_vdev_map = (1 << TARGET_NUM_VDEVS) - 1; + if (test_bit(ATH10K_FW_FEATURE_WMI_10X, ar->fw_features)) + ar->free_vdev_map = (1 << TARGET_10X_NUM_VDEVS) - 1; + else + ar->free_vdev_map = (1 << TARGET_NUM_VDEVS) - 1; + INIT_LIST_HEAD(&ar->arvifs); if (!test_bit(ATH10K_FLAG_FIRST_BOOT_DONE, &ar->dev_flags))