From patchwork Wed Jun 20 08:42:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Cassel X-Patchwork-Id: 10476483 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 D7C12600F6 for ; Wed, 20 Jun 2018 08:44:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C851C28D08 for ; Wed, 20 Jun 2018 08:44:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BD08C28D1D; Wed, 20 Jun 2018 08:44:53 +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_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham 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 35DC628D27 for ; Wed, 20 Jun 2018 08:44:53 +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:References: In-Reply-To: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:List-Owner; bh=3W9IjWf1u0qv2/h/8liB1FsEotIELnk70/ZnuCsstEQ=; b=giu7DO8zwncFyjCk4LhwmKvZEY gFTjn9mBivdG+sIbmuf6UHJXgmn3/CHiH9LjxqPWQxMpGqsZ9OvJnmWQgNk6p4XwkuJu4ZPiLlkGP TgjJNVOolBoHN5TKZPW/n5dubHNCXi6wXYLtwUsL2YHO5Uq9Ym4upUyIDFZcHnGtiZRwegxpHRUMZ FYZm4jBEpeNCNbKIW6RJ/GZ63bMVDW7SBRNWD8hmvPv7oZr74m0RKc+/eAhaIOeX4Ba0B6ZyfWQcL zQNMQzvxPs5VN2TWVhnUcWgIBjk4C4zXHoQ7HoK5zs6NRD0OieBceLl7RCc51jzj/c3h2PPuFlxiv /umaNqoA==; 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 1fVYjM-00052P-9k; Wed, 20 Jun 2018 08:44:44 +0000 Received: from mail-lf0-x243.google.com ([2a00:1450:4010:c07::243]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fVYhP-0003vL-Na for ath10k@lists.infradead.org; Wed, 20 Jun 2018 08:43:20 +0000 Received: by mail-lf0-x243.google.com with SMTP id g21-v6so3704798lfb.4 for ; Wed, 20 Jun 2018 01:42:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=JKpvz3vtYdohxjtXmtyo5SjzMcz9c7S9E23fQ5xXab4=; b=QAinP0cUkQ5zt0rvGHnPqm8C19pbEnTgsOdE7o40ZdxvOw2oQcLgAOSxwX6DLHAuuY QykZ2tKUcx1FH0YkKELwREaH3E4p62NCXRQCX84610BJLQSwnfqxHsrpK1pioz3YvOm7 oV89YuUoBTNtuVg0sY8Ow276CNIH9u0+NeMZY= 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:in-reply-to :references; bh=JKpvz3vtYdohxjtXmtyo5SjzMcz9c7S9E23fQ5xXab4=; b=ko4YTNz9BOTYogGaM1JG1DrDHciSXizMgE1n/FxB8YpdwvEFiV4RigT4moBOFaHagn XNCrKw74EtCUYO8pbhlNE+7fmVuEyigZtgQVh1hljA672O5sSWdJhSpQFuhxB+hkrelo /7Qe3XoAPSJtcARmgAOQoo4UPdMrBaqWCBkudBzzqhmutG+UtBR3z3XGUnv6a1ZAp0gm 3/smpsPSS50uaIbBJIL4mk4eNLwrIlAwcc0PreCYt0bVbujUuzO/seYl0pYt4wibP85V HC4AomLJ3+2y/1ljo7ShDJtoJZ5AV3ZZ2JYeAix6imDThWZyJIyG5UtTBnpJmF2/PVlg Qpcw== X-Gm-Message-State: APt69E3wJoQ/3Zm60AQbj/jNLpuMzY68nbRAaRyWj+PL9v0LF+sWGVI3 VVp2q0IDL+q/YPhfHbU7uc5enQ== X-Google-Smtp-Source: ADUXVKIErsU8106cF3yhAARbMNfvZR03AIjYYlG+OfmTWkM5BZCvGZkfQnP3XZecKt9E8j+VfkwfOg== X-Received: by 2002:a2e:7a0f:: with SMTP id v15-v6mr14038227ljc.68.1529484151743; Wed, 20 Jun 2018 01:42:31 -0700 (PDT) Received: from centauri.lan (h-229-118.A785.priv.bahnhof.se. [5.150.229.118]) by smtp.gmail.com with ESMTPSA id l25-v6sm301267ljj.30.2018.06.20.01.42.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Jun 2018 01:42:31 -0700 (PDT) From: Niklas Cassel To: Kalle Valo , "David S. Miller" Subject: [PATCH 1/3] ath10k: sdio: use same endpoint id for all packets in a bundle Date: Wed, 20 Jun 2018 10:42:20 +0200 Message-Id: <20180620084222.3521-2-niklas.cassel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180620084222.3521-1-niklas.cassel@linaro.org> References: <20180620084222.3521-1-niklas.cassel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180620_014243_801723_FF00A90B X-CRM114-Status: GOOD ( 11.68 ) 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: alagusankar@silex-india.com, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, ath10k@lists.infradead.org, Niklas Cassel MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP All packets in a bundle should use the same endpoint id as the first lookahead. This matches how things are done is ath6kl, however, this patch can theoretically handle several bundles in ath10k_sdio_mbox_rx_process_packets(). Without this patch we get lots of errors about invalid endpoint id: ath10k_sdio mmc2:0001:1: invalid endpoint in look-ahead: 224 ath10k_sdio mmc2:0001:1: failed to get pending recv messages: -12 ath10k_sdio mmc2:0001:1: failed to process pending SDIO interrupts: -12 Signed-off-by: Alagu Sankar Signed-off-by: Niklas Cassel --- drivers/net/wireless/ath/ath10k/sdio.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/sdio.c b/drivers/net/wireless/ath/ath10k/sdio.c index d612ce8c9cff..d46523b0472c 100644 --- a/drivers/net/wireless/ath/ath10k/sdio.c +++ b/drivers/net/wireless/ath/ath10k/sdio.c @@ -434,12 +434,14 @@ static int ath10k_sdio_mbox_rx_process_packets(struct ath10k *ar, enum ath10k_htc_ep_id id; int ret, i, *n_lookahead_local; u32 *lookaheads_local; + int lookahead_idx = 0; for (i = 0; i < ar_sdio->n_rx_pkts; i++) { lookaheads_local = lookaheads; n_lookahead_local = n_lookahead; - id = ((struct ath10k_htc_hdr *)&lookaheads[i])->eid; + id = ((struct ath10k_htc_hdr *) + &lookaheads[lookahead_idx++])->eid; if (id >= ATH10K_HTC_EP_COUNT) { ath10k_warn(ar, "invalid endpoint in look-ahead: %d\n", @@ -462,6 +464,7 @@ static int ath10k_sdio_mbox_rx_process_packets(struct ath10k *ar, /* Only read lookahead's from RX trailers * for the last packet in a bundle. */ + lookahead_idx--; lookaheads_local = NULL; n_lookahead_local = NULL; }