From patchwork Fri Jun 15 12:04:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erik Stromdahl X-Patchwork-Id: 10466287 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A905660384 for ; Fri, 15 Jun 2018 12:06:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9E0C528D8D for ; Fri, 15 Jun 2018 12:06:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 92FCE28D8F; Fri, 15 Jun 2018 12:06:51 +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=-2.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3ED5428D8D for ; Fri, 15 Jun 2018 12:06:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=JmH+aK+qvm6Z+Swj1QB2uG8sYWwssV1DKcFzfvrlp3w=; b=WFd NuDTTgyiAWN0h3TQrX4isA9u2Xia4OwdbUN3ureacnIzD2m3eGaYOqkGHIHqI4Xbm3x3Nt+qi2MEz RtEI9HQN8oYOEJFSqb4X8QszVPMFAt4xQ0lEdjIzpk7mVmmB0NzmHpYNAdIxIOzL2GxfKepaeMpK+ Qs/RAfaT1GaHyR62OKJ/OqaMDOExVVkduv1JWDKBEfW1xzeaOvUCtukox81xNc/jutBgBzwZetyjA PtB4CY79KfR3xdLp5+sEO9EHeQxWEaUu8hxKKGsiV1ZEErrNBbj3ObAibcwCZQBWhW5UxEIBtWSx7 lQDfb/gfFF6oZNWnDNG13YjGcWpZx5Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fTnV6-0004jv-8X; Fri, 15 Jun 2018 12:06:44 +0000 Received: from mail-lf0-x244.google.com ([2a00:1450:4010:c07::244]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fTnUw-0004eX-Lr for ath10k@lists.infradead.org; Fri, 15 Jun 2018 12:06:37 +0000 Received: by mail-lf0-x244.google.com with SMTP id v135-v6so14275309lfa.9 for ; Fri, 15 Jun 2018 05:06:24 -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=vGN1Z/3OQIbeBNEzHtUmTleslzG1J0omRbU/VCyXcqY=; b=RHNgruWn7XRIEeNpf/u6Wo9dAZ0TFPVydHy5TsYZWKp37NlF2UrGWT8JkjgX+lHute cwL31L/RxHCxFDlT3bMqaMnop36zsehgJThqRP06zdyiIwATh7qLdAiXQ4Q/lovJ2kK9 SI+Sk5mQiJebBjdnl/agg7sFfDSyDtv1OdTRY5G9C5Pp4UPERK1szr2RuNoyBkDVYu8Q IKMQh1r013UQIIk/ZONvsAF+/rVQ62DWi1EhrzdHbqDynR8Tz44/rsxOHTGhDZo7YA1Q kVBwxhFpKOSKARjK0hFM3awE2VybXxp/G/4HVycMmglcS0Ge5xdud7/hDTkEnmlibRgB eUVA== 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=vGN1Z/3OQIbeBNEzHtUmTleslzG1J0omRbU/VCyXcqY=; b=lUro4y6nZrAYsQL1fzPw8oOaWs67n5Nwb3ZyxR1Sv7Lh9d8S1duB3XZl8F4Xxcp2Sf AaZpBQvZJak08lPtL2COiP/uUCSQIELygB+6thLncNBNh8AO+4JpoxD43BEP+E2pCZmk bPC3K+fA+9O4HJfmHWizKntKWXUXNg0Sss6Mw+393EGmOjZsrMGY7m57lzCSXjJGLCu4 1Nc3FR2yvKa1bgMjSIYAIuveSVSQjZUwCgcPG9TtJOKBD9Ul2ET2wbtvkfBaF7To/LvU xud8/7hf5F26tl9kWihkkFPpYyC24Xr9jCJPSliu4k2tlQ9ciQRGealqVAEYEFIzf/8s 7rIg== X-Gm-Message-State: APt69E2CKjm+lPwTi/eUFa6HE+DJHixxnDfusQz8fiL26ce/bP6h0WHM zxPGjUAjfh+Ms/HiLAph1dc= X-Google-Smtp-Source: ADUXVKJlVMqV8xMyC661O07tPoYVEv/bZWTZ+RaGigxcD2IKyQaqixr2DsLHX/01fbxOEinlvww+Jg== X-Received: by 2002:a19:d1d4:: with SMTP id i203-v6mr1017118lfg.93.1529064382636; Fri, 15 Jun 2018 05:06:22 -0700 (PDT) Received: from localhost.localdomain (90-227-62-61-no75.tbcn.telia.com. [90.227.62.61]) by smtp.gmail.com with ESMTPSA id x15-v6sm1470210lfe.39.2018.06.15.05.06.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Jun 2018 05:06:22 -0700 (PDT) From: Erik Stromdahl To: kvalo@qca.qualcomm.com, linux-wireless@vger.kernel.org, ath10k@lists.infradead.org Subject: [PATCH 1/2] ath10k: rename HTC_HOST_MAX_MSG_PER_BUNDLE define Date: Fri, 15 Jun 2018 14:04:22 +0200 Message-Id: <20180615120423.4963-1-erik.stromdahl@gmail.com> X-Mailer: git-send-email 2.17.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180615_050634_739605_A059C59A X-CRM114-Status: GOOD ( 12.50 ) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Erik Stromdahl MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This define is only used for RX bundling so it is more descriptive if RX is added to the define-name. Signed-off-by: Erik Stromdahl --- drivers/net/wireless/ath/ath10k/htc.c | 4 ++-- drivers/net/wireless/ath/ath10k/htc.h | 2 +- drivers/net/wireless/ath/ath10k/sdio.c | 4 ++-- drivers/net/wireless/ath/ath10k/sdio.h | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/htc.c b/drivers/net/wireless/ath/ath10k/htc.c index 8902720b4e49..331b8d558791 100644 --- a/drivers/net/wireless/ath/ath10k/htc.c +++ b/drivers/net/wireless/ath/ath10k/htc.c @@ -274,7 +274,7 @@ ath10k_htc_process_lookahead_bundle(struct ath10k_htc *htc, struct ath10k *ar = htc->ar; int bundle_cnt = len / sizeof(*report); - if (!bundle_cnt || (bundle_cnt > HTC_HOST_MAX_MSG_PER_BUNDLE)) { + if (!bundle_cnt || (bundle_cnt > HTC_HOST_MAX_MSG_PER_RX_BUNDLE)) { ath10k_warn(ar, "Invalid lookahead bundle count: %d\n", bundle_cnt); return -EINVAL; @@ -655,7 +655,7 @@ int ath10k_htc_wait_target(struct ath10k_htc *htc) sizeof(msg->hdr) + sizeof(msg->ready_ext)) { htc->max_msgs_per_htc_bundle = min_t(u8, msg->ready_ext.max_msgs_per_htc_bundle, - HTC_HOST_MAX_MSG_PER_BUNDLE); + HTC_HOST_MAX_MSG_PER_RX_BUNDLE); ath10k_dbg(ar, ATH10K_DBG_HTC, "Extended ready message. RX bundle size: %d\n", htc->max_msgs_per_htc_bundle); diff --git a/drivers/net/wireless/ath/ath10k/htc.h b/drivers/net/wireless/ath/ath10k/htc.h index 34877597dd6a..e60fbea698a9 100644 --- a/drivers/net/wireless/ath/ath10k/htc.h +++ b/drivers/net/wireless/ath/ath10k/htc.h @@ -50,7 +50,7 @@ struct ath10k; * 4-byte aligned. */ -#define HTC_HOST_MAX_MSG_PER_BUNDLE 8 +#define HTC_HOST_MAX_MSG_PER_RX_BUNDLE 8 enum ath10k_htc_tx_flags { ATH10K_HTC_FLAG_NEED_CREDIT_UPDATE = 0x01, diff --git a/drivers/net/wireless/ath/ath10k/sdio.c b/drivers/net/wireless/ath/ath10k/sdio.c index d612ce8c9cff..8672588e11eb 100644 --- a/drivers/net/wireless/ath/ath10k/sdio.c +++ b/drivers/net/wireless/ath/ath10k/sdio.c @@ -505,11 +505,11 @@ static int ath10k_sdio_mbox_alloc_pkt_bundle(struct ath10k *ar, *bndl_cnt = FIELD_GET(ATH10K_HTC_FLAG_BUNDLE_MASK, htc_hdr->flags); - if (*bndl_cnt > HTC_HOST_MAX_MSG_PER_BUNDLE) { + if (*bndl_cnt > HTC_HOST_MAX_MSG_PER_RX_BUNDLE) { ath10k_warn(ar, "HTC bundle length %u exceeds maximum %u\n", le16_to_cpu(htc_hdr->len), - HTC_HOST_MAX_MSG_PER_BUNDLE); + HTC_HOST_MAX_MSG_PER_RX_BUNDLE); return -ENOMEM; } diff --git a/drivers/net/wireless/ath/ath10k/sdio.h b/drivers/net/wireless/ath/ath10k/sdio.h index 4ff7b545293b..453eb6263143 100644 --- a/drivers/net/wireless/ath/ath10k/sdio.h +++ b/drivers/net/wireless/ath/ath10k/sdio.h @@ -96,14 +96,14 @@ * way: * * Let's assume that each packet in a bundle of the maximum bundle size - * (HTC_HOST_MAX_MSG_PER_BUNDLE) has the HTC header bundle count set - * to the maximum value (HTC_HOST_MAX_MSG_PER_BUNDLE). + * (HTC_HOST_MAX_MSG_PER_RX_BUNDLE) has the HTC header bundle count set + * to the maximum value (HTC_HOST_MAX_MSG_PER_RX_BUNDLE). * * in this case the driver must allocate - * (HTC_HOST_MAX_MSG_PER_BUNDLE * HTC_HOST_MAX_MSG_PER_BUNDLE) skb's. + * (HTC_HOST_MAX_MSG_PER_RX_BUNDLE * HTC_HOST_MAX_MSG_PER_RX_BUNDLE) skb's. */ #define ATH10K_SDIO_MAX_RX_MSGS \ - (HTC_HOST_MAX_MSG_PER_BUNDLE * HTC_HOST_MAX_MSG_PER_BUNDLE) + (HTC_HOST_MAX_MSG_PER_RX_BUNDLE * HTC_HOST_MAX_MSG_PER_RX_BUNDLE) #define ATH10K_FIFO_TIMEOUT_AND_CHIP_CONTROL 0x00000868u #define ATH10K_FIFO_TIMEOUT_AND_CHIP_CONTROL_DISABLE_SLEEP_OFF 0xFFFEFFFF