From patchwork Thu Sep 13 14:45:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erik Stromdahl X-Patchwork-Id: 10599685 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 B250A14DB for ; Thu, 13 Sep 2018 14:45:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A265A2B093 for ; Thu, 13 Sep 2018 14:45:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9675D2B095; Thu, 13 Sep 2018 14:45:37 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 259F92B093 for ; Thu, 13 Sep 2018 14:45:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727773AbeIMTzY (ORCPT ); Thu, 13 Sep 2018 15:55:24 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:38111 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726580AbeIMTzY (ORCPT ); Thu, 13 Sep 2018 15:55:24 -0400 Received: by mail-lj1-f194.google.com with SMTP id p6-v6so4838446ljc.5 for ; Thu, 13 Sep 2018 07:45:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=nOxQSly3qFkY5sLdxDVq8Oxj2ZaXRYjBEcYf6a56b4o=; b=Y4XWdgd8uIlzWkedNhXmj1H1c96GPf0BISmS/5ntHZx+2+qgeIBZSQr0rD852912Do BGdPfbNx/bt9AjACP+7sRMVMFfGoUXOhbYvA49eZkdRE6h/mBzZUeD27439X0ZnpiRc4 Wl33Z0Ft4+GHeOQlARa+xZdo/ZlF3/K89KbXAgcOJcijj9enEpNhswCkmUmXZQI3YgHF w8EWWA7GDC8QOI4W8rilJEnJAh4orTnUSqpHXjyjYe2O0tbB9k9LDqdEEBu86WAHJ8Ph aDseC8pVxPe/5Blzg3eVgP1QvNuUmApHWEHcTro1vxP8bG1Go038FIG7HBQ3wnnajtnr u4NA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=nOxQSly3qFkY5sLdxDVq8Oxj2ZaXRYjBEcYf6a56b4o=; b=m8YCyeRMD783gYxwmYn0c8igCmyvczz1np50UZdqmPDv9+JiMpAKUlvcpZIh52Acjg mG9EqA48NtsXcCXROsbKzEMfZ2L7me9tzXuh3wAKjrgzMVCCRfP9i+82y5FIvchaXhro LjGhrp7QhwU6sSMreqSkPaoPv/q0x2x672r4tybcjunR8RT4rAlfDZu8IRNg5X/z7Suw N6nCnIsco5/Y8ehUo4bkzu+Bm3P9+1WDRUvImyCHCdxQGS2hq7rKcW2ctjPoO8aNvC0d X8Onb/LjVbv7eyXXSdFUKeTf7mZr8x7LP59G2LXcEj5euUf9Lc1Q8q/sf3ExxkEWMf3N 2uFQ== X-Gm-Message-State: APzg51C5xF/ofcmpFBfEUf+aQCof2nlyn9e5BVGDK25r5GQu6HAk/yIp oduGjS+lJZ7OcdmMs63wfwqxBlh9 X-Google-Smtp-Source: ANB0Vdb2lUq27YqtNfhMGCrISAYTs7ZIk4Lo68EhyLH8gY+CPwwJXEx+I+fQhyVx6oh8sTpVHqCdIg== X-Received: by 2002:a2e:7d10:: with SMTP id y16-v6mr4666293ljc.29.1536849933316; Thu, 13 Sep 2018 07:45:33 -0700 (PDT) Received: from localhost.localdomain (81-233-89-221-no75.tbcn.telia.com. [81.233.89.221]) by smtp.gmail.com with ESMTPSA id q19-v6sm743655lji.14.2018.09.13.07.45.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Sep 2018 07:45:32 -0700 (PDT) From: Erik Stromdahl To: kvalo@qca.qualcomm.com, linux-wireless@vger.kernel.org, ath10k@lists.infradead.org Cc: Erik Stromdahl Subject: [PATCH 1/2] ath10k: add default value for num_peers in WMI TLV init Date: Thu, 13 Sep 2018 16:45:05 +0200 Message-Id: <20180913144506.8272-1-erik.stromdahl@gmail.com> X-Mailer: git-send-email 2.18.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The hw_params value will only be used if it was explicitly set in the global hw_params array. This makes it possible to have the num_peers member unset. Signed-off-by: Erik Stromdahl --- drivers/net/wireless/ath/ath10k/wmi-tlv.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.c b/drivers/net/wireless/ath/ath10k/wmi-tlv.c index 2640bc389f1d..e8e4ec5443e7 100644 --- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c +++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c @@ -1569,7 +1569,10 @@ static struct sk_buff *ath10k_wmi_tlv_op_gen_init(struct ath10k *ar) cfg->num_vdevs = __cpu_to_le32(TARGET_TLV_NUM_VDEVS); - cfg->num_peers = __cpu_to_le32(ar->hw_params.num_peers); + if (ar->hw_params.num_peers) + cfg->num_peers = __cpu_to_le32(ar->hw_params.num_peers); + else + cfg->num_peers = __cpu_to_le32(TARGET_TLV_NUM_PEERS); cfg->ast_skid_limit = __cpu_to_le32(ar->hw_params.ast_skid_limit); cfg->num_wds_entries = __cpu_to_le32(ar->hw_params.num_wds_entries);