From patchwork Wed May 23 18:05:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajkumar Manoharan X-Patchwork-Id: 10422013 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 7B37D60327 for ; Wed, 23 May 2018 18:05:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6A37E28555 for ; Wed, 23 May 2018 18:05:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5D31429109; Wed, 23 May 2018 18:05:58 +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=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 E072A29106 for ; Wed, 23 May 2018 18:05:57 +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-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:To:From: Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=OK9/XbCv57PT0xjhU6T7a1/WBlZgpGr+l7nkIKHGNXA=; b=AgaO6pmN+4HpcrlSUvOOVFhX+ U+6RfXNum0+gjfFBxDfbrVwcdG+OvkIzEdPlpQ+80eMpwbw15o9PWNNRdm98bKBOXD4qrvmA4sQrv w4BkaQ92DEiI86S/Du4XNE5270LTxuqCc6HurwCpfBnRBx3eXXiZArkFPYNxc2y5vyvUETenkNGFJ +vzjx/S/JbJLXcRQ+nHyClR1C50ricY9MC8ZZWn0A4ukWUAWZpT/hvH2TSWSIZWSw59DqvH1l4naD SHgFR563+ch/Zfk4w/0YUEcOPZ7ByhaFlnpVVvcMTk3Md6qnYDhvcAlkz2Sj/TU43U8wcP/w0h4U+ S3bntj4qg==; 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 1fLY90-00023s-5N; Wed, 23 May 2018 18:05:50 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLY8u-0001sX-3N for ath10k@lists.infradead.org; Wed, 23 May 2018 18:05:48 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 073B76047C; Wed, 23 May 2018 18:05:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1527098733; bh=ppIXKtp0693sDRWglKJA7DOyyecoGsZYOsEwGJbfJm4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Ea11MzfqXE/nLTdO/YEoipfTfeBBk3piZHbWm0kDPvz84kjcqzoT9nzp1zWqRhmSQ CfWkrTDV/VffOkwvbfTNHeBI8IXEDm8BlY6z+atxbrthvWc302E/46XGU3MFX43yt9 uKHr9UvnDlcIr4D7/yiMh2kPIXt+fkkMBD1y12kg= Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 3B684602BC; Wed, 23 May 2018 18:05:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1527098732; bh=ppIXKtp0693sDRWglKJA7DOyyecoGsZYOsEwGJbfJm4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=MPncGQV2ntHl1e07QZPcFlJ3yg2G/AQMFKKYf6q46v8mSJ7+b4f2bKhujWLhjL0LZ sxN3dFUdH+SxHUA43hBTV5GFfEDUDYYjykdU7POVylrSSzTlMZAVSb3l3NeVROVtSX jLJ9UQOtlTDtMXyfy4y67/yTLuK3HVVWxgcoSKB0= MIME-Version: 1.0 Date: Wed, 23 May 2018 11:05:32 -0700 From: Rajkumar Manoharan To: Erik Stromdahl Subject: Re: [PATCH v2] ath10k: transmit queued frames after waking queues In-Reply-To: References: <20180521204359.23884-1-niklas.cassel@linaro.org> <8195be7603a8cd659d25a9c3d898b891@codeaurora.org> <20180522211521.GA26123@localhost.localdomain> Message-ID: X-Sender: rmanohar@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180523_110544_208948_8FC2EF72 X-CRM114-Status: GOOD ( 16.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: linux-wireless-owner@vger.kernel.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, ath10k@lists.infradead.org, Kalle Valo , Niklas Cassel , "David S. Miller" Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP On 2018-05-23 09:25, Erik Stromdahl wrote: > On 05/22/2018 11:15 PM, Niklas Cassel wrote: > [...] >> >> Perhaps it would be possible to call ath10k_mac_tx_push_pending() >> from the equivalent to ath10k_htt_txrx_compl_task(), >> but from SDIO's point of view. > An equivalent for SDIO would most likely be > *ath10k_htt_htc_t2h_msg_handler* > or any of the other functions called from this function. > > *ath10k_txrx_tx_unref* is actually called from > *ath10k_htt_htc_t2h_msg_handler*, > so that function could be viewed as an equivalent. > > If the call should be added in the bus driver (sdio.c) it should most > likely be > placed in *ath10k_sdio_mbox_rx_process_packets* > > if (!pkt->trailer_only) { > ep->ep_ops.ep_rx_complete(ar_sdio->ar, pkt->skb); > ath10k_mac_tx_push_pending(ar_sdio->ar); > } else { > kfree_skb(pkt->skb) > } > > The above call would of course result in lot's of calls to > *ath10k_mac_tx_push_pending* > Adding a htt_num_pending check here wouldn't look nice. > > The HL RX path differs from the LL path in that the t2h_msg_handler > returns > false indicating that it has consumed the skb. > > This is because it is the HL RX indication handler that delivers the > skb's > to mac80211. > I also dont prefer to call *_push_pending for every HTC packets. Similar to LL approach, call ath10k_mac_tx_push_pending after processing all pending rx messages like calling from ath10k_sdio_mbox_rxmsg_pending_handler. } > Another solution could be to add an *else-statement* as a part of the > *if (release)* > in *ath10k_htt_htc_t2h_msg_handler*, where > *ath10k_mac_tx_push_pending* could be called. > > Something like this perhaps: > > /* Free the indication buffer */ > if (release) > dev_kfree_skb_any(skb); > else if (!ar->htt.num_pending_tx) > ath10k_mac_tx_push_pending(ar); > > I think I prefer your original patch though. >> Better to do changes as HL specific path instead in common path. The above change will impact QCA6174 based devices. -Rajkumar --- a/drivers/net/wireless/ath/ath10k/sdio.c +++ b/drivers/net/wireless/ath/ath10k/sdio.c @@ -807,6 +807,8 @@ static int ath10k_sdio_mbox_rxmsg_pending_handler(struct ath10k *ar, ath10k_warn(ar, "failed to get pending recv messages: %d\n", ret); + ath10k_mac_tx_push_pending(ar); + return ret;