From patchwork Tue Mar 26 16:29:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erik Stromdahl X-Patchwork-Id: 10871581 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 8C9F2139A for ; Tue, 26 Mar 2019 16:43:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7404228A10 for ; Tue, 26 Mar 2019 16:43:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6828828D42; Tue, 26 Mar 2019 16:43:19 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 F2BB728A10 for ; Tue, 26 Mar 2019 16:43:18 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=0G0d5BX7u7ApMYeYuXBwVbtrMxCBTYj4d4aXzRDmC5w=; b=CW+VBFEub26Mkg z/+lFiB49Q1Ku6IwVw3k7k/3nLVSFLyEk+J3lbHIXFoY9IwB4hXFRwN+47PI2w506jVVIecot311R uFi+MoXBEkv0mgoDxZDSasH4vALnZLCaQCjqbO/ho8FvCOcZK5lYL7DBGhlin+9JcGcE9j0Cd9Py+ iwhkfKugjY6CIu9wmrpl6+aX0fcFsGkRbA7y8pVbX3lnwXcuKLmiyPnqcAfgexrYwbv6vko4J7P3D 7PYt9HhLThvKb9Tq2oWB+meIW+dGxHjGgLI2uBFkWOPfaRyjubMu79RcK/xZq8cD2V60o5YMti/1f Lhy9bwRWs/jF5UHxz4XA==; 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 1h8pAS-0000wD-LU; Tue, 26 Mar 2019 16:43:16 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h8pAR-0000pJ-By for ath10k@bombadil.infradead.org; Tue, 26 Mar 2019 16:43:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=8p1TbAOteGGS4xBIy9tBzY2jMbfACqoFM4S99vsv6z0=; b=Ou/JH8ioJVbCsIYyMJ6fjvGIgA UKhwzLz3DPgWVWu/pxspHmpzXhGiEPrP0flCHtR434mHk8uDgmBFgFNO3rHAHDkZ49VCREESG3rJi u/IggFj9n6gLInvndm86Rjhw/LCWMZ5Z5vLVMbZUWX2yO+a+1CdFI+VjH27T5lisBJtFi/fhNE/KJ NBm8GZ20ZFdMdef7FKAUoEVL8vavyBvfcA5VfsqoCUx07C3IvJaA+6JTrzX4zx/ZSiZwE5KiVu2yB tzGK3c0Rr8gY4TY4eOAxDE+cD1wrlIDQk0OrClZ3I+GIMn3FjN9GF8EsIpn86QiphHOUB3REHincm Sc/KQjdw==; Received: from mail-lj1-x243.google.com ([2a00:1450:4864:20::243]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h8oxJ-0002fn-VV for ath10k@lists.infradead.org; Tue, 26 Mar 2019 16:29:43 +0000 Received: by mail-lj1-x243.google.com with SMTP id t13so11654546lji.2 for ; Tue, 26 Mar 2019 09:29:41 -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:mime-version :content-transfer-encoding; bh=8p1TbAOteGGS4xBIy9tBzY2jMbfACqoFM4S99vsv6z0=; b=QTK4Mlij8XPZsj1ackemTVGBBhchTNiNGd/b4nYgk65U17DtvL2A821OwL96papK15 OChsnm9PH7Zk4Xzw9kZ+vv2YHrD2rz6ubvsLAU7+Bj5CRQlHJ5x0aGRf67wwpUI6KUPG 2P1C/N6XPvGgz5J9i6f8yseFplSuYSp7c6Vw19ueohUh+Skmm4SslyjiwO81xJyxxJCo ceeNLPsn+XQ+Bzgg8NzpTUB7+npkvUPtsmD7oLP26r/y+bLMHKPbNXhoooEZv59Wn3rA wmCt1wW6iauhe+jhQFwKd1JkJD0R5mWNqcqzDI4FgOp2wNMpRV9Q0MxZBuOfYW+0n5Aa HY5Q== 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:mime-version :content-transfer-encoding; bh=8p1TbAOteGGS4xBIy9tBzY2jMbfACqoFM4S99vsv6z0=; b=KN0z2RZdmgn41YZRJoD60wCoSW5zVfJ3YJlT3sUN0Gs1KtXV5R9F5e2+SHRBUdsONB EE9TdzGpX4+1BIWhz2ePz1yuAY4znyGAwQRhtZWGWeJHMq/LQ4bmEK9mA7xPfd5vif+1 QaJZsZLLVnThJLz4pEGbha69KbeVL7VOLiKx+WbutrUJYnuBtP0DkBvPO1x31P7D/Vsh Gw+FLkNTDkXE6VckN0nw8kIYGJD0xG4bAos4HPfy8XI5tOrjnsePKPPGr3h0mi0l4wl+ rtT6jffcCALoeze4cb+jSDHKqYhPc2eAFpvlm4QMEG5ZpXfN8Cx5AP/TllXNMuEuQCX8 cPew== X-Gm-Message-State: APjAAAWVzuMqDtCzw19h158dKOuAQvEi299ehU+8DZf8ov2cSBh4MnsS bC21yEiqMMFThR5RV5hFjRI= X-Google-Smtp-Source: APXvYqw+gE1+8gaIIBjsZLBbPj8noyX6S8P4ZOnTarZtXaD4CdZs81t6x0wkUkKMxLHOE/36lM6F9Q== X-Received: by 2002:a2e:5bcc:: with SMTP id m73mr16102536lje.100.1553617777722; Tue, 26 Mar 2019 09:29:37 -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 f19sm4104898lfk.69.2019.03.26.09.29.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Mar 2019 09:29:36 -0700 (PDT) From: Erik Stromdahl To: kvalo@qca.qualcomm.com, linux-wireless@vger.kernel.org, ath10k@lists.infradead.org Subject: [PATCH 1/2] ath10k: add inline wrapper for htt_h2t_aggr_cfg_msg Date: Tue, 26 Mar 2019 17:29:03 +0100 Message-Id: <20190326162904.6737-1-erik.stromdahl@gmail.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190326_162942_191308_BDEDC970 X-CRM114-Status: GOOD ( 16.17 ) 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 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This is done in order to make the *htt_h2t_aggr_cfg_msg* op align better with the rest of the htt ops (whom all have inline wrappers). It also adds support for the case when the op is missing (function pointer is NULL). As a result of this, the name of the 32 bit implementation in htt_tx.c was changed and the function was made static. Signed-off-by: Erik Stromdahl --- drivers/net/wireless/ath/ath10k/htt.c | 2 +- drivers/net/wireless/ath/ath10k/htt.h | 16 +++++++++++++--- drivers/net/wireless/ath/ath10k/htt_tx.c | 8 ++++---- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/htt.c b/drivers/net/wireless/ath/ath10k/htt.c index d235ff3098e8..7b75200ceae5 100644 --- a/drivers/net/wireless/ath/ath10k/htt.c +++ b/drivers/net/wireless/ath/ath10k/htt.c @@ -257,7 +257,7 @@ int ath10k_htt_setup(struct ath10k_htt *htt) return status; } - status = htt->tx_ops->htt_h2t_aggr_cfg_msg(htt, + status = ath10k_htt_h2t_aggr_cfg_msg(htt, htt->max_num_ampdu, htt->max_num_amsdu); if (status) { diff --git a/drivers/net/wireless/ath/ath10k/htt.h b/drivers/net/wireless/ath/ath10k/htt.h index 4cee5492abc8..30fb556589d1 100644 --- a/drivers/net/wireless/ath/ath10k/htt.h +++ b/drivers/net/wireless/ath/ath10k/htt.h @@ -2048,6 +2048,19 @@ static inline void ath10k_htt_free_txbuff(struct ath10k_htt *htt) htt->tx_ops->htt_free_txbuff(htt); } +static inline int ath10k_htt_h2t_aggr_cfg_msg(struct ath10k_htt *htt, + u8 max_subfrms_ampdu, + u8 max_subfrms_amsdu) + +{ + if (!htt->tx_ops->htt_h2t_aggr_cfg_msg) + return -EOPNOTSUPP; + + return htt->tx_ops->htt_h2t_aggr_cfg_msg(htt, + max_subfrms_ampdu, + max_subfrms_amsdu); +} + struct ath10k_htt_rx_ops { size_t (*htt_get_rx_ring_size)(struct ath10k_htt *htt); void (*htt_config_paddrs_ring)(struct ath10k_htt *htt, void *vaddr); @@ -2196,9 +2209,6 @@ void ath10k_htt_htc_t2h_msg_handler(struct ath10k *ar, struct sk_buff *skb); bool ath10k_htt_t2h_msg_handler(struct ath10k *ar, struct sk_buff *skb); int ath10k_htt_h2t_ver_req_msg(struct ath10k_htt *htt); int ath10k_htt_h2t_stats_req(struct ath10k_htt *htt, u8 mask, u64 cookie); -int ath10k_htt_h2t_aggr_cfg_msg(struct ath10k_htt *htt, - u8 max_subfrms_ampdu, - u8 max_subfrms_amsdu); void ath10k_htt_hif_tx_complete(struct ath10k *ar, struct sk_buff *skb); int ath10k_htt_tx_fetch_resp(struct ath10k *ar, __le32 token, diff --git a/drivers/net/wireless/ath/ath10k/htt_tx.c b/drivers/net/wireless/ath/ath10k/htt_tx.c index d8e9cc0bb772..8d533f5eb1aa 100644 --- a/drivers/net/wireless/ath/ath10k/htt_tx.c +++ b/drivers/net/wireless/ath/ath10k/htt_tx.c @@ -977,9 +977,9 @@ static int ath10k_htt_send_rx_ring_cfg_hl(struct ath10k_htt *htt) return 0; } -int ath10k_htt_h2t_aggr_cfg_msg(struct ath10k_htt *htt, - u8 max_subfrms_ampdu, - u8 max_subfrms_amsdu) +static int ath10k_htt_h2t_aggr_cfg_msg_32(struct ath10k_htt *htt, + u8 max_subfrms_ampdu, + u8 max_subfrms_amsdu) { struct ath10k *ar = htt->ar; struct htt_aggr_conf *aggr_conf; @@ -1728,7 +1728,7 @@ static const struct ath10k_htt_tx_ops htt_tx_ops_32 = { .htt_tx = ath10k_htt_tx_32, .htt_alloc_txbuff = ath10k_htt_tx_alloc_cont_txbuf_32, .htt_free_txbuff = ath10k_htt_tx_free_cont_txbuf_32, - .htt_h2t_aggr_cfg_msg = ath10k_htt_h2t_aggr_cfg_msg, + .htt_h2t_aggr_cfg_msg = ath10k_htt_h2t_aggr_cfg_msg_32, }; static const struct ath10k_htt_tx_ops htt_tx_ops_64 = {